← GUIDES

GUIDES / TOOLS

MCP stdio vs Streamable HTTP: Which Transport to Use

How MCP's two standard transports work in the 2026-07-28 spec, what changed for Streamable HTTP, and how to pick one for a local or remote server.

6 Nov 2026Checked 2026-10-30
Diagram comparing MCP stdio, where the client launches the server as a subprocess, with Streamable HTTP, where the client posts each message to one MCP endpoint

Use stdio when the MCP server runs on the same machine as the agent and the client can launch it as a subprocess; use Streamable HTTP when the server runs as its own service that several clients reach over the network. The protocol messages are the same on both. Only the delivery, cancellation and security surface change.

This guide explains both transports as defined in the current Model Context Protocol specification (revision 2026-07-28), flags what changed from earlier revisions, and ends with a checklist for each.

What a transport is in MCP

The spec is explicit that a transport is a binding: it defines how messages are framed and delivered, how request metadata is carried, and how cancellation is signalled. It does not change what the messages mean. In the spec's words, "Protocol semantics are identical on every transport."

Every message is JSON-RPC, UTF-8 encoded. In the 2026-07-28 revision, every request also carries its protocol version and client capabilities in _meta.io.modelcontextprotocol/* fields inside the message body.

There are two standard bindings: stdio and Streamable HTTP. Custom transports are allowed, and the spec says ones built on a reliable byte stream, such as a Unix socket or TCP, should reuse the stdio framing.

How stdio works

In the stdio binding, the client launches the server as a subprocess and they talk over its standard streams:

  • The client writes JSON-RPC requests and notifications to the server's stdin, one message per line. Messages must not contain embedded newlines.
  • The server writes responses and notifications to stdout. It must not write anything to stdout that is not a valid MCP message.
  • The server may write logs to stderr, and the client should not assume stderr output means an error.

That stdout rule is the one that bites in practice. A stray print() or a library banner on stdout corrupts the channel. Send all logging to stderr.

Cancellation: the client sends a notifications/cancelled notification with the request's ID, because there is one shared channel and no per-request stream to close.

Shutdown: the client should close the server's input stream, wait, then force-terminate if needed (on POSIX, typically SIGTERM then SIGKILL). Servers should exit promptly when stdin closes. If the server crashes, the client should restart it. Because the current protocol is stateless, in-flight requests are lost and can be retried.

Security shape: there is no network listener. The server runs with whatever permissions the launching process has, so its reach is your local user's reach unless you sandbox it.

How Streamable HTTP works

In the Streamable HTTP binding, the server is an independent process that can serve many clients:

  • The server exposes one MCP endpoint (for example https://example.com/mcp) that accepts POST.
  • Every client message is its own HTTP POST, with an Accept header listing both application/json and text/event-stream.
  • For each request, the server replies with either a single JSON object or a Server-Sent Events stream scoped to that request, which can carry progress notifications before the final response.
  • Notifications the server accepts get 202 Accepted with no body.

Each POST carries headers that mirror the body so gateways and load balancers can route without parsing JSON: MCP-Protocol-Version (which must match the version in _meta, or the server rejects it with 400), plus Mcp-Method for every request and Mcp-Name for tools/call, resources/read and prompts/get.

Cancellation: closing the request's SSE stream is the cancel signal. The server must treat it as cancellation.

Change notifications such as tool-list changes arrive on a long-lived stream opened by a subscriptions/listen request, not on a separate GET channel.

What changed in 2026-07-28

The Streamable HTTP page and the 2026-07-28 changelog both flag two removals compared with revisions 2025-03-26 through 2025-11-25:

  1. No protocol-level sessions. The earlier Mcp-Session-Id header is gone, along with the initialize handshake. The changelog says servers that need state across calls should use explicit, server-minted handles passed as ordinary tool arguments.
  2. No GET stream endpoint. The changelog replaces it, and resources/subscribe, with subscriptions/listen. Servers no longer push independent requests on a standing stream. When a server needs input from the client (sampling, elicitation, roots), it returns an InputRequiredResult and the client retries the original request with the answers.

Resumable streams via Last-Event-ID are also not supported in this revision. A broken response stream loses the in-flight request, and the client must send it again as a new request. If one end still speaks an older revision, read the binding's backward-compatibility section. A server that supports only 2026-07-28 should answer an old client's GET or DELETE with 405 Method Not Allowed and ignore any Mcp-Session-Id or Last-Event-ID header. A client that supports both eras may try a modern request first and fall back to initialize only if the server's 400 reply is not a recognised modern error.

Many tools you install today may still implement an earlier revision. Check the version a server advertises rather than assuming.

The security rules you must implement

The spec lists three, and the first is a hard requirement:

  1. Servers must validate the Origin header on all incoming connections, and return 403 Forbidden if it is present and invalid. This prevents DNS rebinding attacks.
  2. When running locally, servers should bind to 127.0.0.1, not 0.0.0.0.
  3. Servers should authenticate all connections. The spec's separate authorization section covers how.

The spec's warning is direct: without these, "attackers could use DNS rebinding to interact with local MCP servers from remote websites."

How to choose

If...Use
The server is a local tool (browser, files, a CLI) used by one agent on one machinestdio
You want the client to manage the server's lifecycle and restart it on crashstdio
The server is shared by several clients or usersStreamable HTTP
The server is a hosted service run by a vendorStreamable HTTP
You need gateways, load balancers or HTTP auth in front of itStreamable HTTP

Our live kits show both. The Playwright MCP kit has Claude Code start the server with npx over stdio. The GitHub MCP kit connects to GitHub's hosted endpoint over Streamable HTTP, with the local github-mcp-server binary over stdio as the alternative, both limited to read-only toolsets.

Checklists

stdio - [ ] All logs go to stderr; nothing but MCP messages on stdout. - [ ] The server exits when stdin closes. - [ ] The server version is pinned, not @latest. - [ ] The subprocess runs with the narrowest permissions and filesystem access the job needs.

Streamable HTTP - [ ] Origin validated; invalid origins get 403. - [ ] Local servers bound to 127.0.0.1. - [ ] Authentication on every connection. - [ ] Reverse proxies don't buffer SSE (the spec suggests servers send X-Accel-Buffering: no). - [ ] You know which protocol revision both ends speak.

The takeaway

The transport doesn't change what your agent can do. It changes who can reach the server and how failures look. Default to stdio for local, single-agent tools; move to Streamable HTTP when the server must be shared, and implement the Origin, localhost and authentication rules before anything else.

Next step: compare the two in working setups with the Playwright MCP kit and the GitHub MCP kit, or find an agent for the job.

Sources and credits

All sources checked 28 Oct 2026 against MCP specification revision 2026-07-28, and re-checked 30 Oct 2026 against its changelog.

  • Model Context Protocol, Transports overview: https://modelcontextprotocol.io/specification/2026-07-28/basic/transports
  • Model Context Protocol, stdio binding: https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/stdio
  • Model Context Protocol, Streamable HTTP binding: https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http
  • Model Context Protocol, Authorization: https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/index
  • Model Context Protocol, 2026-07-28 changelog: https://modelcontextprotocol.io/specification/2026-07-28/changelog
  • Agent Setup Kits, Playwright MCP and GitHub MCP kits (linked above)

This guide is independent and not affiliated with or endorsed by the Model Context Protocol project. Found something out of date? Tell us through submit. How this site checks claims is on verification.

Good setups, worth keeping. Request email updates on the home page, then confirm by email. No subscription starts until you confirm.

On this site

Your privacy choices

Choose optional tools. Rejecting them keeps the setup library available. Advertising consent stays off.

Choices stay in this browser for 90 days. You can change them using Privacy settings. Privacy and cookie details