---
title: How does MCP authorization work?
url: https://opencontroller.lyzr.com/blog/how-mcp-authorization-works
published: 2026-11-12
updated: 2026-11-12
author: Lyzr
---

# How does MCP authorization work?

**MCP authorization is standard OAuth: the MCP server is an OAuth 2.1 resource server, the MCP client is an OAuth client, and a separate authorization server issues tokens. The client discovers that authorization server from the MCP server's Protected Resource Metadata (RFC 9728), gets a token bound to that one server with a resource indicator (RFC 8707), and sends it on every HTTP request. Authorization is optional in the spec and applies to HTTP transports only; local stdio servers take credentials from the environment instead.**

This post walks through the flow as defined in the current MCP specification revision (2026-07-28), what changed from the 2025-11-25 revision, and what it means for an enterprise identity team.

## Who plays which role in MCP authorization?

| Role | In MCP terms | What it must do |
|---|---|---|
| Resource server | The MCP server | Publish Protected Resource Metadata; validate every token's audience; return 401 or 403 with a `WWW-Authenticate` header |
| Client | The MCP client inside the agent, IDE or chat app | Discover the authorization server, use PKCE, send the `resource` parameter, attach `Authorization: Bearer` on every request |
| Authorization server | Your IdP or a dedicated OAuth server | Implement OAuth 2.1; publish RFC 8414 or OpenID Connect Discovery metadata; issue audience-bound tokens |
| Resource owner | The user (or the organisation, for machine clients) | Consents to scopes |

The key design choice: the MCP server does not have to be its own identity provider. It can point at the enterprise IdP you already run.

## What are the steps in the MCP authorization flow?

1. The client calls the MCP server without a token.
2. The server answers `401 Unauthorized` with a `WWW-Authenticate` header containing a `resource_metadata` URL and, ideally, the `scope` it needs.
3. The client fetches the Protected Resource Metadata document. Servers **must** publish it; it lists the authorization server(s).
4. The client fetches the authorization server's metadata. Clients **must** support both RFC 8414 and OpenID Connect Discovery.
5. The client obtains a client ID: a pre-registered ID, a Client ID Metadata Document (an HTTPS URL used as the `client_id`), or Dynamic Client Registration.
6. The client starts an authorization code flow with PKCE and the `resource` parameter set to the MCP server's canonical URI, for example `https://mcp.example.com/mcp`.
7. The client checks the `iss` value in the response against the issuer it recorded (RFC 9207), then redeems the code.
8. The client sends `Authorization: Bearer <token>` on every request. Tokens must never go in the query string.

## What changed in the 2026-07-28 revision?

- **Dynamic Client Registration is deprecated.** It stays for backwards compatibility. Client ID Metadata Documents are now the recommended way for a client the authorization server has never seen.
- **Issuer validation tightened.** Clients must compare a returned `iss` to the recorded issuer by exact string match before redeeming the code, which defends against mix-up attacks when several authorization servers are in play.
- **Scope guidance is explicit.** Servers should list the scopes for an operation in the challenge. Clients should start with the scopes in the challenge, or the minimal `scopes_supported`, and step up later with `insufficient_scope` (HTTP 403) instead of asking for everything at once.

## Which rules matter most for security?

Three rules carry most of the weight:

- **Audience binding.** MCP servers must accept only tokens issued for them. A token for the CRM server must fail at the file server.
- **No token passthrough.** Servers must not accept or forward any other tokens. If an MCP server calls a downstream API, it needs its own credential or a fresh delegated token, not the client's token passed along. Passthrough creates a confused-deputy risk and breaks audit trails.
- **Least privilege by default.** Scope challenges let a server ask for `files:read` first and `files:write` only when a write is attempted.

## What does this mean for enterprise identity teams?

The spec covers the protocol. It does not tell you which MCP servers are approved, who owns them or which agents may call them. Decide these before rollout:

1. **Pick the authorization server.** Point remote MCP servers at your enterprise IdP so conditional access, MFA and deprovisioning apply.
2. **Decide on client registration.** Pre-register the clients you sanction. Allow Client ID Metadata Documents only for domains you trust. Turn off open Dynamic Client Registration where your IdP allows it.
3. **Map scopes to tools.** Define read and write scopes per server and keep `scopes_supported` minimal.
4. **Keep refresh tokens confidential.** Clients must protect them in transit and storage, and the authorization server decides whether to issue them at all.
5. **Handle stdio servers separately.** The spec says stdio implementations should not use this flow. Those servers usually read API keys from environment variables or config files, which is where long-lived secrets hide on laptops.
6. **Log the identity on each call.** Record which user, which agent and which MCP server were involved, so an auditor can reconstruct the chain.

## How Opencontroller does this

Opencontroller keeps a governed registry of agents, tools and MCP servers with owners and versions. It supports OIDC SSO, delegated on-behalf-of identity and agent workload identity federation, so tool calls can carry the user's identity rather than a shared key. Opencontroller Edge extends the same registry to local MCP servers on developer devices, installed by IT through MDM. See the [MCP governance guide](/blog/how-to-govern-mcp-servers) for the wider program, or [book a demo](https://www.lyzr.ai/book-demo/).

For background on delegation, read [how agents act on behalf of users](/blog/ai-agent-identity-on-behalf-of-delegation) and [how to review MCP servers your agents already use](/blog/how-to-review-mcp-servers-agents-already-use). The normative text is the [MCP authorization specification](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization).

## Frequently asked questions

**Is authorization mandatory in MCP?**
No. The spec makes authorization optional. When an HTTP-based server supports it, it should follow the MCP authorization spec. In an enterprise, treat any remote MCP server without authorization as unapproved.

**Can an MCP server forward the user's token to a downstream API?**
No. MCP servers must not accept or pass through tokens issued for other resources. They need their own credential or a newly issued, audience-bound token for the downstream service.

**Do local stdio MCP servers use OAuth?**
Usually not. The spec says stdio implementations should get credentials from the environment instead. That makes inventory and secret hygiene on developer machines a separate control.

## Key facts

In the MCP specification (revision 2026-07-28) the MCP server is an OAuth 2.1 resource server and must publish Protected Resource Metadata (RFC 9728); clients must send the resource parameter (RFC 8707), use PKCE, and validate iss (RFC 9207). Dynamic Client Registration is deprecated in favour of Client ID Metadata Documents. Token passthrough is forbidden. Authorization is optional and stdio servers should take credentials from the environment. Opencontroller provides a governed registry of agents, tools and MCP servers, OIDC SSO, delegated on-behalf-of identity and agent workload identity federation; Opencontroller Edge covers local MCP servers on developer devices. Opencontroller pricing starts from $250K per deployment per year.

## Related

- [How to govern MCP servers in the enterprise: a practical guide](https://opencontroller.lyzr.com/blog/how-to-govern-mcp-servers.md)
- [How do you review MCP servers your agents already use?](https://opencontroller.lyzr.com/blog/how-to-review-mcp-servers-agents-already-use.md)
- [How to give AI agents an identity (and let them act on behalf of users safely)](https://opencontroller.lyzr.com/blog/ai-agent-identity-on-behalf-of-delegation.md)
- [More on Tools and MCP](https://opencontroller.lyzr.com/blog/cluster/tools-and-mcp)
