Auth0Alternatives
FeaturesOpen SourceSelf-hostedB2BB2CCompare Prices
SubmitSign In

Discover

LatestOpen SourceSelf-hostedB2BB2CAll providers

AI & Agents

MCP AuthorizationAgent IdentitiesToken VaultAI Agent DetectionDevice LoginAll features

Data Residency

🇪🇺European Union🇺🇸United States🇬🇧United Kingdom🇨🇭Switzerland🇦🇺AustraliaAll regions

Compliance

SOC2GDPRISO 27001HIPAAPCI DSSAll compliance
Compare PricesSubmit
/Blog
/MCP Authentication: How OAuth Works for MCP Servers

MCP Authentication: How OAuth Works for MCP Servers

MCP authentication uses OAuth 2.1 for remote MCP servers. The flow step by step, CIMD vs DCR, and which of 37 auth providers can run it for you.

Leonard HußkeLeonard Hußke•Dec 3, 2026•10 min read

MCP authentication. An MCP client such as Claude, ChatGPT or Cursor gets a scoped token from an authorization server, and your MCP server checks the token's audience. 24 of the 37 providers in the directory support MCP authorization, among them Auth0, WorkOS, Descope, Stytch, Scalekit, Clerk, Keycloak and Logto.
On this page
  1. MCP authentication depends on the transport
  2. How MCP authentication works, step by step
  3. Client registration: CIMD first, DCR deprecated
  4. What your MCP server has to check
  5. API keys vs OAuth for MCP servers
  6. Which auth providers support MCP authentication
  7. Pick an MCP authorization provider
  8. FAQ

MCP authentication for a remote MCP server is OAuth 2.1. Your MCP server is an OAuth resource server that only checks access tokens. An authorization server, usually a separate service, signs the user in, asks for consent, and issues a token for your server alone. The MCP client (Claude, ChatGPT, Cursor) finds that authorization server on its own, registers, preferably with a Client ID Metadata Document, and uses PKCE. A local MCP server that runs over stdio skips all of this and reads its credentials from the environment.

You don't have to build the authorization server yourself. Of the 37 auth providers in our directory, 24 support MCP authorization, though some only in beta, on higher plans, or through a separate product. This post explains the flow as the MCP specification defines it in version 2026-07-28, what your server has to check, and which providers support it.

  • Remote MCP servers use OAuth 2.1. The MCP server is the resource server, and an authorization server issues the tokens. Local stdio servers take credentials from the environment.
  • Clients find the authorization server themselves. A 401 response points to the server's Protected Resource Metadata (RFC 9728), which names the authorization server.
  • CIMD replaces Dynamic Client Registration. The 2025-11-25 spec added Client ID Metadata Documents. The 2026-07-28 spec deprecated DCR.
  • Your server must check the audience. It accepts only tokens issued for its own URL and never passes a client's token on to another API.
  • 24 of the 37 providers in our directory support MCP authorization. 17 of them also let MCP clients register without manual setup.

MCP authentication depends on the transport

The MCP specification makes authorization optional, and it splits the rules by transport. Servers on an HTTP-based transport "SHOULD conform" to the authorization spec. Servers on stdio "SHOULD NOT follow this specification, and instead retrieve credentials from the environment."

TransportWhere the server runsHow it authenticatesWho signs in
stdioOn the user's machine, started by the MCP clientAPI keys or tokens in environment variablesNobody. The user pastes a key into the client's config.
Streamable HTTPOn your servers, reached over the internetOAuth 2.1 with an access token on every requestThe user, in a browser, once per client

The rest of this post is about remote servers over HTTP. That is the case where you ship an MCP server for your product and every user connects their own account.

How MCP authentication works, step by step

The spec gives each party one job. "A protected MCP server acts as an OAuth 2.1 resource server", and "an MCP client acts as an OAuth 2.1 client." The authorization server can be a separate service or run inside your app. Either way, it is the part an auth provider can run for you.

