Protected resource metadata
A JSON document, defined in RFC 9728, that a protected API such as a remote MCP server publishes to say which authorization servers issue its tokens and which scopes it uses.
A client that meets a protected API for the first time has a question OAuth alone does not answer: where do I get a token for this? RFC 9728 answers it from the API's side. The API, the resource server, serves a small document that names its authorization servers; the client then reads each authorization server's own metadata (RFC 8414 or OpenID Connect discovery) to find the endpoints.
The main fields:
resource(required): the API's identifier, anhttpsURL without a fragment.authorization_servers: issuer URLs of the authorization servers it accepts tokens from. MCP requires at least one.scopes_supported(recommended): the scopes a client may ask for.bearer_methods_supported,jwks_uri,resource_name: optional details.
There are two ways to find the document. The server can name it in the resource_metadata parameter of a WWW-Authenticate challenge, usually on a 401. Or the client builds the well-known URL by putting /.well-known/oauth-protected-resource between the host and the path.
Example
For an MCP server at https://mcp.example.com/mcp, the well-known URL is https://mcp.example.com/.well-known/oauth-protected-resource/mcp:
{
"resource": "https://mcp.example.com/mcp",
"authorization_servers": ["https://auth.example.com"],
"scopes_supported": ["files:read"],
"bearer_methods_supported": ["header"]
}Common confusion
This is not the authorization server's metadata. Protected resource metadata describes the API and points to the authorization server; authorization server metadata (RFC 8414) describes the endpoints, PKCE support and registration options. A client needs both.
Its resource value is also a check, not decoration. RFC 9728 says it "MUST be identical" to the identifier the client used to build the URL, otherwise the document must not be used, so one server cannot pass off another's metadata. The same value is what a client sends as its resource indicatorResource indicator: The OAuth `resource` parameter (RFC 8707), which names the API a token is for, so the authorization server can limit the token's audience to that one API..
In L2M
As a client, L2M reads the resource_metadata URL from the server's 401, or else tries the path-specific well-known URL and then the root one. It refuses a document with no authorization_servers, a URL that is not https (loopback excepted), or a resource on another origin, and it uses the first authorization server listed (OAuth for remote servers). The MCP gateway does not publish this document: its clients use per-client bearer tokens created in the studio, not OAuth. When discovery breaks at the next step, see "Failed to fetch authorization server metadata".
Further reading
- RFC 9728: OAuth 2.0 Protected Resource Metadata (IETF)
- MCP specification 2026-07-28: authorization server discovery (modelcontextprotocol.io)