On this page8 sections
  1. The short answer
  2. Which revision this covers
  3. Who is who in MCP authorization
  4. The building blocks
  5. The MCP OAuth flow, step by step
  6. MCP authentication checklist
  7. How PopMCP handles the two hops
  8. FAQ

MCP OAuth: the short answer

MCP OAuth is OAuth 2.1 with a few strict rules. The MCP server tells the client where its authorization server is. The client signs the user in with PKCE and asks for a token for that one server. The server checks the token was issued for it and never forwards it upstream. Local stdio servers skip this.

Which revision this covers

This post follows the MCP authorization spec, revision 2026-07-28. That was the latest revision on modelcontextprotocol.io on 5 October 2026. Where it differs from the previous revision, 2025-11-25, the text says so.

Authorization is optional in MCP. An HTTP server that adds it should follow this spec. A stdio server should not: it reads credentials from its environment. Remote vs local MCP servers explains the two transports, and Model Context Protocol covers the protocol as a whole.

Who is who in MCP authorization

The spec maps MCP onto standard OAuth roles.

OAuth roleIn MCPExample
Resource serverThe MCP serverhttps://mcp.example.com/mcp
ClientThe AI appClaude, ChatGPT, Cursor
Authorization serverSigns the user in and issues tokensHosted with the MCP server, or a separate service
Resource ownerYouThe person who clicks "Allow"

The building blocks

OAuth 2.1

OAuth 2.1 is an IETF draft that folds OAuth 2.0 and its later security fixes into one document. It drops the implicit grant and the password grant, and it requires PKCE for the authorization code flow. The MCP spec says authorization servers must implement it.

PKCE

PKCE (Proof Key for Code Exchange) makes a stolen authorization code useless. The client invents a secret and sends a hash of it with the sign-in request. It reveals the secret when it trades the code for a token.

MCP clients must use PKCE, with the S256 method whenever they are able to. They must also check the auth server's metadata first. If code_challenge_methods_supported is missing, the client must stop.

Protected resource metadata (RFC 9728)

This is how the client finds the auth server. The MCP server must publish a JSON document whose authorization_servers field lists at least one. It must point to that document in at least one of two ways, and clients must support both:

  • a resource_metadata URL in the WWW-Authenticate header of a 401 response
  • a well-known path, /.well-known/oauth-protected-resource, at the root or with the MCP endpoint's path appended

The client then fetches the auth server's own metadata, through RFC 8414 or OpenID Connect Discovery. It must reject a document whose issuer does not match the URL it asked.

Resource indicators (RFC 8707)

The client must send a resource parameter that names the MCP server, for example https://mcp.example.com/mcp. It goes on both the authorization request and the token request, even if the auth server ignores it.

The server does its half by rejecting any token that was not issued for it. Together, the two mean a token for server A should be refused by server B. The spec adds a caveat: the binding only holds when the auth server supports resource indicators.

Client registration

The auth server needs to know which app is asking. The spec gives three methods.

MethodHow it worksStatus in 2026-07-28
Pre-registrationA client ID agreed in advance, built into the client or typed in by the userUsed first when the client has one
Client ID Metadata Documents (CIMD)The client ID is an HTTPS URL. The auth server fetches a JSON file there that lists client_id, client_name and redirect_urisRecommended (SHOULD). Used when the auth server advertises client_id_metadata_document_supported
Dynamic Client Registration (DCR, RFC 7591)The client POSTs its details to the auth server's registration endpoint and gets an ID backOptional (MAY) and deprecated. Kept for auth servers that lack CIMD

A client that supports all three should try them in that order. If none works, it asks the user to enter client details.

DCR was already optional in 2025-11-25, which described it as a backwards-compatibility option. The 2026-07-28 revision formally deprecates it. Under the spec's new lifecycle policy, a deprecated feature stays for at least twelve months.

CIMD suits MCP because most clients and servers have never met. A URL-based ID lets an auth server check a client's name and redirect URIs with no sign-up step.

No token passthrough

An MCP server usually calls another API on your behalf. The spec keeps the two hops apart:

  • The server accepts only tokens issued for it.
  • It must not pass the client's token to the upstream API.
  • Upstream, it uses a separate token issued by that API's authorization server.

MCP security best practices covers what goes wrong when a server ignores this.

The MCP OAuth flow, step by step

  1. AI client to MCP serverRequest with no token
  2. MCP server to AI client401 + WWW-Authenticate (resource_metadata)
  3. AI client to MCP serverGET protected resource metadata
  4. MCP server to AI clientList of auth servers
  5. AI client to Auth serverGET auth server metadata
  6. Auth server to AI clientEndpoints, PKCE methods, registration options
  7. Pick client ID (pre-registered, CIMD URL, or DCR)
  8. Create PKCE pair, record expected issuer
  9. AI client to You (browser)Open sign-in URL (PKCE challenge + resource)
  10. You (browser) to Auth serverSign in and approve scopes
  11. Auth server to You (browser)Redirect with code (and iss)
  12. You (browser) to AI clientCode
  13. Check iss against the recorded issuer
  14. AI client to Auth serverToken request (code + PKCE verifier + resource)
  15. Auth server to AI clientAccess token (+ refresh token)
  16. AI client to MCP serverMCP request, Authorization: Bearer token
  17. Check the token was issued for this server
  18. MCP server to AI clientResult
The MCP authorization flow in revision 2026-07-28, with client registration shown as one step.

