Skip to main content

fastmcp.server.auth.providers.auth0

Auth0 OAuth providers for FastMCP. This module provides two Auth0 integrations:
  • Auth0Provider — OAuth proxy for fixed Auth0 application credentials
  • Auth0MCPProvider — resource server for Auth0 Auth for MCP (DCR/CIMD)
Example (OAuth proxy):
Example (Auth for MCP):

Classes

Auth0Provider

An Auth0 provider implementation for FastMCP. This provider is a complete Auth0 integration that’s ready to use with just the configuration URL, client ID, client secret, audience, and base URL.

Auth0JWTVerifier

JWT verifier for Auth0 MCP access tokens. Auth0’s rfc9068_profile_authz token dialect exposes API permissions in the permissions claim. Standard OAuth scope/scp claims are checked first; permissions is included when present.

Auth0MCPProvider

Auth0 resource server provider for Auth for MCP (DCR/CIMD). FastMCP validates access tokens issued by Auth0 while Auth0 handles OAuth, dynamic client registration, and CIMD approval in the tenant dashboard. Enable the Resource Parameter Compatibility Profile in Auth0 and create an API whose identifier matches this server’s resource URL (logged at startup). Methods:

set_mcp_path

Bind the default verifier’s audience to this server’s resource URL.

get_routes

Protected resource routes plus Auth0 authorization server metadata.