Sistava

What is Stdio Transport?

Also called Standard I/O Transport, Local Transport.

Stdio transport is a communication mechanism in which two programs exchange messages over standard input and standard output rather than a network socket. The host launches the other program as a child process and writes requests to its standard input, reading replies from its standard output. It is one of the transports defined for the Model Context Protocol.

The appeal is that it requires no network at all. There is no port to bind, no TLS certificate to provision, no firewall rule, and no risk of another machine reaching the process, because the channel exists only between parent and child. Lifecycle is equally simple: the server starts when the host launches it and ends when the host closes the pipe or terminates it.

Framing matters because standard streams are byte pipes with no message boundaries. Implementations typically write one JSON message per line or prefix each message with a length, so the reader knows where one ends and the next begins. Anything else the program prints to standard output will corrupt the stream, which is why diagnostic logging must go to standard error instead.

Security is inherited from the operating system rather than from the protocol. The child process runs with whatever user, environment variables, and filesystem access the host grants it, so the host is effectively deciding the trust boundary at launch time. Passing secrets through the environment is common, and keeps them out of command lines visible in process listings.

The constraint is locality. A stdio server runs on the same machine as its host and serves exactly that one client, so it cannot be shared between users or reached remotely. Deployments needing multiple clients, central hosting, or authentication use an HTTP based transport instead.

Key points

In practice

A desktop client launches a local file tool as a child process, passing a directory path in its environment. Every request is written to the child's standard input as one JSON line; each reply comes back the same way on standard output. The tool writes its debug output to standard error so the host can display it without breaking message parsing. Quitting the client terminates the tool.

Related terms

Back to the AI Glossary