MCP Transport Layers
Same protocol, different delivery mechanisms
Host spawns server as child process. Messages via stdin/stdout.
Local development, CLI tools, Claude Desktop
Same machine only, no network
Client POSTs to /messages, server streams via /sse endpoint.
Remote servers, multi-user, cloud hosting
Requires persistent connection, two endpoints
Single endpoint, stateless by default, streams when needed.
Production, serverless (Vercel, Lambda, Workers)
Newest transport, some clients still adopting
MCP is transport-agnostic: the same protocol works whether the server runs on your local machine or across the internet. Understanding the transport layer is essential because it determines how you deploy, test, and scale your servers.
Transport Comparison
Choosing the right communication layer for your MCP server
| Transport | Latency | Setup | Security | Best For |
|---|---|---|---|---|
| stdio | <1ms | Zero config | Process isolation | Local development, CLI tools |
| HTTP/SSE | ~50ms | Server + URL | Auth headers, TLS | Remote servers, cloud deployment |
| Streamable HTTP | ~50ms | Server + URL | Auth + streaming | Long-running operations, file transfers |