Skip to main content

fastmcp.server.auth.providers.descope

Descope authentication provider for FastMCP. This module provides DescopeProvider - a complete authentication solution that integrates with Descope’s OAuth 2.1 and OpenID Connect services, supporting Dynamic Client Registration (DCR) for seamless MCP client authentication.

Classes

DescopeProvider

Descope metadata provider for Dynamic Client Registration (DCR). The provider accepts either a resource-specific Descope MCP Server URL such as /v1/apps/agentic/P.../M.../.well-known/openid-configuration or a project-level inbound app URL such as /v1/apps/P.../.well-known/openid-configuration. When neither scopes_supported nor required_scopes is provided, advertised scopes are discovered lazily from the OpenID configuration. Use scopes_supported and required_scopes together when the scopes clients should request differ from the scopes enforced during token validation. See Descope’s inbound app documentation for DCR setup instructions. Methods:

get_routes