Flow 1
HTTP MCP authorization
- 1
MCP client sends an unauthenticated HTTP request to the MCP server.
- 2
Server 401s with WWW-Authenticate including resource_metadata URL.
- 3
Client fetches RFC 9728 PRM, records resource and authorization_servers.
- 4
Client discovers AS via RFC 8414 and/or OIDC Discovery; verifies issuer.
- 5
Client obtains a client_id: CIMD (SHOULD), pre-registration, or DCR (MAY, deprecated).
- 6
Authorization code + PKCE (OAuth 2.1). resource=canonical MCP URI on authorize and token requests. Validate iss on the response.
- 7
Client calls the MCP server with Authorization: Bearer. Server checks the token was issued for itself. Tokens never go in query strings.
Stdio MUST NOT use this. The model never sees a protocol other than 'call this tool' — the host is the OAuth client.