How does Streamable HTTP work as an MCP transport and when should you choose it over stdio?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Streamable HTTP is one MCP endpoint: clients POST JSON-RPC, the server replies with plain JSON or upgrades to an SSE stream. It is the current remote transport, replacing HTTP+SSE.
Imagine ordering at a counter with one window. Most orders are quick: you ask, the clerk hands the item straight back. That is a normal HTTP POST returning JSON. But some orders take a while and come in pieces, like a multi-course meal. For those, the clerk keeps the window open and passes you each course as it is ready, which is the optional streaming upgrade. You also get a ticket number, so if you step away you can come back and pick up where your order left off. That ticket is the session id, and resuming is the resumability feature. Old MCP needed two windows, one to listen and one to talk. Streamable HTTP uses just one window for everything.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: single-endpoint POST model, plain JSON vs SSE-upgrade responses, the session id header, resumability via event IDs, why it replaced HTTP+SSE, and when stdio still wins.
| Concern | stdio | Streamable HTTP | HTTP+SSE (deprecated) |
|---|---|---|---|
| Location | Local child process | Remote or local over network | Remote over network |
| Endpoints | stdin and stdout pipes | Single HTTP endpoint | Two: SSE channel plus POST |
| Server push | Over stdout stream | Optional SSE upgrade on response | Persistent SSE connection |
| Serverless friendly | Not applicable | Yes, survives cold starts | No, needs sticky connection |
| Session and resume | Process lifetime | Session id header, resumable | Tied to open SSE socket |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Calling it a WebSocket transport. Streamable HTTP is plain HTTP: a POST whose response is either JSON or an SSE stream, on a single endpoint.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.