MCP authorization flow in nine arrows. The MCP client calls a tool without a token, the MCP server answers 401 with a resource_metadata link, the client reads the Protected Resource Metadata, then the authorization server metadata, sends its client ID as a CIMD URL, pre-registered ID or through DCR, the user signs in and consents with PKCE, the client exchanges the code and verifier with the resource parameter, receives an access token whose audience is the MCP server, and calls the tool with the bearer token.

  1. The client calls your MCP server without a token. Your server answers 401 Unauthorized with a WWW-Authenticate header that contains resource_metadata, the URL of its Protected Resource Metadata.
  2. The client reads that metadata document. It "MUST include the authorization_servers field." If your server sends no header, the client tries the well-known Protected Resource Metadata URLs itself.
  3. The client reads the authorization server's own metadata through OAuth discovery (RFC 8414) or OpenID Connect discovery. Authorization servers must offer at least one of the two, and clients must support both.
  4. The client identifies itself with a client ID. The next section covers the three ways to get one.
  5. The client opens a browser. The user signs in and approves the scopes. PKCE is mandatory, and clients "MUST use the S256 code challenge method when technically capable."
  6. The client exchanges the code and the PKCE verifier for an access token. Both requests carry the resource parameter (RFC 8707) with your MCP server's URL. If the authorization server supports it, the token is then valid for your server only.
  7. The client calls your tools with Authorization: Bearer <token> on every request.

SAML vs OIDC vs OAuth explains the authorization code flow and PKCE in more detail.

Client registration: CIMD first, DCR deprecated

An authorization server only issues tokens to clients it knows. With a normal OAuth app, you register the client by hand in a dashboard. That doesn't work for MCP, because any user can connect any MCP client to any server. The client and the server have never met.

The spec lists three ways for a client to get a client ID, in this order of priority:

MethodHow it worksStatus in the 2026-07-28 spec
Pre-registrationYou create a client ID for a known client, for example your own appClients SHOULD support it
Client ID Metadata Document (CIMD)The client ID is an HTTPS URL. The authorization server fetches the JSON document at that URL to learn the client's name and redirect URIs.Clients and servers SHOULD support it
Dynamic Client Registration (DCR, RFC 7591)The client calls a registration endpoint and receives a new client IDMAY support. Deprecated.

The 2025-11-25 version added CIMD "as a recommended client registration mechanism." The 2026-07-28 version deprecated DCR. It stays in the spec for at least twelve months after that release, and the spec says "new implementations should use Client ID Metadata Documents instead."

The difference matters when you pick a provider. With DCR, every user who connects a client can create a new client record in your tenant. With CIMD, one client such as Claude has one URL as its client ID, and your authorization server can decide which URLs it trusts. If your provider supports only DCR, it still works with today's clients, but check its plans for CIMD.

What your MCP server has to check

Your MCP server never sees a password. It receives a bearer token and decides whether to run the tool. The spec sets these rules for that decision:

  • Check the audience. Servers "MUST validate that access tokens were issued specifically for them as the intended audience." Your server rejects a token for another API, even one from the same authorization server.
  • Don't pass the token through. "The MCP server MUST NOT pass through the token it received from the MCP client." If your tool calls another API, get a separate token for that API, for example through OAuth token exchange. A token passed on would make the other API trust a token that was never issued for it.
  • Ask for missing scopes. If the token lacks a scope a tool needs, answer 403 with error="insufficient_scope" and the scopes required. The client can then ask the user to approve more access.
  • Check the issuer. Authorization servers should return the iss parameter with the code (RFC 9207), and clients must check it. This version also requires clients to store credentials per issuer and not reuse them across authorization servers.

Scopes decide which tools a client can call. If you need more than scopes, for example "this agent may read only the documents this user owns", you need fine-grained authorization. RBAC vs ABAC vs ReBAC compares the models. Authentication vs authorization explains why the token check and the permission check are two separate steps.

API keys vs OAuth for MCP servers

Some MCP servers accept an API key in a header. That is simpler to build, and some providers use it. In our listings, Kinde's MCP support uses API keys instead of OAuth.

API keyOAuth 2.1
Setup for the userCreate a key, paste it into the client's configClick "Connect", sign in, approve
Works with clients that only support the spec's flow
No
Yes
Scoped per clientOnly if you build itYes, through scopes and consent
Revoke one clientDelete its keyRevoke its grant or token
ExpiresWhen you delete itShort-lived access tokens, refresh tokens
FitsInternal tools, stdio servers, scriptsPublic MCP servers that your customers connect to

Use API keys for stdio servers and internal tools. Use OAuth for a public MCP server that your customers connect to from Claude or ChatGPT. A user doesn't have to copy a secret, and you can see and revoke each client's access.

Which auth providers support MCP authentication

Our directory tracks eight AI and agent features for each of its 37 providers. MCP authorization means the provider can act as the authorization server for your MCP server, in some cases only in beta, on a higher plan, or through a separate product. Agent client registration means MCP clients can register on their own through CIMD or DCR.

AI and agent features across 37 auth providers

Number of providers in the Auth0Alternatives directory that support each feature, December 2026

  • Developer MCP server28
  • Third-party app and agent access28
  • MCP authorization24
  • Agent client registration19
  • Agent identities17
  • Token vault17
  • Delegated token exchange12
  • Human-in-the-loop approval11

