part…
Building governance for MCP?
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
MCP's authorization framework (Part 9) rests on a dozen specifications. You do not need to read them in full: you need to know what MCP asks of each one. This lesson is the map; the specific MCP rules are in Part 9.
| OAuth role | In MCP |
|---|---|
| Resource owner | The human user (or the organisation, in client credentials). |
| Client | The MCP client (the host, or your gateway downstream). |
| Resource server | The MCP server (or your gateway upstream). |
| Authorization server (AS) | An external or co-hosted AS; its implementation is outside the MCP spec. |
| Specification | What MCP requires |
|---|---|
| OAuth 2.1 (draft-ietf-oauth-v2-1-13) | Basis of the flow. Authorization code + mandatory PKCE, no implicit or password grant. HTTPS on all endpoints; redirect URIs localhost or HTTPS. Refresh token rotation for public clients. Section 5 (resource requests) and 7 (security). |
| RFC 6750 Bearer Token Usage | Token only in the Authorization: Bearer header; never in the query string. WWW-Authenticate format with scope, error="insufficient_scope". |
| RFC 9728 Protected Resource Metadata | The MCP server MUST publish it: /.well-known/oauth-protected-resource[/path] with authorization_servers, scopes_supported, resource. Referenced in WWW-Authenticate with resource_metadata. |
| RFC 8414 AS Metadata | AS discovery at /.well-known/oauth-authorization-server[/path]: issuer, authorization_endpoint, token_endpoint, code_challenge_methods_supported, registration_endpoint, client_id_metadata_document_supported, authorization_response_iss_parameter_supported. |
| OpenID Connect Discovery 1.0 | Alternative discovery at /.well-known/openid-configuration; the MCP client MUST support both and try them in order. |
| RFC 8707 Resource Indicators | resource parameter MUST be present in authorization and token requests, with the canonical URI of the MCP server; the server validates audience. |
| RFC 9207 Issuer Identification | iss parameter in the authorization response; the client MUST compare it with the registered issuer to avoid mix-up. |
| Client ID Metadata Documents (draft-ietf-oauth-client-id-metadata-document) | Registration without interaction: the client_id is an HTTPS URL serving a JSON with client_name, redirect_uris, etc. Recommended (SHOULD). |
| RFC 7591 Dynamic Client Registration | Registration by POST to registration_endpoint. Deprecated in MCP; kept for compatibility. application_type mandatory. |
| OIDC Dynamic Client Registration 1.0 | Defines application_type native/web and redirect URI restrictions. |
| RFC 7523 JWT Bearer | Client credentials extension: signed JWT assertions (private_key_jwt) instead of a secret. |
| RFC 6749 §4.4 Client Credentials Grant | Extension for M2M. |
| RFC 8693 Token Exchange | Basis of Enterprise-Managed Authorization: exchanging an ID-JAG for an access token from the MCP server's AS. |
| RFC 9700 OAuth Security BCP | Recommended complementary reading. |
| RFC 9068 JWT access tokens | Reference for the aud claim when discussing audience. |
sequenceDiagram
participant C as MCP client
participant RS as MCP server (RS)
participant AS as Authorization Server
C->>RS: POST /mcp (no token)
RS-->>C: 401 + WWW-Authenticate (resource_metadata, scope)
C->>RS: GET /.well-known/oauth-protected-resource
RS-->>C: { authorization_servers: [...], scopes_supported }
C->>AS: GET /.well-known/oauth-authorization-server
AS-->>C: metadata (endpoints, PKCE, CIMD)
Note over C: Registration: pre-registration / CIMD / DCR
C->>AS: /authorize (code_challenge S256, resource, scope, state)
AS-->>C: code + iss
C->>AS: /token (code_verifier, resource)
AS-->>C: access_token (+ refresh_token)
C->>RS: POST /mcp Authorization: Bearer …
code_verifier → code_challenge = BASE64URL(SHA256(verifier)); the AS requires the verifier when the code is redeemed. Protects against code interception.private_key_jwt.issuer credential store from the outset.1. Which RFC defines the resource parameter that MCP requires in authorization and token requests?
RFC 8707 (Resource Indicators); RFC 9728 is Protected Resource Metadata and RFC 8414 is AS Metadata.
2. What is the status of Dynamic Client Registration (RFC 7591) in MCP 2026-07-28?
It was deprecated in favour of Client ID Metadata Documents.
3. Which attack does the iss parameter of RFC 9207 mitigate?
The client compares iss with the registered issuer before redeeming the code, avoiding sending it to an attacker's AS.