Transport Layers: stdio vs SSE
Local vs remote MCP servers and when to choose each transport option.
MCP separates the protocol (JSON-RPC messages) from the transport (how those messages physically travel). The two you will meet in practice are stdio and Streamable HTTP/SSE.
stdio. The host spawns the server as a child process and writes/reads JSON-RPC messages over its stdin/stdout pipes. No network stack, no ports, no TLS. This is what `hello-mcp-server`, `github-server`, and `postgres-server` all use in the companion repo, and it is the right default for anything running on the user's own machine.
Streamable HTTP / SSE. The server runs as its own long-lived process (or a cloud service), and the client connects over HTTP, receiving a stream of events. This is what you need when the server has to outlive the host, serve multiple clients at once, or run somewhere the host cannot spawn a process, like a shared team deployment.
Stdio is like plugging in a USB cable directly to your machine. Streamable HTTP is like connecting to a service over the network where many clients can access the same endpoint.