stdio transport
stdio transport is an MCP transport in which the client launches the server as a subprocess. The two exchange newline-delimited JSON-RPC messages over the server's standard input and output. No network port is opened, so the connection stays on the local machine. wield-mcp uses this transport.
How stdio transport works
The AI app runs the server command, for example npx -y wield-mcp, as a child process. The client writes requests to the server's standard input. The server writes responses to its standard output, one JSON message per line. The client owns the process: it starts it and can stop it.
The server must keep standard output for protocol messages only. Log output goes to standard error or to a file. A stray print statement on standard output can corrupt the message stream.
Why it matters for AI agents
With no port open, nothing on your network can reach the server directly. That reduces exposure, but it does not make the server safe. The server still runs with your user account's permissions, so it can read and write whatever that account can. Treat every local server as code you trust.
Wield and stdio transport
wield-mcp runs over stdio and opens no network port. A small helper called the bridge connects wield-mcp to the Wield extension over a local socket. Chrome starts the bridge through native messaging. Nothing in that chain listens on a network port. See how Wield works.
Related terms
- MCP server: the program that runs over the transport.
- Streamable HTTP: the transport for servers reached over the network.
- MCP client: the side that starts the server.
FAQ
Is stdio safer than HTTP for MCP?
It depends on what you compare. stdio opens no network port, so other machines cannot reach the server. It does not sandbox the server, which runs with your permissions. Safety depends on which server you run and what that server can access.
What must a stdio server never write to stdout?
Anything other than protocol messages. Standard output carries the JSON-RPC messages, so a log line or debug print on that stream can break the client's parsing. Write logs to standard error instead.
Sources
- MCP transportsmodelcontextprotocol.io