MCP Transport
Two different questions hide inside "connect an agent to a tool": what do the messages say, and how do they physically travel? The Model Context Protocol settles the first with JSON-RPC. MCP transport is the answer to the second — the pipe requests and responses ride on.
The two standard channels
A server declares which transport it speaks, and the client connects accordingly:
- stdio: the client launches the server as a child process and the two exchange newline-delimited JSON-RPC messages over its standard input and output. Nothing touches the network.
- Streamable HTTP: the server lives at a URL. The client POSTs requests, and the server can hold the response open as a Server-Sent Events stream to push progress and notifications back mid-call. It replaced the earlier split HTTP+SSE design.
The layers above are untouched by the choice — same tools, same schemas, same capability negotiation — so a server built against a local filesystem can be redeployed behind a URL without its tool code changing.
Why the choice matters
Transport is where trust and breakage actually live. A stdio server runs as you, on your machine, with your credentials, and needs no login step. An HTTP server is reachable by strangers, so it needs real authorisation, session handling and origin validation before it is safe to expose. The failure modes are equally concrete: a library inside a stdio server that prints one log line to standard output corrupts the message stream, and a tool call that takes two minutes with no streaming channel is indistinguishable from a hang.
MCP transport is the channel that carries Model Context Protocol messages between client and server: stdio for a server launched locally as a child process, streamable HTTP for a remote one. The protocol layer is identical either way, so the choice is operational — stdio keeps everything on the machine and needs no authentication, while HTTP exposes the server to the network and demands authorisation, session handling and origin checks.
A conversation is the same conversation whether you have it across a table or over the phone — the words do not change, only the channel. MCP transport is that channel for AI assistants talking to the tools they use.
Sometimes the tool is a small program running on your own computer, and the assistant talks to it directly, the way two programs on one machine pass notes. Sometimes the tool sits on a server somewhere on the internet, and the conversation goes over a web connection instead.
What they say to each other is identical. Where it travels decides who else could listen in, and so how carefully the door has to be guarded.