Glossary protocol/
What is the stdio transport in MCP?
The stdio transport is the MCP binding in which the client launches the server as a subprocess and the two exchange newline-delimited JSON-RPC messages over the server's standard input and output.
Also called: STDIO transport, standard input/output transport
# Register a local stdio server in Claude Code (example from Anthropic's docs)
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
-- npx -y airtable-mcp-server
Everything after -- is the command the host runs as a subprocess, and the API key reaches the server as an environment variable. That is the stdio pattern: MCP’s authorization spec says stdio implementations should not use its OAuth flow and should take credentials from the environment instead.
The wire rules in spec version 2026-07-28 are short. The server reads JSON-RPC from stdin and writes it to stdout, one message per line, with no embedded newlines. It must never write anything else to stdout. Logs go to stderr, which the client should not read as an error signal. To shut down, the client closes stdin, waits, and kills the process if it doesn’t exit.
A stdio server opens no network listener, which is why MCP’s security guidance recommends it to limit access to just the client. It also runs with the user’s privileges, so clients offering one-click setup must show the exact command and get explicit approval, and should consider sandboxing.
See also: MCP transport · Shadow MCP · stdio vs Streamable HTTP · Claude Code MCP config
Related terms
MCP server, MCP transport, Shadow MCP, Streamable HTTP
Guides that cover stdio transport
Sources
Changelog
- First published.
Cite this page
Agents for Devs. "What is the stdio transport in MCP?." Published Dec 6, 2026. https://agentsfordevs.com/glossary/stdio-transport - Page: https://agentsfordevs.com/glossary/stdio-transport
- Markdown version: https://agentsfordevs.com/glossary/stdio-transport.md
- Reuse: quote or summarize with a link to this page. Reuse terms