MCP: Claude Code sends legacy 'initialize' after successful modern 'server/discover', breaking modern-only servers
Bug Description
Claude Code 2.1.280 sends a legacy initialize handshake after receiving a successful server/discover response from a modern-only MCP server. Per the MCP 2026-07-28 spec, when server/discover returns a DiscoverResult with supportedVersions: ["2026-07-28"], the client should stay in modern mode and not fall back to initialize.
Steps to Reproduce
- Configure an MCP server that only supports the
2026-07-28protocol (e.g., Atlassian MCP server running fastmcp >= 4.0.0) - Connect via stdio transport with
tengu_mcp_protocol_negotiation_stdio: true - Claude Code sends
server/discover→ server responds withsupportedVersions: ["2026-07-28"] - Claude Code then sends
initialize(legacy handshake) - Server rejects with
-32022: "connection is serving the 2026-07-28 protocol; the initialize handshake is not accepted"
Expected Behavior
After a successful server/discover response indicating modern-only support, Claude Code should proceed in modern mode without sending initialize.
Actual Behavior
Claude Code falls back to initialize after a successful modern discovery, which modern-only servers reject with error -32022.
Why Some Servers Work
Servers like GitHub MCP Server (v1.3.0) reject server/discover entirely, causing Claude Code to correctly fall back to legacy initialize. The bug only manifests with servers that accept server/discover and declare themselves modern-only.
Environment
- Claude Code: 2.1.280
- OS: macOS (Darwin 25.6.0)
- Transport: stdio (via proxy)
- Failing server: Atlassian MCP (fastmcp 4.0.3,
atlassian-mcpv4.0.3) - Working server: GitHub MCP Server v1.3.0 (rejects
server/discover, so legacy path works)