Technical Guide

Model Context Protocol Authorization and OAuth Scopes

MCP authorization is built on OAuth 2.1: MCP servers act as OAuth resource servers, clients obtain tokens through a separate authorization server using PKCE and Resource Indicators, and every tool call should be validated against token audience, issuer, and scope. The specification defines this flow but does not standardize scope granularity, leaving least-privilege enforcement to implementers, which is where most real-world misconfiguration risk originates.

MCP Authorization at a Glance

OAuth 2.1 Foundation

PKCE required, implicit grant prohibited, dynamic client registration supported.

Resource Server Role

MCP servers validate tokens; authorization logic can live separately.

Token Audience Binding

Resource Indicators (RFC 8707) bind tokens to a specific MCP server.

Undefined Scope Taxonomy

The spec leaves tool-level scope granularity to implementers.

Architecture Decisions Enterprises Must Make

Because the specification leaves scope granularity and server role open, every deployment requires explicit decisions rather than defaults. These are the choices that determine whether an MCP deployment is secure by design or secure by accident.

  1. 1

    Resource server vs. authorization server role

    Decide whether the MCP server itself issues tokens, delegates entirely to an external authorization server, or does both, since this determines where consent and client registration logic live.

  2. 2

    Scope-to-tool mapping

    Define and document how OAuth scopes correspond to individual tools, categories of tools, or broader service-level access before deployment, not after.

  3. 3

    Per-call token validation

    Confirm that audience, issuer, and expiry checks run on every tool invocation, not only when a session is first established.

  4. 4

    Dynamic client registration policy

    Decide whether to allow open dynamic client registration or apply organizational controls that restrict which clients can register at all.

  5. 5

    Transport-specific credential handling

    For STDIO or local-transport servers, plan for environment or OS-level credential isolation, since OAuth protections defined by the spec do not apply there.

Evaluation Questions Before Deploying an MCP Server

These questions surface the gaps that the specification intentionally leaves open. Answers should be documented, not assumed.

  • Does the server validate token audience and issuer on every tool call, or only at session initiation?
  • How are OAuth scopes mapped to specific tools or data sources, and is that mapping documented?
  • Does the server enforce least-privilege scope defaults, or does it require manual configuration to avoid broad grants?
  • What mechanism detects or blocks tool invocations that exceed the agent's granted scope at runtime?
  • How are token revocation and expiry handled across long-running, multi-step agent sessions?

MCP Authorization Deep Dive

What MCP Authorization Actually Specifies

The Model Context Protocol authorization specification defines how MCP clients, authorization servers, and MCP servers interact using OAuth 2.1 patterns. It requires PKCE for all clients and explicitly prohibits the implicit grant flow, aligning MCP with current OAuth security best practice rather than legacy flows. MCP servers are specified to act as OAuth 2.0 resource servers. They may also take on authorization server responsibilities directly, or delegate that role entirely to an external, dedicated authorization server. This separation matters because it determines where consent, token issuance, and client registration logic actually live in a given deployment, and it is a design decision every implementer has to make explicitly rather than inherit by default. The specification also supports OAuth 2.0 Dynamic Client Registration, allowing MCP clients to register with an authorization server without manual pre-configuration, and uses OAuth Authorization Server Metadata for endpoint discovery. Authorization is scoped to HTTP-based transports. For STDIO transports, the spec states that credentials should come from the environment rather than through the OAuth flow it defines, which means local and remote MCP deployments require different security assumptions from the outset.

How Scopes Are Requested, Granted, and Validated

