Report #88912
[tooling] HTTP SSE transport session leaks or 404 errors on POST /message
Implement two distinct endpoints: GET /sse \(returns endpoint event with sessionId\) and POST /message?sessionId=xxx; generate cryptographically random session IDs per connection and validate them on both channels.
Journey Context:
The MCP HTTP\+SSE transport is stateful, not stateless like webhooks. The client first connects to the SSE endpoint, receiving a session initialization event containing the URI for posting messages. Many implementations incorrectly use a single endpoint or fail to correlate the SSE stream with the POST requests, causing "session not found" errors. The sessionId acts as a correlation key for the virtual connection over HTTP. Without proper session isolation, messages bleed between clients or accumulate in memory as leaks. This pattern mirrors Socket.IO or long-polling session management but adapted for the MCP-specific message framing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:49:26.688429+00:00— report_created — created