Menu

AI

OAuth Protected Resource Metadata in MCP

How MCP servers use OAuth Protected Resource Metadata (RFC 9728) to tell clients which authorization server to use, with the JSON format and discovery rules.

By: Irina ShvayaOctober 28, 2026

OAuth Protected Resource Metadata in MCP

This page is part of our MCP specification reference, a plain-English guide to the Model Context Protocol spec (version 2026-07-28), within The MCP Guide. Building a server? See MCP development.

OAuth Protected Resource Metadata is a small JSON document an MCP server publishes so AI apps know where to sign in. Its most important field, authorization_servers, lists the authorization server that issues tokens for that MCP server. It is defined by RFC 9728, and the MCP spec makes it mandatory for protected servers.

Status in the 2026-07-28 spec: core (required for MCP servers that implement authorization)

Think of it as the sign on the door that says "get your badge at reception, over there." This page follows the authorization server discovery page of the 2026-07-28 spec and RFC 9728 itself, both checked on 28 October 2026.

Key Takeaways

  • MCP servers "MUST implement" OAuth 2.0 Protected Resource Metadata (RFC 9728), and clients "MUST use" it to find the authorization server.
  • The document must include authorization_servers with at least one authorization server.
  • Servers advertise it through the WWW-Authenticate header on a 401, or at a well-known URL, or both.
  • Clients must support both methods and fall back to well-known URLs when the header is missing.
  • The resource value inside the document must exactly match the URL the client used, or the client must ignore it.

Why it exists

An AI app may connect to an MCP server it has never seen. It needs to learn, with no prior setup, which authorization server to talk to and which scopes to ask for. Before 2025-06-18, MCP had no standard way to say this, and the 2025-03-26 authorization page told clients to fall back to default paths such as /authorize on the server's own domain.

The 2025-06-18 changelog fixed this. It classified MCP servers as OAuth resource servers, "adding protected resource metadata to discover the corresponding Authorization server." That lets a company keep its MCP server and its identity provider on different hosts.

RFC 9728 itself is an IETF Standards Track document published in April 2025. It defines "a metadata format that an OAuth 2.0 client or authorization server can use to obtain the information needed to interact with an OAuth 2.0 protected resource."

How it works

Step 1: The client finds the document

The 2026-07-28 spec says MCP servers "MUST implement one of the following discovery mechanisms":

  1. The WWW-Authenticate header. On a 401 Unauthorized, include the document URL in a resource_metadata parameter.
  2. A well-known URI. Serve the document either at the path of the MCP endpoint or at the root. For https://example.com/public/mcp, that means https://example.com/.well-known/oauth-protected-resource/public/mcp or https://example.com/.well-known/oauth-protected-resource.

Clients "MUST support both discovery mechanisms." They use the header URL when present. Otherwise they "MUST fall back" to the well-known URIs, path-based first, then root.

Step 2: The client reads the document

RFC 9728 defines the fields. Here is a document for an MCP server, adapted from the RFC's example response:

{
  "resource": "https://mcp.example.com/mcp",
  "authorization_servers": ["https://auth.example.com"],
  "scopes_supported": ["files:read", "files:write"],
  "bearer_methods_supported": ["header"],
  "resource_name": "Example Files MCP Server",
  "resource_documentation": "https://example.com/docs/mcp"
}
FieldRFC 9728 statusWhat it does
resourceREQUIREDThe server's resource identifier
authorization_serversOPTIONAL in the RFC, required by MCPIssuer URLs of usable authorization servers
scopes_supportedRECOMMENDEDScope values clients may request
bearer_methods_supportedOPTIONALHow tokens may be sent: header, body or query
resource_nameRECOMMENDEDHuman-readable name for the user

MCP tightens the RFC in one place. The RFC makes authorization_servers optional, but the MCP spec says the document "MUST include the authorization_servers field containing at least one authorization server."

The MCP spec also gives scopes_supported a meaning. It is "intended to represent the minimal set of scopes necessary for basic functionality," with extra scopes requested later through step-up.

Step 3: The client validates it

RFC 9728 Section 3.3 says "the resource value returned MUST be identical" to the identifier used to build the well-known URL. If the document came from a WWW-Authenticate link, the resource must equal the URL the client called. "If these values are not identical, the data contained in the response MUST NOT be used." The RFC says this can "thwart impersonation attacks."

Step 4: The client picks an authorization server

If several are listed, "each is an independent OAuth 2.0 authorization server," and the client chooses. Clients "MUST maintain separate registration state" per authorization server. The client then fetches that server's own metadata, as described in MCP authorization: what the spec requires.

What changed across spec versions

VersionChange
2025-03-26No Protected Resource Metadata; default endpoint fallback on the server's domain
2025-06-18Protected Resource Metadata required; WWW-Authenticate header required on 401
2025-11-25Aligned with RFC 9728: header made optional, with fallback to .well-known, per the 2025-11-25 changelog
2026-07-28Rules moved to a dedicated discovery page; credentials bound per authorization server

The 2026-07-28 changelog adds that when the authorization server changes, detected through updated metadata, clients "MUST re-register." Client ID Metadata Documents are the exception, since they are portable. See Client ID Metadata Documents in MCP.

Common mistakes

  • Leaving out authorization_servers. RFC 9728 allows it; MCP does not.
  • A resource value that does not match the URL. Clients must discard the document. Watch trailing slashes and paths.
  • Serving metadata only at the root when the MCP endpoint has a path, and not sending the header. Clients try the path-based URL first.
  • Listing offline_access in scopes_supported. The MCP spec says servers "SHOULD NOT," because refresh tokens are not a resource requirement.
  • Publishing every scope you have. Keep scopes_supported to the minimum, as the spec intends.

More examples sit in common MCP OAuth misconfigurations.

Next step

Once the client knows the authorization server, it has to identify itself. Read Client ID Metadata Documents in MCP next, or browse the MCP specification reference.

Frequently asked questions

What is the well-known URL for MCP protected resource metadata?

It is /.well-known/oauth-protected-resource, either with the MCP endpoint's path appended or at the root. For https://example.com/public/mcp, clients try https://example.com/.well-known/oauth-protected-resource/public/mcp first.

Is the WWW-Authenticate header required?

Not since 2025-11-25. Servers must offer either the header or a well-known URL. Clients must support both and prefer the header when it is present.

Is Protected Resource Metadata the same as authorization server metadata?

No. Protected Resource Metadata (RFC 9728) describes the MCP server and points to the authorization server. Authorization server metadata (RFC 8414 or OpenID Connect Discovery) describes the authorization server's own endpoints.

Can an MCP server list more than one authorization server?

Yes. The client chooses which to use, following RFC 9728 Section 7.6, and keeps separate credentials for each.

Does a public MCP server need this document?

Only if it implements authorization. Authorization is optional in MCP, so a fully public server can skip it.

You Might Also like to Read

Get a FREE Website Audit

Enter your website and get a 20–30 page SEO, GEO, AEO & CRO audit within 24 hours. Completely free.

Don't have a site yet? Get in touch →

Ready to speak with a marketing expert?
Give us a call! (916) 866-7893

Websites Launched
1407
Websites Launched
Marketing Experts
29
Marketing Experts
Hours of Dedicated Work
204533
Hours of Dedicated Work
Irina S.Benjamin G.Jeanette M.David G.