Analytics Legends logoAI & Analytics Legends Sign inSign up
Concept card

MCP Authorization — OAuth 2.1 and Tier-Based Tool Gating

MCP Authorization — OAuth 2.1 and Tier-Based Tool Gating — AI & Analytics Legends section illustration for the SAP AI & Analytics knowledge base (concepts, studies, Academy)

As of 2026-11-14

What is MCP Authorization?

MCP's authorization model, introduced in the 2025-03-26 revision and refined through 2026-07-28, makes an HTTP server an OAuth 2.1 resource server: tokens obtained with PKCE, bound to the server by a resource indicator and validated for audience on every request. Authorization stays optional in the protocol, and identity alone does not gate a paid tool: a commercial server adds a server-side entitlement check, and when a tool's existence must stay hidden it answers a non-entitled call exactly as it answers an unknown tool.

MCP authorization arrived in the 2025-03-26 specification revision, together with the Streamable HTTP transport: an authorization framework based on OAuth 2.1 (changelog). Later revisions refined it: in 2025-06-18 MCP servers became OAuth resource servers that publish Protected Resource Metadata, and clients had to send resource indicators (changelog); 2025-11-25 added OpenID Connect discovery, incremental scope consent and Client ID Metadata Documents as the recommended registration (changelog); 2026-07-28 deprecated dynamic client registration and added issuer validation (changelog).

How the protocol-level flow works

Authorization is optional for MCP implementations. When it is supported, HTTP-based transports should follow the specification, while stdio servers should not and take credentials from their environment instead (authorization specification). A protected server acts as an OAuth 2.1 resource server; it must publish OAuth 2.0 Protected Resource Metadata (RFC 9728), which tells the client which authorization server protects it. The client discovers that authorization server through RFC 8414 metadata or OpenID Connect discovery and obtains a client ID by one of three routes — Client ID Metadata Documents (an HTTPS URL used as the client_id, which the authorization server fetches), pre-registration, or RFC 7591 dynamic client registration, now deprecated and kept for authorization servers that do not support metadata documents.

Why it matters

  • stdio servers take credentials from their environment and should not run OAuth; an HTTP server that supports authorization should follow the MCP specification — OAuth 2.1 with PKCE, resource indicators (RFC 8707) binding tokens to one server, and Client ID Metadata Documents, with RFC 7591 registration only as a deprecated fallback.
  • Identity is not entitlement: a free tier might see only public directory fields, a paid tier full profiles, a premium tier news search and opportunity tools — a server-side mapping, not something OAuth decides.
  • When a paid tool's existence must stay hidden, any difference between the answer to a non-entitled call and the answer to an unknown tool reveals it.