In practice, the authorization flow follows a standard OAuth 2.1 authorization code grant with PKCE between the MCP client (or host application) and an authorization server that is logically distinct from the MCP server handling tool invocation. Once a token is issued, the MCP server, acting as resource server, is expected to validate that token's audience, expiry, and issuer before permitting any tool call, and this validation should occur on every invocation rather than only at initial session establishment. The specification requires MCP clients to implement Resource Indicators so that access tokens are explicitly bound to the intended MCP server. This closes a specific risk: a token issued for one server being replayed against a different server or downstream API. What the specification does not do is define a standardized, granular tool-level or method-level scope taxonomy. Scope contents and granularity, whether scopes map to individual tools, categories of tools, or broad service-level access, are left entirely to the authorization server and resource owner. This is a deliberate design choice in the protocol, but it also means two organizations running MCP servers can implement fundamentally different, and differently secure, scope models while both claiming spec compliance.

Where Misconfiguration Risk Concentrates

Because scope granularity is unspecified, the most common enterprise risk is not a flaw in the protocol itself but inconsistent implementation of it. Independent security research has documented that early MCP server implementations frequently omitted audience validation and scope enforcement, allowing tokens issued for one service to be replayed against another. The specification explicitly names this class of failure, calling out "token passthrough," where an MCP server forwards a client-supplied token to a downstream service without validating its audience, as a security anti-pattern. A related risk is the confused-deputy problem: when an MCP server acts as a proxy to a third-party authorization server without validating consent on a per-client basis, it can be induced to act on behalf of a client it should not be trusting. Both risks share a root cause. The protocol defines the mechanics of token issuance and validation, but enforcement quality depends entirely on how carefully each server implementation applies those mechanics at every tool call, not just at connection setup.

Implementation Practices for Security Engineers

  • Validate token audience, issuer, and expiry on every tool invocation at the MCP server, not only at session start.
  • Treat unvalidated token passthrough to downstream APIs as a known anti-pattern and re-validate before forwarding.
  • Apply organizational policy controls over dynamic client registration rather than allowing open registration.
  • Document an explicit mapping between OAuth scopes and the specific tools, data sources, or actions each scope permits.
  • For STDIO or local-transport MCP servers, rely on environment or OS-level credential isolation instead of assuming OAuth protections apply.

Where Runtime Governance Complements the Protocol

The MCP authorization specification defines protocol mechanics: token flows, audience binding, and resource-server behavior. It does not define organizational audit requirements, does not enforce consistent scope taxonomy across implementations, and does not detect at runtime when an agent's actual tool usage drifts from its granted scope. This gap is where governance layered on top of the protocol becomes necessary rather than optional. Trussed AI provides runtime governance and security for enterprise AI agents, including runtime policy enforcement, runtime monitoring, and audit logging that operate independently of the OAuth layer itself. In an MCP deployment, this means monitoring tool-call activity against expected scope-to-action mappings, supporting tool approval workflows for actions outside normal patterns, and maintaining audit logs of token issuance, scope grants, and tool invocations for compliance review. These controls do not replace correct OAuth implementation; they address the reality that scope design and enforcement quality vary across MCP server implementations, and that static grants alone cannot detect misuse once a token is in an agent's possession.

Frequently Asked Questions

Does MCP define its own OAuth scope names?

No. The specification builds on OAuth 2.1 mechanics but leaves scope content and granularity to the authorization server and resource owner. Organizations must define their own scope-to-tool mapping.

Is OAuth required for all MCP transports?

No. The authorization specification applies to HTTP-based transports. STDIO transports are expected to obtain credentials from the environment rather than through the OAuth flow defined in the spec.

What is token passthrough and why is it risky?

Token passthrough occurs when an MCP server forwards a client-supplied token to a downstream service without validating its audience. The specification identifies this as a security anti-pattern because it can allow tokens to be misused outside their intended scope.

Can MCP servers act as both resource server and authorization server?

Yes. The specification allows an MCP server to act solely as a resource server, take on authorization server responsibilities itself, or delegate authorization entirely to an external authorization server.

Enforce Least Privilege Beyond the OAuth Layer

MCP defines how tokens are issued and validated. Runtime governance ensures agent behavior stays within the scopes actually granted, with monitoring and audit logging to support enterprise compliance requirements.

Explore Runtime Governance