Skip to content

Transports: stdio and HTTP

Transports, in MCP, are the communication mechanisms that carry protocol messages between a client and a server. Stdio runs the server as a local subprocess and exchanges messages over standard input and output; HTTP exposes the server as a network service reached by clients over web requests.

MCP needs a transport because the protocol message is only part of the integration. The same tool call can be carried between processes on one machine or across a network to a separately hosted service. That choice determines who starts the server, where credentials live, what can fail, how the server is updated, and where the security boundary sits.

With stdio, the client launches the MCP server executable and connects its standard input and output streams to a protocol session. It looks operationally like invoking a compiler, Git command, or language server. With HTTP, the server is already running at an address, and the client sends protocol messages over network requests. The MCP layer may be similar, but process ownership and connectivity are completely different.

The tradeoff is not merely speed or message format, which is a common misunderstanding. Stdio is simple to install and avoids service infrastructure, but the server often inherits the local user’s filesystem access, environment, and credentials. HTTP supports shared access and independent deployment, but adds authentication, authorisation, TLS, routing, monitoring, versioning, tenant isolation, and ordinary network failure modes.

Engineers meet this choice when packaging an MCP integration. A desktop agent, local developer workflow, or private automation often fits stdio because the client can manage the process directly. A team service, hosted connector, or integration used by multiple clients usually fits HTTP. The honest answer is context-dependent: choose based on lifecycle, reachability, and the trust boundary you can actually secure.

Common questions

Does changing from stdio to HTTP change the MCP tools themselves?
Usually not at the protocol concept level: the server can still expose the same tools, resources, and prompts. What changes is the envelope around those messages. Stdio means local process startup and inherited local permissions. HTTP means service deployment, network identity, authentication, authorisation, and handling remote failures.
Is stdio safer because it is local?
Not automatically. Stdio avoids exposing a network endpoint, but it commonly runs with the local user’s privileges and may access local files, environment variables, and credentials. Trusting a stdio MCP server is close to trusting any local executable. The risk is local execution and permission inheritance rather than remote reachability.
When should I choose HTTP for an MCP server?
Choose HTTP when the server needs to be reachable across machines, shared by multiple clients, deployed independently, or operated like a normal backend service. Be prepared to own service concerns: identity, authentication, authorisation, TLS, logging, monitoring, upgrades, and multi-user isolation. HTTP buys reach and centralisation, not simplicity.