[BUG] Still reproducing issue: https://github.com/modelcontextprotocol/typescript-sdk/issues/744 on Claude Code 2.1.128 with an enterprise multi-tenant OAuth server (Broadcom IDSP) serving as the MCP authorization server.

Resolved 💬 3 comments Opened May 5, 2026 by vadiml77 Closed Jun 4, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Still reproducing issue: https://github.com/modelcontextprotocol/typescript-sdk/issues/744 on Claude Code 2.1.128 with an enterprise multi-tenant OAuth server (Broadcom IDSP) serving as the MCP authorization server.

Setup:

  • MCP server config: {"type":"http","url":"https://host/default/aigateway/v1/mcp/{base64-appId}","oauth":{"scopes":"..."}}
  • Protected resource metadata returns: "authorization_servers": ["https://host/default/{appId}/"]
  • The path (/default/{appId}/) encodes both the tenant and the application-specific OAuth endpoints

What happens (from CLAUDE_DEBUG=1 logs):
Returning cached discovery state (authServer: https://host/) ← path stripped
Saving discovery state (authServer: https://host/)
No client info found
HTTP Connection failed after 594ms: (code: none, errno: none)

Claude Code constructs new URL("/.well-known/oauth-authorization-server", "https://host/default/{appId}/") which produces https://host/.well-known/oauth-authorization-server — the leading / in the path
argument causes JavaScript's URL constructor to replace the entire base path.

The correct RFC 8414 URL would be: https://host/.well-known/oauth-authorization-server/default/{appId} (path inserted after /.well-known/ prefix). Our server responds correctly at that URL.

Upstream fix exists: The MCP TypeScript SDK fixed this in modelcontextprotocol/typescript-sdk#744 (https://github.com/modelcontextprotocol/typescript-sdk/issues/744) (closed) and the related #545
(https://github.com/modelcontextprotocol/typescript-sdk/issues/545). Could Claude Code update its SDK dependency to pick up this fix?

What Should Happen?

Claude shoud fix the issue

Error Messages/Logs

Steps to Reproduce

Observe Claude get correct response from oauth_protected_resources and skip making the call to authorization_servers discovery

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.128

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