What is an MCP transport? stdio vs Streamable HTTP

Also called stdio transport, Streamable HTTP, MCP stdio

Definition

An MCP transport is the binding that carries Model Context Protocol messages between a client and a server; the specification defines stdio for local subprocesses and Streamable HTTP for remote servers.

An MCP transport is the layer that frames and delivers JSON-RPC messages between an MCP client and an MCP server. The transports page of the current specification, revision 2026-07-28, calls each transport a binding: it defines how messages are framed, where request metadata travels, and how cancellation and termination are signaled, while the meaning of every message stays the same on every transport. The choice of transport decides who starts the server, how callers authenticate, and what infrastructure can sit in between.

How MCP transports work#

MCP defines two standard transports. With stdio, the client launches the server as a subprocess and exchanges one JSON-RPC message per line over standard input and output. With Streamable HTTP, the server runs independently, and the client sends every message as its own HTTP POST to a single endpoint.

On stdio, messages must not contain embedded newlines, the server must not write anything to stdout that is not a valid MCP message, and it may log to stderr. The client cancels a request with a notifications/cancelled message and shuts the server down by closing its stdin, escalating to a forced kill if the process does not exit. The specification's authorization framework does not apply; a stdio server reads credentials from its environment.

On Streamable HTTP, the server exposes one MCP endpoint, such as https://example.com/mcp. The server answers each POST with a single JSON object or a Server-Sent Events stream scoped to that request, and closing that stream cancels the request. Every POST carries an MCP-Protocol-Version header and an Mcp-Method header, plus Mcp-Name for tools/call, resources/read, and prompts/get. These headers mirror the body so that load balancers and MCP gateways can route without parsing JSON, and a server rejects any mismatch with a HeaderMismatch error. Servers must validate the Origin header to block DNS rebinding, and a local HTTP server should bind to 127.0.0.1.

Custom transports are allowed if they keep the JSON-RPC format, message patterns, and per-request metadata, and byte-stream channels such as Unix sockets should reuse stdio framing.

stdio vs Streamable HTTP#

stdio fits a server that runs on the user's machine for a single host application. Streamable HTTP fits a server deployed as a shared service for many clients. stdio relies on process isolation and environment variables for credentials, while Streamable HTTP should use the specification's OAuth-based authorization framework and has to defend against network attacks.

stdio Streamable HTTP
Server lifecycle Launched and stopped by the client Runs independently
Framing One JSON-RPC message per line One HTTP POST per message
Replies One shared stdout channel A JSON object or a per-request SSE stream
Request metadata Message body only Body, mirrored into HTTP headers
Cancellation notifications/cancelled Close the response stream
Credentials Environment variables OAuth-based HTTP authorization

Revision 2026-07-28 also changed Streamable HTTP itself. It removed protocol-level sessions and the Mcp-Session-Id header, the standalone GET stream, and stream resumption with Last-Event-ID. Long-lived change notifications now arrive on the response stream of a subscriptions/listen request. Tutorials written for revisions 2025-03-26 through 2025-11-25 describe the older shape.

The deprecated HTTP+SSE transport#

The HTTP+SSE transport from the first public revision, 2024-11-05, paired a GET request that opened a server-sent events stream with a separate POST endpoint for client messages. Streamable HTTP replaced it in revision 2025-03-26, and the 2026-07-28 changelog reclassified HTTP+SSE as Deprecated under the project's feature lifecycle policy.

That policy sets a minimum twelve-month deprecation window, and HTTP+SSE is eligible for removal in a future revision, so new implementations should not adopt it. A server that must support older clients can keep hosting the old SSE and POST endpoints next to the new MCP endpoint. A client that must support older servers tries a POST first; if that fails with 400, 404, or 405 and no recognized modern JSON-RPC error, it sends a GET and treats an endpoint event as the sign of a legacy server.

How to build an MCP server shows the same server code running over both standard transports.

Cite this definition

The AI Engineering Editors. "What is an MCP transport? stdio vs Streamable HTTP." The AI Engineering, updated Nov 06, 2026. https://theaiengineering.com/glossary/mcp-transport

Title
What is an MCP transport? stdio vs Streamable HTTP
Author
The AI Engineering Editors
Publisher
The AI Engineering
Updated
View as Markdown

Part of the Model Context Protocol hub · Updated