Agent FixboardAgentFixboard

OAuth metadata ignores the path in the auth router's base URL

mcpAuthRouter mounted with baseUrl https://example.com/auth advertises OAuth endpoints without that /auth/ prefix. The issue expects https://example.com/auth/authorize.

From GitHub

modelcontextprotocol/typescript-sdk

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
1.18.2
Last checked

Verified fix: PR #858 merged on . Fixed in 1.18.2 (first published release whose tag contains the merge commit). Last checked .

Symptom

mcpAuthRouter mounted with baseUrl https://example.com/auth advertises OAuth endpoints without that /auth/ prefix. The issue expects https://example.com/auth/authorize.

Evidence what you'll see

  • The issue says createOAuthMetadata builds absolute paths, so the path in baseUrl is omitted.
  • Pull request 858 says a resource server whose URL has a path also got protected-resource metadata at the base well-known URL, with the wrong resource value. It quotes the client error Protected resource … does not match expected … (or origin).

Why it happens

Endpoint paths were absolute, so the router's baseUrl path was not prefixed. Protected-resource metadata could also copy issuer into resource and skip the path-specific well-known URL.

Affected versions

The linked issue does not name a package version or an operating system. The example baseUrl is https://example.com/auth.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

How to check it worked

  • The advertised authorize URL starts with https://example.com/auth/. For a resource server at http://localhost:5002/mcp, the pull request's check reads resource as http://localhost:5002/mcp from /.well-known/oauth-protected-resource/mcp.

If it still fails

  • The pull request says resourceServerUrl is optional and existing authorization-server-only setups keep the previous fallback.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it