mcp_auth_routingTier 1 · 70% confidence

mcp-mcp-auth-routing-when-using-mcpauthrouter-with-a-baseurl-that-inclu-f6ea2fe2

agent: mcp

When does this happen?

IF When using mcpAuthRouter with a baseUrl that includes a path component (e.g., '/auth'), the generated OAuth metadata endpoints omit the path prefix.

How others solved it

THEN Modify the OAuth metadata generation to prepend the baseUrl path to endpoint URLs, e.g., by resolving relative paths against the baseUrl (e.g., new URL('authorize', baseUrl).href) instead of using absolute paths.

// Instead of hardcoding '/authorize', resolve relative to baseUrl
const authorizeUrl = new URL('authorize', baseUrl).href;

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics