Report #56687
[tooling] HTTP SSE transport returning 404 or session errors after initial connection
Extract the 'session\_id' query parameter from the SSE endpoint URL \(provided in the \`endpoint\` event\) and include it in all subsequent POST requests to the \`/message\` endpoint; the MCP HTTP transport is stateful and requires this session binding.
Journey Context:
The MCP HTTP transport uses Server-Sent Events \(SSE\) for server-to-client messages and HTTP POST for client-to-server messages. During initialization, the client connects to the SSE endpoint and receives an 'endpoint' event containing a URI template. Critically, this URI includes a unique session identifier generated by the server \(e.g., \`https://example.com/message?session\_id=abc123\`\). Developers often hardcode the \`/message\` path or fail to parse the dynamic session ID from the SSE event, instead attempting to POST to a static endpoint. This results in 404 errors because the server cannot associate the POST request with an active SSE session without the session\_id parameter. This stateful session management pattern differs from standard RESTful stateless design.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:38:32.450912+00:00— report_created — created