Key points

  • Timeline: OAuth 2.1 authorization framework in 2025-03-26 (with Streamable HTTP); servers as OAuth resource servers and mandatory resource indicators in 2025-06-18; Client ID Metadata Documents recommended and incremental scope consent in 2025-11-25; dynamic registration deprecated and issuer validation in 2026-07-28.
  • Discovery: the server publishes Protected Resource Metadata (RFC 9728) at a well-known path; the client finds the authorization server through RFC 8414 metadata or OpenID Connect discovery.
  • Registration priority for a client that supports all three: pre-registered client information when available, then Client ID Metadata Documents (HTTPS URL as client_id) when the authorization server supports them, then RFC 7591 dynamic registration as a deprecated fallback.
  • Flow: authorization code with PKCE; resource parameter in authorization and token requests; iss checked against the recorded issuer (RFC 9207); bearer token on every HTTP request.
  • Server duties: validate the token audience, return 401 for invalid or expired tokens, never accept or pass through other tokens; 403 insufficient_scope with every needed scope in one challenge.
  • Authorization is optional: HTTP implementations that support it should conform; stdio servers should not use it and read credentials from the environment.
  • Tier gating: a server-side map from verified identity to plan to tool subset, kept separate from OAuth scopes.
  • Non-disclosure, when wanted: tools/list may vary by authorization (2026-07-28), so list only entitled tools and answer a non-entitled call exactly as an unknown tool (the spec's example uses -32602).

Terms used on this page

OAuth 2.1 with PKCE
The consolidated OAuth profile MCP's HTTP authorization builds on; authorization servers must implement it, and the authorization-code flow uses PKCE (Proof Key for Code Exchange) so an intercepted code cannot be redeemed; the implicit and password grants are gone.
Resource indicator (RFC 8707)
The resource parameter a client sends in authorization and token requests, set to the MCP server's canonical URI; it binds the token to that server, which must check the audience, so a token issued for server A cannot be replayed against server B. Required of MCP clients since 2025-06-18.
Tier-gating layer
The server-side check, above OAuth, that maps an authenticated identity to the tools its plan includes. When a tool's existence must stay hidden, tools/list shows only entitled tools and a non-entitled call gets exactly the answer an unknown tool gets.
Dynamic client registration (RFC 7591)
The OAuth extension letting a client register itself with an authorization server at first contact; deprecated in MCP since the 2026-07-28 revision and kept only for authorization servers that do not support Client ID Metadata Documents.
OAuth Client ID Metadata Document
A registration mechanism in which the client_id is an HTTPS URL; the authorization server fetches a JSON document from it to learn the client's redirect URIs and properties. Recommended by MCP since 2025-11-25, preferred over dynamic registration since 2026-07-28.
OAuth 2.0 Protected Resource Metadata (RFC 9728)
The discovery document an MCP server must publish (since 2025-06-18) to tell clients which authorization server(s) protect it and which scopes it supports.
Issuer validation (RFC 9207)
A mix-up attack defence required by the 2026-07-28 revision: the client records the authorization server's issuer before redirecting the user and compares the iss value in the authorization response with it before sending the code to any token endpoint.
Step-up authorization / insufficient_scope
The runtime flow, formalised as incremental scope consent in 2025-11-25 and kept in 2026-07-28, for a token whose scopes are too narrow: the server answers HTTP 403 with error="insufficient_scope" and the required scopes; the client re-authorizes with the union of previous and required scopes.

Sources

  1. MCP specification 2026-07-28 — Authorization (optional; resource server; registration priority; PKCE, resource, iss; 401/403; step-up)
  2. IETF OAuth 2.1 draft
  3. RFC 7591 OAuth Dynamic Client Registration (deprecated in MCP since 2026-07-28)
  4. MCP specification 2026-07-28 — Tools (tools/list may vary by authorization; unknown-tool error example -32602)
  5. MCP specification — Key changes 2025-03-26 (OAuth 2.1 authorization framework, Streamable HTTP)
  6. MCP specification — Key changes 2025-06-18 (servers as OAuth resource servers, RFC 8707 required of clients)
  7. MCP specification — Key changes 2025-11-25 (Client ID Metadata Documents recommended, incremental scope consent, OpenID Connect discovery)
  8. MCP specification — Key changes 2026-07-28 (dynamic client registration deprecated, iss validation, credentials bound to issuer)
  9. IETF — OAuth 2.0 Protected Resource Metadata, RFC 9728
  10. IETF — OAuth 2.0 Authorization Server Issuer Identification, RFC 9207
  11. RFC 8707 — Resource Indicators for OAuth 2.0
  12. RFC 7636 — Proof Key for Code Exchange (PKCE)
  13. RFC 6750 — OAuth 2.0 Bearer Token Usage (WWW-Authenticate, insufficient_scope)
  14. modelcontextprotocol/typescript-sdk — v2.3.0 release notes, 2 Oct 2026 (expectedResource audience check)
  15. MCP TypeScript SDK — repository and serving guides (requireBearerAuth, createMcpHandler with authInfo)
  16. Snowflake docs — Snowflake-managed MCP server (Snowflake OAuth or External OAuth, no dynamic registration, per-tool privileges)
  17. Databricks docs — Databricks-managed MCP servers (OAuth scopes per server, Unity Catalog permissions)
  18. Microsoft Learn — Fabric Core MCP Server overview (Microsoft Entra ID OAuth 2.0, Fabric RBAC)
  19. SAP News — SAP TechEd: developers, you can build the autonomous enterprise (28 Oct 2026; SAP Enterprise AI Gateway announced)

Full card with the Consultant plan — €19.90/month. What the full card adds: the full decision framework · the SAP vs Snowflake / Databricks / Fabric comparison · the common pitfalls and their fix · the cheat sheet · the architecture schemas · the code blocks · the facts worth quoting.

Open in the app →

Open missions

56 live roles and contracts in SAP AI & Joule right now — see the SAP AI & Joule missions · freelance SAP contracts.