stdio (MCP transport)

stdio (standard input/output) is the Model Context Protocol's local transport: the client launches the server as a child process and exchanges newline-delimited JSON-RPC messages over its stdin and stdout.

How the stdio transport works

Every process has three standard streams: stdin, stdout, and stderr. With the stdio transport:

  1. The client starts the server with a command, such as npx some-package.
  2. The client writes JSON-RPC messages to the server's stdin, one per line.
  3. The server writes responses to stdout.
  4. The server may write logs to stderr; it must never write anything else to stdout.
  5. When the client exits, the server process ends.

Most desktop and IDE clients, including Claude Desktop, Cursor, and VS Code, support stdio servers through a config file listing the command, arguments, and environment variables.

stdio versus streamable HTTP

stdio needs no network, port, or TLS, and it inherits your local environment. But it only serves one client on one machine. For shared or hosted use, streamable HTTP fits better.

An example

{ "mcpServers": { "social": { "command": "npx", "args": ["socialhandoff-mcp"] } } }

The client runs that command at startup and talks to the server over its pipes.

Why it matters for AI-agent publishing

stdio is the fastest way to try an MCP server from a desktop assistant. The API key is usually passed as an environment variable in the config, so keep that file private.

SocialHandoff ships a stdio server you start with npx socialhandoff-mcp. Build a config with the MCP config generator and follow connect an agent with MCP.

Let your agents post. Keep the final say.

Connect your first agent in minutes. Every draft waits in your inbox until you approve it.

14 days free. No card required.

The hosted version is opening soon

Leave your email and we will send one message when hosted accounts open, with your 14-day trial ready. Want it today? Self-host it free from the repo.

Start free trial