[BUG] MCP Proxy: SSE stream repeatedly drops with 409 Conflict, reconnection fails
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 claude.ai MCP proxy (mcp-proxy.anthropic.com) consistently drops SSE
connections to a custom MCP server, and reconnection attempts fail with HTTP
409 "Conflict".
## Evidence (from debug logs)
Over the past 10 days of usage:
- 63 successful connections — initial connect always works (~3s)
- 227 connection drops — SSE stream breaks after varying uptimes
- 31 total failures — max reconnection attempts (2) exceeded, server
becomes unreachable
- Drop rate: 360% (drops per connection)
### Uptime before drop (distribution):
| Range | Drops |
|-------|-------|
| < 30s | 11 |
| 30–60s | 3 |
| 1–2 min | 5 |
| 2–5 min | 25 |
| > 5 min | 68 |
### Error pattern (always the same):
MCP server "claude.ai Walter PO": CLAUDEAI-PROXY connection dropped after Xs
uptime
MCP server "claude.ai Walter PO": Connection error: Streamable HTTP error:
Failed to open SSE stream: Conflict
MCP server "claude.ai Walter PO": Connection error: Failed to reconnect SSE
stream: Streamable HTTP error: Failed to open SSE stream: Conflict
MCP server "claude.ai Walter PO": Connection error: Maximum reconnection
attempts (2) exceeded.
## Root cause
The Anthropic MCP proxy returns HTTP 409 Conflict on reconnection,
suggesting it still considers the old session active when the client tries to
re-establish the SSE stream. The upstream MCP server itself (v3.0.0) connects
correctly every time — the issue is in the proxy layer.
## Impact
- MCP tools become unavailable mid-conversation with no way to recover except
restarting Claude Code or using /mcp
- Affects productivity significantly when relying on MCP integrations
## Environment
- Claude Code CLI (macOS)
- MCP server connected via claude.ai proxy transport
- Logs from
~/.claude/debug/*.txt
## Suggested improvements
- Increase max reconnection attempts beyond 2
- Fix 409 Conflict on reconnect — invalidate old session before
re-establishing
- Add automatic reconnection on tool call if connection was lost
What Should Happen?
- SSE stream should be stable — Once connected, the SSE stream should remain
open as long as the Claude Code session is active, not drop every 2–5 minutes
- Reconnection should succeed — When a drop occurs, the proxy should accept
the reconnection instead of returning 409 Conflict. The old session should be
invalidated server-side so a new SSE stream can be established
- More than 2 retry attempts — 2 retries is too aggressive a cutoff. The
client should retry with exponential backoff (e.g. 5–10 attempts over ~60s)
- Graceful recovery — If the connection was lost mid-conversation, the next
tool call should trigger an automatic reconnect transparently, rather than
requiring manual /mcp or a full restart
Error Messages/Logs
Steps to Reproduce
- Set up a custom MCP server connected via claude.ai proxy transport
(configured in Claude Code MCP settings)
- Start a Claude Code session and use any tool from the MCP server — initial
connection succeeds
- Continue working for 2–5 minutes without calling MCP tools
- Call an MCP tool again — the SSE stream has silently dropped, and
reconnection fails with 409 Conflict
- Observe the error chain in ~/.claude/debug/*.txt:
connection dropped after Xs uptime
→ Failed to open SSE stream: Conflict
→ Failed to reconnect SSE stream: [...] Conflict
→ Maximum reconnection attempts (2) exceeded
- MCP server is now unreachable for the rest of the session — only
recoverable via /mcp or restarting Claude Code
Reproduction rate
- ~100% reproducible — happens in virtually every session that lasts more than
a few minutes
- 227 drops across 63 connections over 10 days confirms this is systemic, not
intermittent
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.71
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