[BUG] MCP HTTP server connection fails in v2.1.84+ when server uses stateless transport (GET /mcp returns 405)
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?
Description
Starting from v2.1.84, Claude Code fails to connect to MCP servers that use the stateless HTTP transport. The connection worked fine in v2.1.83.
Root Cause
Claude Code v2.1.84+ appears to send a GET request to the MCP endpoint (e.g. /mcp) to establish an SSE stream, as defined by the MCP spec 2025-11-25 resumability/streaming support.
MCP servers implemented using the stateless transport (e.g. Spring AI's WebMvcStatelessServerTransport) explicitly return HTTP 405 Method Not Allowed on GET requests — only POST is supported. This causes Claude Code to mark the server as failed instead of falling back to POST-only communication.
Expected Behavior
Claude Code should either:
- Option A: Gracefully fall back to POST-only mode when GET returns 405 (backwards compatibility with stateless MCP servers)
- Option B: Document that stateless/POST-only MCP servers are no longer supported and that servers must implement SSE via GET
Actual Behavior
Server is marked as failed. Error message in Claude Code:
Failed to connect to MCP server 'my-server': failed
Workaround
Switch the MCP server to the streamable transport (supports both GET for SSE and POST). This resolves the issue.
Environment
- Claude Code version: 2.1.84 (broken), 2.1.83 (working)
- MCP server: Spring AI
spring-ai-starter-mcp-server-webmvc:1.1.3withprotocol: STATELESS - MCP protocol version advertised by server:
2025-06-18 - Transport: HTTP (not stdio)
What Should Happen?
Claude Code should gracefully fall back to POST-only mode when GET returns 405, maintaining backwards compatibility with stateless MCP servers. Alternatively, if GET/SSE is now required, this breaking change should be documented in the release notes.
Error Messages/Logs
For the "Error Messages/Logs" field:
✗ Failed to connect to MCP server 'kara': failed
From Claude Code's internal logs (visible with `--debug`):
[Agent] Failed to connect to MCP server 'kara': failed
The server-side log shows the GET request hitting the endpoint and returning `HTTP 405 Method Not Allowed` — no error on the server side, it's intentional behavior of the stateless transport.
Steps to Reproduce
- Set up an MCP HTTP server using the stateless transport (POST-only, no SSE)
- Register it with Claude Code:
claude mcp add --transport http my-server https://example.com/mcp - Run
claude mcp list— server shows as✗ Failed to connectin v2.1.84+ - Downgrade to v2.1.83 — server shows as
✓ Connected
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
v2.1.83
Claude Code Version
v2.1.85
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Warp
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