No session/conversation identifier sent to MCP servers — cannot distinguish concurrent sessions
Open 💬 11 comments Opened Apr 1, 2026 by ben1787
Description
When Claude Code, Claude Desktop, or claude.ai connects to an HTTP MCP server, there is no way for the server to identify which conversation or session a request belongs to. This makes it impossible to maintain per-conversation state on the server side.
The Problem
Mcp-Session-Idnot sent back: The server returnsmcp-session-idin theinitializeresponse header (per MCP spec), but Claude does not echo it back on subsequent requests. Server logs showsession_id_from_header=Noneon all post-init requests.
- No conversation/instance identifier: Request headers contain only standard HTTP headers (
accept,content-type,mcp-protocol-version,user-agent: Claude-User) plus tracing headers (traceparent,baggage). No conversation ID, instance ID, or session reference.
clientInfois generic: Theinitializerequest'sclientInfois always{"name": "claude-ai", "version": "0.1.0"}with no per-instance differentiation. The MCPImplementationschema doesn't include session/instance fields.
Impact
- Multiple concurrent users/conversations: With multiple Claude instances hitting the same MCP server (common in team settings), the server cannot distinguish requests from different conversations
- Per-conversation state: Cannot track what context has been delivered to which conversation (e.g., instructions, onboarding flows)
- Session management: The MCP spec defines
Mcp-Session-Idfor this purpose, but it doesn't work because the client doesn't send it back - Fargate/Lambda deployments: Without session affinity, requests from the same conversation may hit different server instances, making in-memory state useless
Expected Behavior
At minimum, Claude should echo back the Mcp-Session-Id header that the server assigns during initialize, as required by the MCP Streamable HTTP transport specification:
"If the server responds with a Mcp-Session-Id header, the client MUST include it on all subsequent requests."
Ideally, Claude would also include a conversation/instance identifier (e.g., X-Claude-Conversation-Id or a field in clientInfo) so servers can distinguish concurrent sessions even across server restarts.
Environment
- Claude Code v2.1.87
- Claude Desktop (claude.ai)
- MCP Protocol Version: 2025-11-25
- Confirmed by inspecting all request headers server-side
Related Issues
- modelcontextprotocol/modelcontextprotocol#231 (API/Client-defined session IDs)
- anthropics/claude-code#25642 (Expose $CLAUDE_SESSION_ID)
- anthropics/claude-code#27142 (Stale Mcp-Session-Id bug)
🤖 Generated with Claude Code
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