Source: Auth0Alternatives listings

Show data
Providers (of 37)
Developer MCP server28
Third-party app and agent access28
MCP authorization24
Agent client registration19
Agent identities17
Token vault17
Delegated token exchange12
Human-in-the-loop approval11

Download this chart

You're welcome to use it in articles, reports and presentations. In return, please credit Auth0Alternativeswith a link to the article it comes from.

Attribution to use with the chart

Source: <a href="https://www.auth0alternatives.com/blog/mcp-authentication">Auth0Alternatives</a> by Auth0Alternatives

24 providers support MCP authorization, and 17 of them also support agent client registration. Open source is close behind. 9 of the 15 open-source providers support MCP authorization, and 15 of the 22 proprietary ones do.

Managed providers

ProviderMCP authorizationClient registrationFree tierCompare
Auth0
Yes
CIMD and DCR25,000 MAU, 2 Token Vault connectionsWorkOS vs Auth0
WorkOS
Yes
CIMD and DCR, turned on in the dashboard1 million MAU of AuthKitWorkOS vs Auth0
Descope
Yes
CIMD and DCR7,500 MAU and 2,000 monthly active consentsDescope vs Auth0
Stytch
Yes
DCR10,000 monthly active users and AI agentsStytch vs Auth0
Scalekit
Yes
CIMD, DCR and pre-registeredFree plan, MCP Auth included from SaaSKit Growth at $99 a monthScalekit vs Auth0
Clerk
Yes
CIMD50,000 monthly retained users per appClerk vs Auth0
Amazon CognitoOnly with AWS AgentCore Gateway
No
10,000 MAU

Auth0 sells its AI features as the Auth0 for AI Agents add-on. Auth0's pricing page says it "adds 50% to the base price (rounded up to the dollar)." The free plan has 25,000 MAU and includes 2 Token Vault connections. Auth0's MCP docs document both CIMD and DCR and recommend CIMD for production.

WorkOS describes AuthKit as "a spec-compatible OAuth authorization server". In its MCP guide, you turn on CIMD in the dashboard, and DCR for older clients. AuthKit is free for the first million MAU, and WorkOS lists no separate charge for MCP.

Descope meters MCP use. Its free plan includes 2,000 monthly active consents, which Descope counts for MCP authentication. Paid plans start at $249 a month.

Stytch supports DCR through its Connected Apps product, and its free tier counts users and AI agents together up to 10,000. Clerk turns on CIMD when you allow public clients in its dashboard. Scalekit includes MCP Auth in SaaSKit Growth at $99 a month.

Amazon Cognito has no consent screen or client registration of its own. It works for MCP only together with AWS AgentCore Gateway. AgentCore Identity costs $0.010 per 1,000 tokens or API keys requested, and nothing extra through AgentCore Runtime or Gateway. Okta supports MCP through Cross App Access, where an admin connects each AI client. The Okta Dynamic Client Registration API needs an admin token, so clients can't register on their own. Okta competitors covers the wider choice.

Open-source and self-hosted providers

ProviderMCP authorizationClient registrationNote from our listingsCompare
Keycloak
Yes
DCR, CIMD experimentalNewer versions of the MCP spec are experimentalKeycloak vs Auth0
Logto
Yes
CIMDSupports CIMD only, not DCRLogto vs Keycloak
Better Auth
Yes
Yes
Better Auth vs Auth0
Casdoor
Yes
Yes
Authgear
Yes
Yes
Ory
Yes
DCRSupports DCR only, not CIMD
Zitadel
Yes
DCRIgnores the resource parameter that MCP requires
Supabase AuthBetaDCRYou build the consent screen yourself
SuperTokensBetaDCRNode.js only, a paid feature on the managed service

Zitadel's gap matters for the audience check. Without the resource parameter, the token's audience isn't your MCP server, so your server has to validate tokens another way. If you want an open-source server that follows the current spec, look at Logto, Better Auth, or Keycloak with its experimental CIMD support. Keycloak alternatives compares the self-hosted servers.

If you run on Cloudflare Workers, Cloudflare's workers-oauth-provider library adds an OAuth 2.1 authorization server to a remote MCP server. It supports pre-registered clients, CIMD, and DCR. You then build the sign-in and the user store yourself.

Pick an MCP authorization provider

If you already use an auth provider for your app, check its row in the tables first. Your MCP server should use the same user accounts as your app, so the provider you have is usually the right one.

