Try Bifrost Enterprise free for 14 days. Request access

MCP STDIO vs Streamable HTTP: Which Transport to Use

MCP Streamable HTTP and STDIO are the two standard transports for the Model Context Protocol. This guide explains how each one carries messages under the 2026-07-28 specification, how they differ on security, scaling, and deployment, and how a gateway serves both behind one endpoint.

MCP STDIO vs Streamable HTTP: Which Transport to Use

TL;DR

  • MCP defines two standard transports: STDIO, where a client launches a local server process and talks over stdin and stdout, and Streamable HTTP, where clients POST messages to one HTTP endpoint.
  • STDIO suits single-user tools that need local files or desktop access; Streamable HTTP suits shared, remote servers used by many people, agents, or hosts.
  • The 2026-07-28 MCP specification removed sessions, the initialize handshake, and the standalone GET stream from Streamable HTTP, so any request can reach any server instance.
  • The older HTTP+SSE transport is deprecated; new servers should use Streamable HTTP.
  • Bifrost connects to STDIO, Streamable HTTP, and legacy SSE servers and exposes all of them to clients through one authenticated /mcp endpoint.

MCP Streamable HTTP and STDIO are the two standard transports of the Model Context Protocol: STDIO runs an MCP server as a local subprocess that exchanges JSON-RPC messages over standard input and output, while Streamable HTTP exposes a server at a single HTTP endpoint that clients reach over the network. The choice between them decides who can use a server, how it is secured, and how it scales. Bifrost, the open-source MCP and AI gateway built by Maxim AI, connects to servers over either transport. This guide explains how each transport works under the current specification and when to use each.

What Is an MCP Transport?

An MCP transport is the binding that carries Model Context Protocol messages between a client and a server. The protocol itself, JSON-RPC requests, responses, and notifications for tools, resources, and prompts, is the same on every transport; the transport defines how messages are framed, delivered, and cancelled.

The MCP transports specification defines two standard bindings, STDIO and Streamable HTTP, and allows custom transports that preserve the JSON-RPC format and message patterns. A third transport, HTTP with Server-Sent Events from the 2024-11-05 revision, is deprecated.

Because the protocol is identical across transports, a server can usually support both; the decision is about deployment. Our MCP architecture reference covers the host, client, and server roles that sit on either side of the transport.

How the STDIO Transport Works

With the STDIO transport, the MCP client launches the server as a subprocess and the two communicate over the subprocess's standard streams. The server reads JSON-RPC messages from stdin and writes them to stdout, one message per line, and may write logs to stderr.

Top lane: a client launches a local server and exchanges JSON-RPC lines over stdin and stdout; bottom lane: a client POSTs each message to one HTTP endpoint

Top lane: a client launches a local server and exchanges JSON-RPC lines over stdin and stdout; bottom lane: a client POSTs each message to one HTTP endpoint

Figure 1: STDIO is a private pipe to a local process; Streamable HTTP is a network endpoint any authorized client can reach.

The rules that matter in practice, per the specification:

  • Newline-delimited messages. Each line is one JSON-RPC message; messages must not contain embedded newlines.
  • Clean stdout. The server must not write anything to stdout that is not a valid MCP message, which is the most common cause of broken STDIO servers.
  • Logs on stderr. Clients may capture or ignore stderr and should not treat it as an error signal.
  • Shutdown by closing stdin. The client closes the input stream, waits, and terminates the process if it does not exit.
  • Credentials from the environment. A STDIO MCP server inherits the environment of the process that launched it, so it usually reads tokens from environment variables.

STDIO's strength is isolation and simplicity: no network port, no listener to secure, and direct access to local files and applications. Its limit is reach: only the process that launched the server can use it, as the MCP client vs server comparison explains.

How the Streamable HTTP Transport Works

With Streamable HTTP, the MCP server runs as an independent process with a single HTTP endpoint, such as https://example.com/mcp, that accepts POST. The client sends every JSON-RPC request as its own POST, and the server answers with either a single JSON object or a Server-Sent Events stream scoped to that request.

Under the Streamable HTTP binding in the 2026-07-28 specification:

  • One endpoint, one POST per message. The client includes an Accept header listing application/json and text/event-stream.
  • Request metadata in headers. Each POST carries MCP-Protocol-Version, Mcp-Method, and, for tool, resource, and prompt calls, Mcp-Name, mirrored from the body so load balancers and gateways can route without parsing JSON. Servers must reject requests whose headers do not match the body.
  • Request-scoped streams. An SSE response carries progress notifications and the final result for that request only; closing the stream cancels the request.
  • Long-lived notifications such as tool list changes arrive on the response stream of a subscriptions/listen request.
  • Security requirements. Servers must validate the Origin header to prevent DNS rebinding, should bind to localhost when running locally, and should authenticate all connections.

