RFC 9728 Protected Resource Metadata is the piece that lets an MCP server say "my tokens are issued by that authorization server over there". This lesson covers what the MCP server publishes at /.well-known/oauth-protected-resource, how the client finds it (via the WWW-Authenticate header or a well-known path), and how to build every discovery URL by hand.
In this lesson
- Describe what the MCP server publishes at
/.well-known/oauth-protected-resource.
- Explain how the client finds it (header or well-known path) in each revision.
- Build every discovery URL by hand.
Why it exists
In 2025-03-26 the client assumed that the authorization server lived at the root of the MCP server. When the roles were split in 2025-06-18, that assumption stopped holding: the MCP server now needs to declare who issues its tokens. That is what RFC 9728 is for.
GET /.well-known/oauth-protected-resource HTTP/1.1
Host: mcp.example.com
{
"resource": "https://mcp.example.com/mcp",
"authorization_servers": ["https://auth.example.com"],
"scopes_supported": ["files:read", "files:write"],
"bearer_methods_supported": ["header"],
"resource_documentation": "https://mcp.example.com/docs"
}
| Field |
Meaning |
resource |
The resource identifier: the canonical URL of the MCP server. It is what the client will put in the resource parameter (RFC 8707, see lesson 3.7). |
authorization_servers |
List of authorization servers that issue tokens for it. There may be several; the client chooses. |
scopes_supported |
The resource's scopes. In 2025-11-25+ they are the ones requested if the 401 does not indicate others. |
bearer_methods_supported |
How to send the token; in MCP only header. |
How the client finds it
| Revision |
Mechanism |
2025-06-18 |
The 401 must carry WWW-Authenticate: Bearer resource_metadata="…" |
2025-11-25+ |
The header first, if present (it is no longer the only mechanism). Otherwise, the client builds the well-known URL: first with the MCP server's path, then at the root |
For example, a 2025-06-18 server announces the metadata location in its challenge:
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer resource_metadata="https://mcp.example.com/.well-known/oauth-protected-resource"
For an MCP server at https://api.example.com/v1/mcp that sends no such header, a 2025-11-25 client tries:
1. https://api.example.com/.well-known/oauth-protected-resource/v1/mcp
2. https://api.example.com/.well-known/oauth-protected-resource
The builder below takes an MCP server URL, the issuer of the authorization server declared in the resource metadata, the revision, and whether the 401 includes resource_metadata, and lists every URL the client would request, in order: first the protected resource metadata, then the authorization server metadata (RFC 8414 and OpenID Connect Discovery, see lessons 3.2 and 3.3).
Summary
- The MCP server publishes
resource and authorization_servers (plus scopes_supported and bearer_methods_supported).
2025-06-18: located through a mandatory WWW-Authenticate header with resource_metadata.
2025-11-25+: the header if present; otherwise the well-known path with the server's path inserted, then at the root.