Three details from the spec text:

  • The issuer check is new in 2026-07-28. Auth servers should add an iss parameter to the redirect (RFC 9207). The client must compare a returned iss with the issuer it recorded before the redirect, and it must do so before sending the code anywhere. If the metadata says the server supports iss and none comes back, the client rejects the response. This blocks mix-up attacks, where one auth server tricks a client into handing over a code issued by another. PKCE alone does not stop them.
  • Step-up scopes. A server can answer a call with 403 and insufficient_scope, naming the scopes that call needs. The client re-authorizes with those added to what it already asked for, so first-time consent stays small. This was already in 2025-11-25.
  • The token travels in a header. Every request carries it in Authorization. It must never go in the URL query string.

MCP authentication checklist

If you build an MCP server:

  • Publish protected resource metadata that lists at least one authorization server.
  • Return 401 with a resource_metadata URL. Add a scope value that covers only what the request needs.
  • Validate each token's audience. Answer 401 for anything invalid or expired.
  • Never forward the client's token upstream.
  • If you proxy a third-party API with one static client ID, get consent per client before you redirect.
  • Keep scopes_supported to the minimum, and use step-up challenges for the rest.

If you build or choose an MCP client:

  • Use PKCE with S256. Refuse auth servers that do not advertise PKCE.
  • Send resource on the authorization request and the token request.
  • Support CIMD, and fall back to DCR only where the auth server lacks it.
  • Check iss before you redeem the code.
  • Store client credentials per auth server, keyed by its issuer. The 2026-07-28 revision spells this out as a MUST.
  • Keep tokens out of URLs.

How PopMCP handles the two hops

Connecting an AI client to a business tool takes two authorizations. The AI client needs access to the MCP server. The MCP server needs access to the provider, such as Shopify or Xero. PopMCP keeps the two apart.

Held byUsed for
Provider credential (for example your Shopify authorization)PopMCP only, encrypted at rest with AES-256-GCMCalling the provider's API
PopMCP OAuth sign-inYour AI clientCalling PopMCP

For the first hop, the endpoint https://app.popmcp.com/mcp runs the discovery flow described above. It serves protected resource metadata (RFC 9728) and authorization server metadata (RFC 8414). It uses the authorization code flow with PKCE S256, and clients register through DCR. You paste the URL into your client, sign in with Google or an email code, and tick the connectors that client may reach. There is no token to copy from a dashboard.

For the second hop, the provider credential never reaches the AI client. If a laptop or a client config file leaks, the Shopify or Xero credential is not in it.

Where it stops short of the current spec:

  • PopMCP negotiates MCP revisions up to 2025-11-25. It does not implement 2026-07-28.
  • It does not support Client ID Metadata Documents. Registration is DCR, the method 2026-07-28 deprecates but keeps for backwards compatibility.
  • It speaks Streamable HTTP only. The older SSE transport is not supported.
  • There is no screen for withdrawing one client's grant. To cut access you remove the member, disconnect the connector, or run consent again with fewer connectors ticked.

The MCP server catalog lists the providers you can connect this way.

Frequently asked questions

Does MCP use OAuth?

Yes, for remote servers over HTTP. The MCP authorization spec is built on OAuth 2.1 with PKCE. It is optional, so a public server can run with no sign-in at all. Local stdio servers take credentials from environment variables.

What OAuth version does MCP require?

OAuth 2.1, in the form of IETF draft 13. The spec also builds on RFC 9728 for resource metadata, RFC 8707 for resource indicators, RFC 9207 for the issuer check, and RFC 8414 or OpenID Connect Discovery for auth server metadata.

Is dynamic client registration still used in MCP?

It still works. The 2026-07-28 revision marks it deprecated and points new implementations to Client ID Metadata Documents. It stays in the spec for auth servers that do not support CIMD, and a client should try it only after pre-registration and CIMD.

What is a Client ID Metadata Document?

It is a JSON file served at an HTTPS URL, and that URL is the client ID. The file must contain client_id, client_name and redirect_uris. The auth server fetches it and checks the redirect URI in the request against the list.

Why can't an MCP server pass my token to the API?

The token was issued for the MCP server, not for the API behind it. Forwarding it lets a caller skip the server's own checks and leaves the API's logs pointing at the wrong party. The server must get its own token for the upstream API.

What is the difference between MCP authentication and MCP authorization?

Authentication proves who you are, and it happens on the auth server's sign-in page. Authorization decides what the client may do afterwards, through the scopes attached to the access token. How the auth server signs you in is outside the MCP spec.

Sources

12 references, checked 5 October 2026
  1. MCP authorization (revision 2026-07-28)modelcontextprotocol.io
  2. MCP authorization server discovery (2026-07-28)modelcontextprotocol.io
  3. MCP client registration (2026-07-28)modelcontextprotocol.io
  4. MCP authorization security considerations (2026-07-28)modelcontextprotocol.io
  5. MCP 2026-07-28 changelog (iss check, DCR deprecation, deprecation policy)modelcontextprotocol.io
  6. MCP authorization (revision 2025-11-25, for comparison)modelcontextprotocol.io
  7. MCP security best practicesmodelcontextprotocol.io
  8. OAuth 2.1, IETF draft 13datatracker.ietf.org
  9. RFC 9728, OAuth 2.0 Protected Resource Metadatadatatracker.ietf.org
  10. RFC 8707, Resource Indicators for OAuth 2.0rfc-editor.org
  11. RFC 9207, OAuth 2.0 Authorization Server Issuer Identificationdatatracker.ietf.org
  12. OAuth Client ID Metadata Document, IETF draft 00datatracker.ietf.org