The trade-off mirrors STDIO's: Streamable HTTP reaches any authorized client on the network, which also means it needs authentication, TLS, and access control. The MCP authentication reference covers the OAuth-based authorization model for remote servers.

What Changed in the 2026-07-28 MCP Specification

The 2026-07-28 revision made MCP stateless at the protocol level. It removed the initialize handshake and the Mcp-Session-Id header, removed the standalone GET stream from Streamable HTTP, and moved server-to-client requests such as sampling and elicitation into results returned to the client.

Changes that affect transport choice:

  • No protocol sessions. Every request carries its protocol version and client capabilities in _meta, so it stands on its own.
  • No GET or DELETE on the endpoint. Servers on the new revision respond with 405 Method Not Allowed to those methods from older clients.
  • No stream resumption. Last-Event-ID is no longer supported; recovery means retrying the request.
  • Server input requests embedded in results. Instead of sending its own JSON-RPC request, a server returns an InputRequiredResult and the client retries with the answers.

The MCP 2026-07-28 release announcement describes the goal plainly: any request can land on any server instance behind a plain round-robin load balancer, without shared storage. STDIO changed less, since it was always one client and one process, but it gained the same per-request metadata and a server/discover probe for detecting older servers.

Under the 2026-07-28 MCP revision, each self-contained POST can go to any server instance behind a round-robin load balancer, with no session ID or sticky routing required

Under the 2026-07-28 MCP revision, each self-contained POST can go to any server instance behind a round-robin load balancer, with no session ID or sticky routing required

Figure 2: Removing protocol sessions turns an MCP server into an ordinary stateless HTTP service.

Clients and servers on older revisions still exist, so backward compatibility matters. The specification describes how clients detect an older server and fall back to the initialize handshake. Our page on MCP SSE vs Streamable HTTP covers the earlier transport transition in detail.

MCP Streamable HTTP vs STDIO: Side-by-Side Comparison

MCP Streamable HTTP and STDIO differ in where the server runs, who can connect, how it is secured, and how it scales. STDIO is local and single-client; Streamable HTTP is remote and multi-client. The protocol messages are the same on both.

Attribute STDIO Streamable HTTP
Where the server runs Subprocess on the client's machine Independent process, local or remote
Who can connect Only the launching client Any authorized client over the network
Framing Newline-delimited JSON-RPC on stdin and stdout One HTTP POST per message; JSON or SSE response
Request metadata In the JSON-RPC body only In the body, mirrored into HTTP headers
Cancellation notifications/cancelled message Closing the response stream
Authentication Inherits the launching process's environment Authorization headers, typically OAuth
Network exposure None Requires TLS, Origin validation, and auth
Scaling One process per client Horizontal behind a load balancer (stateless in 2026-07-28)
Typical use Local file, Git, and desktop tools for one developer Shared SaaS, database, and internal service tools
Operational owner The individual user A platform or service team

The overview of the MCP protocol's transports, primitives, and message lifecycle walks through the same differences from the protocol side.

When to Use STDIO vs Streamable HTTP

Use STDIO when one person runs the server for their own use and it needs local resources such as files, a Git checkout, or desktop applications. Use Streamable HTTP when a server is shared by several people, agents, or hosts, or when it wraps a service that already lives on the network.

Decision flow: a server used by one person on one machine can use STDIO; a server shared by many users, agents, or hosts should use Streamable HTTP behind authentication

Decision flow: a server used by one person on one machine can use STDIO; a server shared by many users, agents, or hosts should use Streamable HTTP behind authentication

Figure 3: Choose by who needs to reach the server, not by which transport is newer.

Good STDIO candidates:

  • Filesystem and Git tools scoped to a developer's working copy.
  • Desktop automation that drives local applications.
  • Prototypes a developer is building and testing alone.

Good Streamable HTTP candidates:

  • SaaS and internal APIs such as ticketing, CRM, and documentation search, used by many agents.
  • Database tools that need central credentials and access control.
  • Servers used from CI or cloud agents, where there is no local desktop to launch a subprocess.

A practical warning about STDIO at scale: when every developer runs the same server locally, every laptop holds its own credential, and nobody has a central view of which tools are called. The guide to remote MCP server gateways covers moving those servers to a shared deployment.

Running STDIO and Streamable HTTP Servers Through One Gateway

Running STDIO and Streamable HTTP servers through one gateway lets every client use a single authenticated endpoint, while the gateway handles each upstream server's transport. Bifrost connects upstream to STDIO, HTTP, and SSE servers and exposes their tools through its own /mcp endpoint, with access control and logging applied the same way to all of them.

