New Tool Radar

AI Concepts

How to Tell When the stdio Transport Fits a Local MCP Server

Use stdio when the MCP server runs on your own machine as a subprocess, and check the client launches it correctly.

Schematic with three steps: Confirm the server runs locally; Add the launch command to the client; Start the client and check the server.

In the stdio transport, the client launches the MCP server as a subprocess, and the two ends communicate over the subprocess standard streams: the server reads JSON-RPC messages from stdin and writes them to stdout, one newline-delimited message per line. Use stdio when the server is a program installed on the same machine as the client, such as a local filesystem or database server. If the server runs on another machine or must serve many clients, stdio is the wrong transport.

What you need

  • A server program installed on the same machine as the client
  • The command that starts the server, for example npx or python
  • The client config file where the server entry will be added

Step 1: Confirm the server runs locally

Check the server is a program you can start on this machine with a single command, and that it reads from stdin and writes to stdout. A server that only offers a public HTTPS URL cannot use stdio.

Step 2: Add the launch command to the client config

Add an entry naming the command and its arguments, for example command npx with the server package name and any folder path it may access. Keep the entry minimal: the client launches the process, so a wrong command means the server never starts.

Step 3: Start the client and check the server lists

Start the client, open its server or connector list, and confirm the server appears with its tools, resources or prompts. If it does not appear, read the server stderr log: the spec lets a server write logs to stderr, and that is where launch errors show up.

Worked example: three synthetic servers checked against stdio

The table below is a synthetic example. It shows the expected result of checking three servers against the stdio transport; no server was launched.

Server Where it runs stdio fits?
Filesystem server via npx Same machine Yes – client launches it
Remote CRM API over HTTPS Vendor cloud No – use Streamable HTTP
Local Python script Same machine Yes – client launches it
Shared team server Team server No – use Streamable HTTP

Expected result (UNTESTED). the two servers on the same machine fit stdio, and the two remote servers do not. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • stdio only works when client and server share a machine; it cannot reach a server on the internet.
  • The server must never write anything to stdout that is not a valid MCP message, or the client cannot parse the stream.
  • If the server process exits unexpectedly, in-flight requests are lost and the client must restart it.
  • Cancellation on stdio uses a notifications/cancelled message, since there is no per-request stream to close.

Sources

See all