Skip to main content
Use the Auth0 provider when Auth0 is your OAuth authorization server. MCP clients register directly with Auth0 through Dynamic Client Registration, and your MCP server verifies Auth0 access tokens on incoming MCP requests. This guide covers the Auth0 setup path. Use the auth providers API reference for exact oauthAuth0Provider() options, environment variable fallbacks, defaults, and errors.

Configure Auth0

In the Auth0 Dashboard, configure the tenant for MCP clients.
  1. Go to Settings > Advanced and enable Resource Parameter Compatibility Profile.
  2. Promote the login connections that MCP clients may use to domain-level connections.
  3. Create an API for your MCP server.
Use the Auth0 CLI to promote a connection when needed:
Create an API with an identifier that you will use as the provider audience:
Use the rfc9068_profile_authz token dialect when your tools need Auth0 permissions in access tokens.

Set environment variables

The domain is your Auth0 tenant domain. The audience must match the API identifier you created.

Configure the MCP server

You can pass domain and audience directly instead of using environment variables:

Use Auth0 permissions in tools

Auth0 permissions are available on ctx.auth.permissions when they are present in the access token.
Use User Context for broader access-control patterns.

Verify the setup

Run the server and connect with an OAuth-capable MCP client.
Confirm these cases:
  • The client discovers your server’s OAuth metadata.
  • The client registers with Auth0 and completes login.
  • Authenticated tool calls include ctx.auth.
  • Tool calls without a valid bearer token are rejected.

Next steps

Runnable Auth0 example

Compare your setup with a working mcp-use Auth0 server.

Auth0 MCP Authorization Guide

Review Auth0’s MCP authorization setup.

User Context

Read Auth0 user and permission data inside tools.

Auth0 provider API reference

Look up exact provider options and defaults.