Claude Code, Cursor, and custom agents connect to the Bifrost /mcp endpoint over HTTP; Bifrost connects upstream to STDIO servers it launches, remote Streamable HTTP servers, and legacy SSE servers

Claude Code, Cursor, and custom agents connect to the Bifrost /mcp endpoint over HTTP; Bifrost connects upstream to STDIO servers it launches, remote Streamable HTTP servers, and legacy SSE servers

Figure 4: Clients see one authenticated HTTP endpoint; the gateway handles each upstream server's transport and protocol version.

How Bifrost handles each transport, per its guide to connecting MCP servers:

  • STDIO. Bifrost launches the server process with the configured command, arguments, and environment variables on the gateway host, so a local-only server becomes reachable to remote clients through the gateway. In Docker deployments, the command it runs must exist in the container image.
  • HTTP. Bifrost connects to the server URL, with a per-server choice between one persistent connection and a fresh connection per tool call.
  • SSE. Older servers on the deprecated transport keep working on the protocol versions that support it.

On the client side, the MCP gateway speaks protocol versions 2025-06-18, 2025-11-25, and 2026-07-28, and versions are agreed per connection, so clients and servers on different versions work together through Bifrost. The MCP gateway product page summarizes the full capability set.

Security and Operations Across Both Transports

Security differs by transport, but the controls that matter for shared tool access are the same: authenticate callers, limit which tools each caller can see, keep upstream credentials out of clients, and record every call. A gateway applies these consistently whether a server speaks STDIO or Streamable HTTP.

What Bifrost applies across transports:

  • Caller authentication. Clients authenticate to the /mcp endpoint with a virtual key, which scopes the tools they see.
  • Tool filtering. Tool filtering works per client, per request, and per virtual key, so a read-only key never sees write tools on any server.
  • Upstream credentials. HTTP servers can use MCP authentication modes including static headers, OAuth 2.0, per-user OAuth, per-user headers, and token exchange; STDIO servers receive credentials as environment variables on the gateway host instead of on every laptop.
  • Resilience. Bifrost retries transient connection failures with exponential backoff and runs health checks that reconnect failed servers.
  • Token cost. Code Mode cuts input tokens by up to 92.8% across large tool sets, regardless of the transport each server uses, as the MCP gateway resource page details.

For the background on why a gateway sits between clients and servers, see MCP: the protocol, the plumbing, and the gateway.

Frequently Asked Questions

What is the difference between MCP STDIO and Streamable HTTP?

STDIO runs an MCP server as a subprocess of the client and exchanges newline-delimited JSON-RPC over stdin and stdout, so only that client can use it. Streamable HTTP exposes the server at one HTTP endpoint where clients POST each message and receive JSON or an SSE stream, so many authorized clients can share it over the network.

Is SSE deprecated in MCP?

Yes. The HTTP+SSE transport from the 2024-11-05 revision has been deprecated since 2025-03-26, and new implementations should use Streamable HTTP. Streamable HTTP still uses Server-Sent Events inside individual responses, so SSE as a streaming format continues; the separate legacy transport is what is deprecated.

Does Streamable HTTP still use sessions?

Not in the 2026-07-28 specification. That revision removed the Mcp-Session-Id header and the initialize handshake, so every request carries its protocol version and capabilities and can be handled by any server instance. Revisions 2025-03-26 through 2025-11-25 used sessions, and servers that support older clients still implement that behavior.

Can a STDIO MCP server be used remotely?

Not directly, because STDIO only connects a server to the process that launched it. To share a STDIO server, run it behind a gateway that launches it and exposes its tools over HTTP. Bifrost does this, adding authentication, tool filtering, and logs for remote callers.

Which MCP transport is more secure?

Neither is secure by default in every setting. STDIO has no network exposure but runs with the user's local privileges and credentials. Streamable HTTP is reachable over the network, so it requires TLS, Origin validation, and authentication, but it lets a team centralize credentials and access control. For shared servers, a governed HTTP endpoint is usually easier to secure.

Which transport should a new MCP server support?

Support STDIO if the server is a local, single-user tool, and Streamable HTTP if it will be shared or hosted. Many server SDKs make it easy to support both from the same code. Avoid adding the deprecated HTTP+SSE transport unless you must serve clients that cannot speak Streamable HTTP.

Getting Started with Bifrost

MCP Streamable HTTP and STDIO solve different problems: STDIO keeps a tool local to one user, and Streamable HTTP makes it a shared, scalable service. Bifrost serves both behind one authenticated endpoint with tool filtering, central credentials, and logs. Explore the Bifrost MCP gateway, read about MCP access control and 92% lower token costs, or book a demo to put your MCP servers behind one governed endpoint.