STDIO transport connects a local client and server through standard input and output streams. The client launches the server as a subprocess, creating a direct process-to-process link without network overhead. section 3.1.4 section 3.2.3
Think of STDIO as handing messages through a private pipe between a parent process and its helper. Unlike SSE transport over HTTP, it stays local, has low latency, and supports only the process that spawned the server. section 3.2.3 section 3.3
Table 3.1 Differences between STDIO and SSE transports for MCP servers
| Name |
How it works |
When you should use it |
|---|---|---|
| STDIO |
The client launches the MCP server as a subprocess on the same host and exchanges JSON-RPC 2.0 messages over the process’s stdin/stdout pipes. No networking stack is involved, so the link is low-latency but strictly one-to-one: only the parent process that spawned the server can talk to it. |
|
| SSE |
The MCP server runs as an HTTP service. Clients post JSON-RPC requests to |
|
Compare how STDIO and SSE work, where each server lives, and which deployment situations suit them. section 3.2.3
Use STDIO when the integration is local and directly managed by the client:
- Launch a helper MCP server for local development, command-line experiments, or a single task. section 3.1.4
- Avoid opening ports when running an interactive container or another simple process-to-process integration. section 3.2.3
- Keep startup and shutdown under the agent service’s control; the server remains available while the subprocess context runs. section 3.3.1
An agent consuming a local server
A Python agent can configure MCPServerStdio with command="mcp" and arguments that run a local server script. The agent then calls its research tool while the subprocess remains active; exiting the context shuts the server down. section 3.3.1
STDIO is language-agnostic at the protocol level: a Python agent can consume a Node.js server without a language bridge. It still adds a server process, protocol layer, latency, and another failure point compared with an in-process function call. section 3.3.1 section 3.3


