mcp-use TypeScript API
    Preparing search index...

    Interface CustomOAuthProviderOptions<TUser>

    Options for oauthCustomProvider.

    interface CustomOAuthProviderOptions<TUser> {
        createTokenVerifier: (resource: URL) => OAuthTokenVerifier;
        mapAuthInfo: (authInfo: AuthInfo) => OAuthExtra<TUser>;
        oauthMetadata: { [key: string]: unknown };
        requiredScopes?: readonly string[];
        resource?: string | URL;
        resourceName?: string;
        scopesSupported?: readonly string[];
        serviceDocumentationUrl?: URL;
    }

    Type Parameters

    • TUser

    Hierarchy (View Summary)

    Index
    createTokenVerifier: (resource: URL) => OAuthTokenVerifier

    Creates a verifier bound to the resolved canonical MCP resource.

    mapAuthInfo: (authInfo: AuthInfo) => OAuthExtra<TUser>

    Maps verified SDK auth information into mcp-use callback identity data.

    oauthMetadata: { [key: string]: unknown }

    RFC 8414 metadata for the external authorization server.

    requiredScopes?: readonly string[]

    Endpoint-wide scopes enforced by the SDK bearer gate.

    resource?: string | URL

    Full canonical public MCP endpoint URL.

    resourceName?: string

    Human-readable name advertised by protected-resource metadata.

    scopesSupported?: readonly string[]

    Scopes advertised by protected-resource metadata.

    serviceDocumentationUrl?: URL

    Documentation URL advertised by protected-resource metadata.