mcp-use TypeScript API
    Preparing search index...

    Type Alias ServerConfig<TUser>

    ServerConfig: BaseServerConfig & (
        [TUser] extends [never]
            ? { oauth?: undefined }
            : { oauth: OAuthProvider<TUser> }
    )

    Server identity and behavior, passed to new MCPServer(...).

    A user type other than never requires an OAuth provider, preventing a callback from declaring authenticated context without authentication at runtime. Omitting the type keeps the no-OAuth API ergonomic.

    Type Parameters

    • TUser = never