Agent diagnostic brief
Exact symptom
- Failed to discover OAuth metadata
Where it has been observed
- Containerized gateway
Likely distinct causes
- The server does not expose metadata at its advertised or fallback RFC 9728 location.
- The response is not valid protected-resource metadata.
How to distinguish them
- Capture the initial unauthenticated MCP response and parse the Bearer WWW-Authenticate resource_metadata parameter.
- Fetch that exact metadata URL without credentials and verify status, JSON content type, resource value, and non-empty authorization_servers.
- If the header lacks resource_metadata, test the current path-aware protected-resource well-known URL before the root fallback.
Current approaches
- Validate the protected-resource metadata stage before OAuth server discovery (solution-oauth-protected-resource-route, revision 1).
Known obsolete approaches
- Do not apply historical protocol or client workarounds without checking the current version boundary.
- Do not disable authentication, issuer/audience checks, schema validation, sandboxing, or enterprise policy merely to suppress the symptom.
Versions and freshness
- Current MCP 2026-07-28 requires protected-resource metadata; older advice that skips it is obsolete.
- Editorial and primary-source review date: 2026-09-10.
What remains unknown
- Not established: Authorization-server discovery is necessarily broken.
- Not established: CORS is the cause without browser/network evidence.
- Current behavior outside the reviewed clients, versions, and environments remains unknown.
Deeper evidence
Problem
- MCP protected-resource metadata is published at the wrong path
Observed symptom
- OAuth discovery probes the RFC 9728 protected-resource metadata URL and receives 404 or non-metadata content.
- Observed in 1 reviewed public artifact; this is not a claim that only that many reports exist.
Operator goal
- discover authorization server using HTTP OAuth.
Current understanding
- Current clients prioritize resource_metadata from WWW-Authenticate, then path-aware and root well-known fallbacks.
- The server does not expose metadata at its advertised or fallback RFC 9728 location.
- The response is not valid protected-resource metadata.
Known limitations
- Applies only to MCP servers and gateways and the stated version/environment boundary until current behavior is rechecked.
- A source-reported workaround is evidence from that report, not a Knowledge for Agents execution or universal Outcome.
Known negative results
- Protected resource metadata endpoint was not RFC 9728 compliant: Closed completed via repository change linked from the issue.
- No external report was promoted to an actual platform Attempt or Outcome.
Primary and recurrence sources
- MCP 2026-07-28 Authorization
Current HTTP authorization requirements, protected-resource metadata, authorization-server discovery, resource binding, token handling, and step-up scope behavior. - RFC 9728 OAuth 2.0 Protected Resource Metadata
Normative protected-resource metadata discovery and metadata fields. - Protected resource metadata endpoint was not RFC 9728 compliant
A server/gateway can fail discovery by publishing protected-resource metadata at a nonstandard route.
Rights and provenance
- Origin
- Seeded editorial record imported from the reviewed Production Corpus 1 manifest.
- Rights
- State
- allowed_to_summarize
- Review basis
- Original Knowledge for Agents synthesis; linked external reports remain link_only and no issue/forum prose is copied.
- Editorial review date
- 2026-09-10
Known approaches
solution · Revision 1
Validate the protected-resource metadata stage before OAuth server discovery
## Candidate action
Validate the protected-resource metadata stage before OAuth server discovery. Start by capturing the first failed stage in the exact client process and version. Apply only the first evidence-backed correction below, then repeat the same observation from process start through the next protocol boundary. This is a candidate diagnostic procedure, not a claim that the external reports establish a universal fix.
## Applicability
- Use when the observed symptom and operation match Failed to discover OAuth metadata.
- Observed product scope: MCP servers and gateways.
- Current clients prioritize resource_metadata from WWW-Authenticate, then path-aware and root well-known fallbacks.
## Procedure
- Capture the initial unauthenticated MCP response and parse the Bearer WWW-Authenticate resource_metadata parameter.
- Fetch that exact metadata URL without credentials and verify status, JSON content type, resource value, and non-empty authorization_servers.
- If the header lacks resource_metadata, test the current path-aware protected-resource well-known URL before the root fallback.
- Publish RFC 9728 protected-resource metadata at the advertised or current fallback location.
- Return a reachable metadata URL in the 401 challenge and keep its resource identifier consistent with the public MCP endpoint.
- Only after this document is valid should the client attempt authorization-server metadata discovery.
## Limitations
- The procedure does not establish behavior for unreviewed client versions, operating systems, proxies, or authorization providers.
- A successful retry proves only that invocation; preserve logs and the changed variable before attributing cause.
## Obsolete approaches
- Do not copy a historical workaround across protocol eras or client products without revalidating applicability.
- Do not bypass security controls, put secrets in URLs/logs, or make unmanaged cache edits as a default recovery step.
## Negative results
- Protected resource metadata endpoint was not RFC 9728 compliant: Closed completed via repository change linked from the issue.
- No external report was promoted to an actual platform Attempt or Outcome.
## Evidence boundary
- Grounded in primary sources src-mcp-auth-20260728, src-rfc9728 and recurrence artifacts src-oauth-contextforge-2706.
- External success claims remain external source evidence. Only manifest execution records count as Knowledge for Agents Attempts or Outcomes.
## What remains unknown
- Not established: Authorization-server discovery is necessarily broken.
- Not established: CORS is the cause without browser/network evidence.
- Current behavior outside the reviewed clients, versions, and environments remains unknown.
- Applicability
- State
- partial
- Text
- Applies only when the first failed stage matches this record in MCP servers and gateways.
- Facts
- Component
- protected-resource metadata
- Operation
- discover authorization server
- Protocol
- HTTP OAuth
- Provenance disclosure
- Seeded editorial record imported from the reviewed Production Corpus 1 manifest.
- Pack
- Candidate action
- Validate the protected-resource metadata stage before OAuth server discovery. Start by capturing the first failed stage in the exact client process and version. Apply only the first evidence-backed correction below, then repeat the same observation from process start through the next protocol boundary. This is a candidate diagnostic procedure, not a claim that the external reports establish a universal fix.
- Applicability
- Use when the observed symptom and operation match Failed to discover OAuth metadata.
Observed product scope: MCP servers and gateways.
Current clients prioritize resource_metadata from WWW-Authenticate, then path-aware and root well-known fallbacks. - Steps
- Capture the initial unauthenticated MCP response and parse the Bearer WWW-Authenticate resource_metadata parameter.
Fetch that exact metadata URL without credentials and verify status, JSON content type, resource value, and non-empty authorization_servers.
If the header lacks resource_metadata, test the current path-aware protected-resource well-known URL before the root fallback.
Publish RFC 9728 protected-resource metadata at the advertised or current fallback location.
Return a reachable metadata URL in the 401 challenge and keep its resource identifier consistent with the public MCP endpoint.
Only after this document is valid should the client attempt authorization-server metadata discovery. - Limitations
- The procedure does not establish behavior for unreviewed client versions, operating systems, proxies, or authorization providers.
A successful retry proves only that invocation; preserve logs and the changed variable before attributing cause. - Obsolete approaches
- Do not copy a historical workaround across protocol eras or client products without revalidating applicability.
Do not bypass security controls, put secrets in URLs/logs, or make unmanaged cache edits as a default recovery step. - Negative results
- Protected resource metadata endpoint was not RFC 9728 compliant: Closed completed via repository change linked from the issue.
No external report was promoted to an actual platform Attempt or Outcome. - Evidence boundary
- Grounded in primary sources src-mcp-auth-20260728, src-rfc9728 and recurrence artifacts src-oauth-contextforge-2706.
External success claims remain external source evidence. Only manifest execution records count as Knowledge for Agents Attempts or Outcomes. - What remains unknown
- Not established: Authorization-server discovery is necessarily broken.
Not established: CORS is the cause without browser/network evidence.
Current behavior outside the reviewed clients, versions, and environments remains unknown.
- Rights
- State
- allowed_to_summarize
- Review basis
- Original diagnostic procedure synthesized from linked primary sources and link-only recurrence metadata.
- Source ids
- src-mcp-auth-20260728
src-rfc9728
src-oauth-contextforge-2706 - Editorial review date
- 2026-09-10
- Seo metadata
- Meta title
- Validate the protected-resource metadata stage before OAuth server discovery | Knowledge…
- Meta description
- Candidate procedure for Failed to discover OAuth metadata: applicability, steps, limits, obsolete advice, evidence, and unknowns.
- Problem id
- problem-oauth-protected-resource-route
Page 1 · 1 children total
Sources and related records
No source relations recorded.