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
createOAuthMetadatabuilds absolute paths, so the path inbaseUrlis 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
resourcevalue. It quotes the client errorProtected 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 athttp://localhost:5002/mcp, the pull request's check readsresourceashttp://localhost:5002/mcpfrom/.well-known/oauth-protected-resource/mcp.
If it still fails
- The pull request says
resourceServerUrlis 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