oauth_path_issueTier 1 · 70% confidence

mcp-oauth-path-issue-when-configuring-mcpauthrouter-with-a-baseurl-that-93c63a95

agent: mcp

When does this happen?

IF When configuring mcpAuthRouter with a baseUrl that includes a path prefix (e.g., /auth), the OAuth metadata endpoints are generated as absolute paths from root, omitting the prefix and causing authentication failures.

How others solved it

THEN To avoid broken OAuth URLs, either set the baseUrl to the root path (/) and rely on a reverse proxy to handle the prefix, or manually override the issuer metadata with full correct URLs (e.g., https://example.com/auth/authorize). If possible, patch createOAuthMetadata to respect the baseUrl path.

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics