-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
When connecting via Claude Code's HTTP MCP transport, the connection fails with:
HTTP 404: Invalid OAuth error response: SyntaxError: JSON Parse error: Unexpected identifier "Not". Raw body: Not Found
Root cause
Claude Code's HTTP MCP client performs OAuth 2.0 discovery before connecting, by hitting:
GET https://mcp.data.gouv.fr/.well-known/oauth-authorization-server
This endpoint returns a plain-text Not Found (HTTP 404). Claude Code then tries to parse that as a JSON OAuth error response, fails, and aborts the connection.
Expected behavior
The server should either:
- Return a valid JSON response at /.well-known/oauth-authorization-server indicating no authentication is required, or
- Return a properly-formatted JSON error (e.g. {"error": "..."}) so the client can handle it gracefully
Workaround
None currently
Environment
- Client: Claude Code
- Configured via: claude mcp add --transport http datagouv https://mcp.data.gouv.fr/mcp
- The MCP endpoint itself responds correctly (verified via curl with appropriate headers)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels