[BUG] Latest Claude desktop version fails to fallback to url ${resource}/.well-known/openid-configuration
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?
The MCP server Url is https://%dnsname%/adb/mcp/v1/databases/%database-name%.
When accessed without bearer token, claude previously invokes url GET https://%dnsname%/adb/mcp/v1/databases/%database-name%/.well-known/openid-configuration
But suddenly this stopped working after this release. We did not implement any /.well-known/oauth-protected-resource endpoint since it was working previously.
As per spec mentioned here https://modelcontextprotocol.io/specification/draft/basic/authorization it should support point 3
- OAuth 2.0 Authorization Server Metadata with path insertion: https://auth.example.com/.well-known/oauth-authorization-server/tenant1
- OpenID Connect Discovery 1.0 with path insertion: https://auth.example.com/.well-known/openid-configuration/tenant1
- OpenID Connect Discovery 1.0 path appending: https://auth.example.com/tenant1/.well-known/openid-configuration
What Should Happen?
The MCP server Url is https://%dnsname%/adb/mcp/v1/databases/%database-name%.
When accessed without bearer token, claude should invoke below url to get auth endpoints.
GET https://%dnsname%/adb/mcp/v1/databases/%database-name%/.well-known/openid-configuration
Error Messages/Logs
[86757] Received error (status unknown): HTTP 404: Invalid OAuth error response: SyntaxError: Unexpected token '<', "<html>
<he"... is not valid JSON. Raw body: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404 Not Found</h2>
<table>
<tr><th>URI:</th><td>/register</td></tr>
<tr><th>STATUS:</th><td>404</td></tr>
<tr><th>MESSAGE:</th><td>Not Found</td></tr>
<tr><th>SERVLET:</th><td>default</td></tr>
</table>
</body>
</html>
Steps to Reproduce
- Create a MCP server. POST https://%dnsname%/x
- Return 401 if no bearer token is passed.
- Create endpoint GET https://%dnsname%/x/.well-known/openid-configuration
- Check if this endpoint is called by claude.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude 1.0.2339 (1782e2) 2025-12-16T19:35:52.000Z
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