MCP Transports: stdio vs Streamable HTTP (and Why SSE Was Replaced)

How MCP messages travel: local stdio servers vs remote Streamable HTTP servers, session handling, streaming responses and choosing the right transport.

Published December 1, 2026

MCP defines what messages mean; transports define how they travel. There are two standard transports. stdio is for servers running on the same machine as the host. Streamable HTTP is for servers running elsewhere, such as a SaaS vendor's hosted MCP endpoint or a shared internal service. Picking the right one affects security, deployment and how many users a server can support.

The concept

With stdio, the host starts the server as a child process and exchanges newline-delimited JSON-RPC messages over stdin and stdout. It is simple, has no network exposure, and inherits the user's local permissions, which makes it ideal for filesystem, git or local database servers.

Streamable HTTP uses a single HTTP endpoint. The client POSTs JSON-RPC messages; the server replies either with a plain JSON response or upgrades that response to a Server-Sent Events stream when it needs to send progress updates or multiple messages. An optional session ID header ties requests together. It replaced the earlier "HTTP+SSE" transport, which required two separate endpoints and a long-lived connection, making it awkward behind load balancers and serverless platforms.

Comparison

stdioStreamable HTTP
Where the server runsSame machine, child processAnywhere reachable over HTTPS
Users per serverOne (the local user)Many
AuthOS user permissionsOAuth 2.1 / tokens
Network exposureNonePublic or private endpoint
StreamingNatural (pipe)SSE on demand within a response
Typical useFilesystem, git, local DB, CLIsSaaS integrations, shared company tools

Streamable HTTP in action

ClientHTTP endpoint /mcpPOST initialize200 + Mcp-Session-IdPOST tools/call (session id)SSE: progress… progress… resultDELETE /mcp (end session)
A Streamable HTTP session with a streamed tool result.

Choosing a transport

  1. Is the data local to the user's machine? → stdio
  2. Do many users or machines need it? → Streamable HTTP
  3. Does it need central credentials (company API keys)? → Streamable HTTP with OAuth
  4. Serverless or behind a load balancer? → Streamable HTTP (stateless mode if possible)
Quick decision guide.

Practical examples

Raw stdio exchange

Each line is one JSON-RPC message.

→ {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"demo","version":"1"}}}
← {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2025-06-18","capabilities":{"tools":{}},"serverInfo":{"name":"notes","version":"1.0"}}}

Calling a Streamable HTTP server with curl

Clients must accept both JSON and event streams.

curl -N https://mcp.example.com/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H 'Authorization: Bearer <token>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Bridging a remote server into a stdio-only host

Community proxies can expose a remote server as a local stdio process.

{ "mcpServers": { "remote-crm": { "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.example.com/mcp"] } } }

Common mistakes

  • Exposing a stdio-designed server (full filesystem access) over HTTP without auth.
  • Keeping server state in memory while running multiple replicas behind a load balancer without sticky sessions.
  • Load balancers or proxies buffering SSE responses, breaking streaming.
  • Using the deprecated HTTP+SSE transport for new servers.

Key takeaways

  • stdio: local, single-user, no network exposure.
  • Streamable HTTP: one endpoint, optional SSE streaming, many users.
  • Remote servers need proper authentication, typically OAuth 2.1.
  • Design HTTP servers to be stateless or session-aware behind load balancers.

FAQ

Can one server support both transports?

Yes. SDKs let you choose the transport at startup, so the same tools can run locally or remotely.

What protocol version string should I use?

Use the version your SDK negotiates; client and server agree on a version during initialize.

Does Streamable HTTP require SSE?

No. Simple request/response calls can return plain JSON. SSE is used only when the server needs to stream.

More AI articles