langchain.js
    Preparing search index...

    Interface McpConnectorOptions

    Options for connecting to an OpenAI-maintained service connector.

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

    Hierarchy

    • McpBaseOptions
      • McpConnectorOptions
    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.

    connectorId: McpConnectorId

    Identifier for the service connector. These are OpenAI-maintained MCP wrappers for popular services.

    Available connectors:

    • connector_dropbox: Dropbox file access
    • connector_gmail: Gmail email access
    • connector_googlecalendar: Google Calendar access
    • connector_googledrive: Google Drive file access
    • connector_microsoftteams: Microsoft Teams access
    • connector_outlookcalendar: Outlook Calendar access
    • connector_outlookemail: Outlook Email access
    • connector_sharepoint: SharePoint file access
    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.