MCP stdio Transport
With stdio, the host launches an MCP server as a subprocess and communicates over the process's standard input and output streams. It is the natural choice for local desktop and developer-tool integrations.
Why stdio is attractive
- No listening TCP port.
- Server lifecycle can be owned by the host.
- Local filesystem or developer-tool access is easy to scope to the launched process.
- Deployment is often just a command plus arguments.
stdout is protocol traffic
Do not casually print debugging text to stdout. Protocol bytes use that channel. Operational logs belong on stderr or your logging framework.
Security
Local does not mean safe. A stdio server inherits OS permissions and may be given sensitive directories or credentials. Hosts should launch only trusted code and pass the minimum required access.
Use stdio when the server is truly local and the host should own its process.