mcp-use TypeScript API
    Preparing search index...

    Interface MountMcpOptions

    Options for createMcpMount.

    interface MountMcpOptions {
        authInfo?: (request: Request) => AuthInfo | undefined;
        handler?: CreateMcpHandlerOptions;
        path?: string;
    }
    Index
    authInfo?: (request: Request) => AuthInfo | undefined

    Produce verified AuthInfo for the request before the SDK handler runs. When omitted, requests are served without authenticated identity.

    handler?: CreateMcpHandlerOptions

    Options forwarded to the SDK's createMcpHandler.

    legacy defaults to "stateless": 2025-era (non-envelope) requests are served by a fresh instance over a session-less streamable HTTP transport. Pass legacy: "reject" for modern-only strict serving, where legacy-classified requests get the unsupported-protocol-version error.

    path?: string

    Route path the MCP endpoint is served on. Defaults to /mcp.