mcp-use TypeScript API
    Preparing search index...

    Interface NodeOAuthOptions

    Configures OAuth authorization for Node.js and CLI clients.

    interface NodeOAuthOptions {
        allowClientSecret?: boolean;
        authTimeoutMs?: number;
        baseDir?: string;
        callbackUrl?: string;
        clientMetadataUrl?: string;
        clientName?: string;
        clientUri?: string;
        kvStore?: KVStore;
        logoUri?: string;
        openBrowser?: (url: string) => void | Promise<void>;
        portRange?: number;
        preferredPort?: number;
        scope?: string;
        storageKeyPrefix?: string;
    }

    Hierarchy

    • OAuthSessionStoreOptions
      • NodeOAuthOptions
    Index
    allowClientSecret?: boolean

    Whether this platform may persist confidential-client credentials.

    authTimeoutMs?: number

    Loopback wait timeout. Default 5 minutes.

    baseDir?: string

    Override the on-disk store directory (mostly for tests).

    callbackUrl?: string

    OAuth redirect URI.

    clientMetadataUrl?: string

    OAuth Client ID Metadata Document URL.

    clientName?: string

    Human-readable OAuth client name.

    clientUri?: string

    Public website describing the OAuth client.

    kvStore?: KVStore

    Override KV store entirely (mostly for tests).

    logoUri?: string

    Public OAuth client logo URL.

    openBrowser?: (url: string) => void | Promise<void>

    Suppress the default open(url) browser launch (test hook).

    portRange?: number

    Number of consecutive loopback ports to try. Defaults to 10.

    preferredPort?: number

    Preferred loopback port. Default 33418. Walks up by portRange on EADDRINUSE.

    scope?: string

    OAuth scope string forwarded to the SDK via clientMetadata.scope.

    storageKeyPrefix?: string

    Prefix used for persisted OAuth keys.