Skip to content
AdminKit

OAuth for MCP

What is OAuth for MCP?

The Model Context Protocol's authorization specification defines how an MCP client authenticates to a server using OAuth 2.1, rather than an ad hoc scheme, and explicitly warns against naive token passthrough between services. The AdminKit MCP & Agent Gateway, which Netbase deploys and runs for customers, enforces OAuth per this specification.

By AdminKit team, Netbase JSC · Updated

The Model Context Protocol’s authorization specification defines how an MCP client obtains and presents credentials to an MCP server using OAuth 2.1, rather than leaving every implementer to invent its own authentication scheme. An MCP server acting as an OAuth resource server can require a client to complete an authorization flow before it will serve a request, and the specification’s security guidance specifically warns against naive “token passthrough” — forwarding a token issued for one service straight through to another — since a token isn’t guaranteed to be valid for the second service’s intended audience, a failure mode related to the confused deputy problem. Because MCP servers are increasingly exposed to agents acting with real tool access, following this specification rather than skipping authorization, or implementing it incorrectly, is what actually determines whether a server’s tools are protected from unauthorized callers. The access tokens this flow issues are very often JWTs, whose signed audience claim is exactly the field a server needs to check to catch token passthrough, verified against the issuing authorization server’s JWKS rather than a key shared out of band. The specification requires a server to publish OAuth 2.0 Protected Resource Metadata, defined in RFC 9728, so an unfamiliar client can discover which authorization server to use, and to support Dynamic Client Registration so that client can obtain its own credentials without a human provisioning them in advance. OAuth 2.1, which this specification is built on, also makes PKCE mandatory for every client in the authorization code flow, closing a code-interception gap that exists independently of the token-audience checks above. The oauth.net overview of OAuth 2.1 lists that PKCE requirement first among its differences from OAuth 2.0, alongside exact string matching for redirect URIs and dropping the Implicit and Resource Owner Password Credentials grants. The MCP server authentication checklist turns these requirements into a step-by-step review for a server you run.

OAuth for MCP is part of AdminKit’s AI agents & MCP cluster; the full AdminKit glossary lists other related terms.

Frequently asked questions

What does the MCP authorization specification require clients to use?

OAuth 2.1, rather than leaving every implementer to invent its own authentication scheme.

What is token passthrough, and why does the spec warn against it?

Forwarding a token issued for one service straight through to another -- a failure mode related to the confused deputy problem, since the token isn't guaranteed to be valid for the second service's intended audience.

How does a server check for token passthrough?

By verifying the signed audience claim on JWT access tokens against the issuing authorization server's JWKS, rather than a key shared out of band.

Does OAuth 2.1 make PKCE mandatory for MCP clients?

Yes -- OAuth 2.1 requires PKCE for every client in the authorization code flow, closing a code-interception gap.