If you are choosing now, pick WorkOS for B2B apps that also need enterprise SSO, because AuthKit is free up to a million MAU. Pick Auth0 for a broad set of agent features, including Token Vault and human-in-the-loop approval, and budget for the 50% add-on. Pick Descope or Scalekit if MCP and agents are the center of your product. Pick Logto or Better Auth if you want to host it yourself and follow the current spec.

The MCP authorization page lists every provider with its notes, and the Token vault page shows who can store your users' tokens for other APIs.

FAQ

No. The MCP specification makes authorization optional. Servers on an HTTP transport should follow the spec's OAuth 2.1 flow if they protect anything. Local servers on stdio should take their credentials from environment variables.

OAuth 2.1. The spec says the MCP server "acts as an OAuth 2.1 resource server." Clients use the authorization code flow with mandatory PKCE (S256). The spec also uses OAuth 2.0 extensions such as Protected Resource Metadata (RFC 9728) and Resource Indicators (RFC 8707).

CIMD stands for Client ID Metadata Document. The client's ID is an HTTPS URL, and the JSON document at that URL lists the client's name and redirect URIs. The authorization server fetches it when the client first connects. MCP made CIMD the recommended way to register clients in version 2025-11-25.

Yes, but it is deprecated since spec version 2026-07-28. DCR stays in the spec for at least twelve months after that release. New implementations should use Client ID Metadata Documents. In our listings, Ory, Zitadel, Supabase Auth, and SuperTokens support only DCR today.

Yes. Auth0 can be the authorization server for an MCP server and supports both CIMD and DCR. Its AI features are part of the Auth0 for AI Agents add-on, which adds 50% to the base price of a paid plan.

Yes, for local stdio servers and internal tools. For a public MCP server, use OAuth. Clients such as Claude and ChatGPT follow the spec's OAuth flow, users don't have to copy secrets, and you can scope and revoke each client's access.

Share:

On this page

  1. MCP authentication depends on the transport
  2. How MCP authentication works, step by step
  3. Client registration: CIMD first, DCR deprecated
  4. What your MCP server has to check
  5. API keys vs OAuth for MCP servers
  6. Which auth providers support MCP authentication
  7. Pick an MCP authorization provider
  8. FAQ
Favicon

 

  
 
Subscribe to our newsletter

Join other CTOs and engineers to get the latest news and to keep your apps secure.

Browse:Open SourceSelf-hostedB2BB2CFeaturesComplianceData ResidencyAuth Pricing CalculatorSSO Pricing by ProviderMFA Pricing by Provider
Quick Links:Contact UsSubmitBlogAbout Us
Built withDirstarter
Auth0Alternatives
FeaturesOpen SourceSelf-hostedB2BB2CCompare Prices
SubmitSign In

Discover

LatestOpen SourceSelf-hostedB2BB2CAll providers

AI & Agents

MCP AuthorizationAgent IdentitiesToken VaultAI Agent DetectionDevice LoginAll features

Data Residency

🇪🇺European Union🇺🇸United States🇬🇧United Kingdom🇨🇭Switzerland🇦🇺AustraliaAll regions

Compliance

SOC2GDPRISO 27001HIPAAPCI DSSAll compliance
Compare PricesSubmit
Ad
Favicon of DescopeDescope
Drag & Drop Your Auth. Add secure, frictionless authentication journeys for your customers, partners, and AI agents.
Visit Descope
Ad
Favicon of AuthsignalAuthsignal
You might not need to replace your auth provider. Add passkeys, adaptive MFA, and a no-code orchestration engine on top of the identity stack you already run.
Visit Authsignal
Popular Auth0 Comparisons:
Engity vs Auth0
Amazon Cognito vs Auth0
Entra External ID vs Auth0
Firebase Authentication vs Auth0
Clerk vs Auth0
WorkOS vs Auth0
Frontegg vs Auth0
FusionAuth vs Auth0
Supabase Auth vs Auth0
Auth.js vs Auth0
Ory vs Auth0
SuperTokens vs Auth0
Logto vs Auth0
Hanko vs Auth0
Hexclave vs Auth0
Authress vs Auth0
Popular WorkOS Comparisons:
Engity vs WorkOS
Auth0 vs WorkOS
Amazon Cognito vs WorkOS
Entra External ID vs WorkOS
Firebase Authentication vs WorkOS
Clerk vs WorkOS
Frontegg vs WorkOS
FusionAuth vs WorkOS
Supabase Auth vs WorkOS
Auth.js vs WorkOS
Ory vs WorkOS
SuperTokens vs WorkOS
Logto vs WorkOS
Hanko vs WorkOS
Hexclave vs WorkOS
Authress vs WorkOS