Stdio (Standard I/O)
Stdio (Standard Input and Output) is the default transport mechanism for local MCP server communication. It allows a client to launch a server process and exchange JSON-RPC messages by writing to its standard input and reading from its standard output.
Why use Stdio?
- Ease of Deployment: No need to manage network ports or complex HTTP servers for local development.
- Direct Control: The client has full control over the lifecycle of the server process.
- Standard Protocol: Leverages well-understood operating system primitives.
Stdio is the transport used by most IDE integrations (like Cursor) to securely connect to local MCP tools.
Questions & Answers
What is "Stdio" transport in the context of the Model Context Protocol?
Stdio (Standard Input and Output) is the default transport mechanism for local communication. It allows a client to launch a server process and exchange JSON-RPC messages by writing to its stdin and reading from its stdout.
What are the key advantages of using Stdio for local server communication?
Stdio is remarkably easy to deploy as it requires no network port management or HTTP server setup. It gives the client full lifecycle control over the server process and leverages secure, well-understood operating system primitives.
In which scenarios is Stdio the preferred transport mechanism?
Stdio is most commonly used for local development, IDE integrations (like Cursor), and desktop AI applications where the AI host and the MCP server are running on the same machine.