Agents404

OAuth Protected Resource Metadata

OAuth Protected Resource Metadata is a small JSON file at /.well-known/oauth-protected-resource that tells a client, such as an AI agent, where to get a token for your API; MCP requires it.

Published 2026-11-26. Updated 2026-11-29. Facts checked 2026-11-26. Read as Markdown

Status
Stable
Version
RFC 9728
Owner
IETF
Layer
Capabilities (can agents act?)
Where on a site
/.well-known/oauth-protected-resource
Specification
www.rfc-editor.org

In short

  • It is a stable standard, RFC 9728, published April 2025 [1].
  • The file names the authorization servers for an API. On a 401, the API points to it with WWW-Authenticate: Bearer resource_metadata="..." [1].
  • MCP servers must implement it, and MCP clients must use it to find where to log in [2].
  • It is how an agent gets delegated access, with the person's consent, instead of asking for a password.
  • 1 of the 14 sites we scanned publishes one, and it uses it to name an MCP endpoint.

This file tells an agent where to sign in

An agent calls your API and gets "401 Unauthorized". Without this file, it has to guess where to log in. With it, the path is fixed. Read the metadata, find the authorization server, read that server's own metadata (RFC 8414), and run a normal OAuth flow in which the person approves access. The agent ends up with a token limited to the scopes the person granted, which the person can revoke later.

This is the piece that turns "an agent could use our API if someone set it up" into "an agent can find its own way in".

One JSON file at a registered address

  • The file lives at /.well-known/oauth-protected-resource, registered with IANA. For a resource with a path, the well-known part goes before the path, so https://example.com/public/mcp uses https://example.com/.well-known/oauth-protected-resource/public/mcp. MCP clients try that form first, then the root [1][3].
  • The response is status 200, application/json [1].
  • The fields are these.
    • resource is required and must exactly match the identifier used to build the URL [1].
    • authorization_servers is optional in the RFC but required by MCP, with at least one entry [1][2].
    • scopes_supported and resource_name are recommended; bearer_methods_supported, resource_documentation and others are optional [1].
  • On 401, send WWW-Authenticate: Bearer resource_metadata="<url>". MCP servers should also add scope="..." [2].
  • The authorization server publishes RFC 8414 metadata at /.well-known/oauth-authorization-server (or OpenID Connect discovery). Its issuer must match exactly, and for MCP it must list code_challenge_methods_supported, meaning PKCE [2][4].
  • For client registration in MCP, Client ID Metadata Documents (IETF working-group draft -03) are preferred; Dynamic Client Registration is deprecated [2][5].

Tens of thousands of large sites publish it

  • Agent Protocols Watch found the file on 54,331 of 943,453 large sites (2026-11-04) [6].
  • Cloudflare Radar's 2026-11-02 scan, as transcribed by TechnologyChecker, counted 4,775 of 115,468 domains [7].

In our scan of 14 sites on 2026-11-26, 1 of 14 publishes protected resource metadata, and 3 publish authorization server metadata [8]. The four sites that published OAuth metadata or an API Catalog were the four highest on our Actionable score. That is a pattern in 14 sites, not proof of cause.

Publish it if your API or MCP server uses OAuth

  • If you have an API or MCP server behind OAuth, publish this file. It is a few lines of JSON.
  • Get resource exactly right. A trailing slash or a different host breaks the match.
  • Return the 401 header with resource_metadata, so clients that hit the API first still find the file.
  • Check your authorization server metadata for an exact issuer and PKCE support.
  • If you have no API, you do not need it. Do not publish a file that points to nothing.

Questions

What is /.well-known/oauth-protected-resource?

A JSON file, defined in RFC 9728, that tells clients which authorization servers issue tokens for an API and which scopes exist [1]. Agents and MCP clients read it to find where to log in.

How do AI agents log in to my app?

The safest way is OAuth with delegated access. The agent finds your login server through this file, the person approves the scopes, and the agent gets a token [1][2]. The person never gives the agent a password.

Sources

# Source Publisher Primary or secondary Checked Status
1 https://www.rfc-editor.org/rfc/rfc9728 RFC Editor primary 2026-11-26 stable (RFC 9728)
2 https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization MCP project primary 2026-11-26 community draft (MCP 2026-07-28)
3 https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/authorization-server-discovery MCP project primary 2026-11-26 community draft (MCP 2026-07-28)
4 https://www.rfc-editor.org/rfc/rfc8414 RFC Editor primary 2026-11-26 stable (RFC 8414)
5 https://www.ietf.org/archive/id/draft-ietf-oauth-client-id-metadata-document-03.txt IETF OAuth WG primary 2026-11-26 IETF WG draft -03
6 https://agentprotocolswatch.com/ Agent Protocols Watch primary 2026-11-26 adoption data (2026-11-04)
7 https://technologychecker.io/blog/agentic-commerce-statistics-insights TechnologyChecker (Cloudflare Radar data) secondary 2026-11-26 adoption data (2026-11-02)
8 Our scans of 14 sites, 2026-11-26 (scanner 0.2.0) Agents404 primary (own data) 2026-11-26 own data

Recent changes

Primary sources

#SourcePublisherChecked
1https://www.rfc-editor.org/rfc/rfc9728RFC Editor2026-11-11