langchain.js
    Preparing search index...

    Interface McpRemoteServerOptions

    Options for connecting to a remote MCP server via URL.

    interface McpRemoteServerOptions {
        allowedTools?: string[] | McpToolFilter;
        authorization?: string;
        headers?: Record<string, string>;
        requireApproval?: "never" | McpApprovalFilter | "always";
        serverDescription?: string;
        serverLabel: string;
        serverUrl: string;
    }

    Hierarchy

    • McpBaseOptions
      • McpRemoteServerOptions
    Index

    Properties

    allowedTools?: string[] | McpToolFilter

    List of allowed tool names or a filter object. Use this to limit which tools from the MCP server are available to the model.

    authorization?: string

    An OAuth access token for authentication with the MCP server. Your application must handle the OAuth authorization flow and provide the token here.

    headers?: Record<string, string>

    Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.

    requireApproval?: "never" | McpApprovalFilter | "always"

    Specify which of the MCP server's tools require approval before execution.

    • "always": All tools require approval
    • "never": No tools require approval
    • McpApprovalFilter: Fine-grained control over which tools require approval
    "always" (approval required for all tools)
    
    serverDescription?: string

    Optional description of the MCP server, used to provide more context to the model.

    serverLabel: string

    A label for this MCP server, used to identify it in tool calls.

    serverUrl: string

    The URL for the MCP server. The server must implement the Streamable HTTP or HTTP/SSE transport protocol.