descopeProvider wires authentication through a Descope MCP Server, so your tools receive a signed-in Descope user.
Example
server.ts
Signature
Parameters
opts
-
urlis the MCP Server’s Discovery URL (its Issuer) from the console’s Connection Information, for examplehttps://api.descope.com/v1/apps/agentic/<projectId>/<mcpServerId>, or your custom domain. -
audiencedefaults to the Project ID parsed from the/agentic/<projectId>/<mcpServerId>segment ofurl(Descope binds the token’saudto[DCR client id, project id]). Ifurllacks that segment, such as a custom domain, passaudienceexplicitly or the server throws at startup.
CustomProviderOptions options: baseUrl, serverUrl, scopes, requiredScopes, and metadataOverrides.
Requires Dynamic Client Registration enabled on the MCP Server. With DCR disabled and the Alpic DCR proxy, use customProvider with serverUrl instead.
Returns
APromise for the OAuthConfig you pass to the oauth constructor option.
Connect an Identity Provider
Set up sign-in with a hosted provider
Authenticate Users
Add sign-in to your app end to end
customProvider
Wire OAuth from any IdP’s discovery document