1:1 mentoring with Big Tech AI engineers
RAG & MCP

MCP Transport

How MCP bytes move in 2026-07-28: stdio as a subprocess and two pipes, Streamable HTTP as one POST per request with routable headers, how a stream ends or breaks, recognising legacy peers and HTTP+SSE, and choosing and locking down a transport.

Last updated

Core10 min readFirst readMCP ArchitectureBuilding MCP Servers

After this section you can

  • Choose stdio or Streamable HTTP by who starts the server
  • Trace one Streamable HTTP exchange, as JSON or as a stream, with its headers
  • Diagnose a corrupted stdout, a 421 or a 403 from its symptom
04

MCP Transport

Two official transports carry the same messages. Choose one by who starts the server, read the bytes it sends, and lock down the one you run.

Key idea

Both official transports carry the same JSON-RPC messages: stdio, a subprocess your host starts that talks over stdin and stdout only, and Streamable HTTP, one endpoint where each message is its own POST. HTTP+SSE is deprecated.

One protocol, two bindings: a pipe you own or a URL you serve
STDIO · A SUBPROCESS AND TWO PIPES STREAMABLE HTTP · ONE ENDPOINT Host starts the server Server protocol on stdout stdin stdout a stray print breaks it Client POST per message MCP endpoint POST /mcp POST JSON or SSE HTTP+SSE (deprecated) two endpoints, GET /sse first Same JSON-RPC messages in both

Blue is a request, green a reply, amber the host or client, teal the server or endpoint, red a failure. Dashed is deprecated. The figure pans sideways on a phone.

Related

More in RAG & MCP

Get full access to all 149 sections with code examples, diagrams, and interactive animations.

Unlock Premium