MCP authorization explained: how AI agents get OAuth tokens for tools
Reviewed 2026-11-10 · Editorial assessment by the editors
By the editors · Published 2026-09-22 · 6 min read
The MCP authorization spec makes a protected MCP server an OAuth 2.1 resource server and leaves token issuing to a separate authorization server, which in a company is usually the identity provider. Clients must use PKCE and name the server they want a token for, and servers must reject tokens issued for anyone else.
What does the MCP authorization spec cover?
The Model Context Protocol lets an AI application call tools and data sources through MCP servers. Its authorization section, in the specification version dated 2025-11-25, defines how an MCP client gets permission to call a protected MCP server over HTTP.
Authorization is optional in MCP. Implementations that use an HTTP transport should follow the spec; servers that talk to a local client over standard input and output should not, and take credentials from the environment instead. The spec builds on existing standards rather than new ones: OAuth 2.1 (still an IETF draft), OAuth 2.0 Authorization Server Metadata (RFC 8414), Dynamic Client Registration (RFC 7591), Protected Resource Metadata (RFC 9728) and the OAuth Client ID Metadata Document draft.
Who plays which role?
- The MCP server acts as an OAuth 2.1 resource server. It accepts requests that carry access tokens.
- The MCP client, the AI application or agent, acts as an OAuth 2.1 client and makes requests on behalf of a resource owner, usually a person.
- The authorization server interacts with the user where needed and issues the tokens. The spec leaves its implementation out of scope and allows it to be hosted with the MCP server or separately.
For a company, that separate authorization server is where an identity provider such as Okta, Microsoft Entra ID or Ping Identity comes in. See AI agent identity in the glossary.
How does a client find the authorization server?
Discovery starts with a refusal. A client calls the MCP server without a token and receives HTTP 401. The server must publish Protected Resource Metadata under RFC 9728, either pointed to from the WWW-Authenticate header of that 401 or at a well-known URI, and that document must name at least one authorization server.
The client then reads the authorization server's own metadata, trying OAuth 2.0 Authorization Server Metadata and OpenID Connect Discovery endpoints in a set order. The server should also state in the 401 response which scopes it needs, so the client asks only for what the request requires.
How does a client register with the authorization server?
The spec lists the options in priority order for clients that support all of them: use pre-registered client details if the client has them; use a Client ID Metadata Document, where the client identifier is an HTTPS URL pointing to a JSON description of the client, if the authorization server advertises support; fall back to Dynamic Client Registration, which the spec keeps for backwards compatibility; and if none of these is available, ask the user to enter client details.
For an identity team the choice decides how much control you keep over which agents can ask for tokens at all. Pre-registration gives the most control. For metadata documents, the spec allows authorization servers to apply trust policies such as allowlists of trusted domains.
Which rules protect the token?
Five requirements matter most to an identity team:
- PKCE: clients must use PKCE, with the S256 method when technically capable, and must refuse to continue if the authorization server's metadata does not show PKCE support.
- Resource indicators: clients must send the resource parameter from RFC 8707 in both the authorization request and the token request, naming the canonical URI of the MCP server.
- Audience checks: MCP servers must accept only tokens issued for themselves and reject the rest.
- No passthrough: an MCP server that calls an upstream API must use a separate token for that API and must not forward the token it received.
- Lifetimes: authorization servers should issue short-lived access tokens, and must rotate refresh tokens for public clients.
When a token lacks a needed scope, the server should answer 403 with insufficient_scope and the scopes required, and a client acting for a user should run a step-up authorization with the larger scope set.
How do identity vendors describe their agent products?
The MCP spec has no certification programme, and none of the vendors below claims one. What they publish:
- Microsoft lists the Entra Agent ID platform as generally available in April 2026 in its what's new log, describing an identity and authorization framework for AI agents that uses standard protocols such as OAuth 2.0, MCP and A2A.
- Okta announced on 22 September 2026 that Agent SSO, which issues short-lived tokens, is generally available, and that Agent Gateway, which sits between an agent and its tool calls to enforce policy, was planned for general availability in Q3; the release does not say whether that is a fiscal or calendar quarter.
- Ping Identity announced Programmable Identity, with MCP, CLI and API access, on 27 May 2026, and Enterprise Personal Agent Access for personal agents such as Claude on 1 September 2026.
- NewCore describes Agent Guardian as providing "short-lived scoped credentials, real-time policy per call, and every action tied to a human", and lists an MCP gateway path.
These are vendor descriptions from public pages, not tested behaviour. The AI agents comparison calls the Okta and Entra ID products against each other.
What should you ask a vendor?
- Can your authorization server act as the authorization server for our MCP servers, and does its metadata advertise PKCE with S256?
- Do you honour the RFC 8707 resource parameter and put the MCP server in the token audience?
- Which client registration methods do you support: pre-registration, Client ID Metadata Documents, Dynamic Client Registration?
- How short can access tokens be, and are refresh tokens rotated?
- Can every agent token be traced to a person, and can one agent's tokens be revoked without ending that person's own sessions?