MCP transports
📖 4 min readUpdated 2026-04-18
MCP is transport-agnostic. The protocol works the same whether you're talking to a local subprocess over stdin or to a remote HTTPS endpoint. Picking the right transport matters for performance and security.
stdio, local subprocess
The client spawns the server as a child process and talks to it over stdin/stdout. Messages are newline-delimited JSON.
When to use:
- Local tools that need file system access
- Dev tools (git, build systems, linters)
- Anything where a network transport adds unnecessary overhead
Pros:
- No network configuration
- Process isolation (kill the server = kill access)
- Very fast (no HTTP overhead)
- Native to Claude Code and many IDE clients
Cons:
- Client must be on the same machine
- No multi-user support
- Harder to update (restart required)
SSE. Server-Sent Events
The client opens an HTTP connection to the server; the server streams events back. Good for remote servers that want long-lived bidirectional-ish communication.
When to use:
- Hosted MCP servers (someone else runs them)
- Multi-user environments (Claude.ai connectors, team deployments)
- Tools that benefit from streaming responses
Pros:
- Works across machines
- Plays nicely with HTTP infra (load balancers, TLS, auth)
- One server can serve many clients
Cons:
- More operational overhead (hosting, scaling, TLS)
- Latency (network round-trips)
- Requires auth handling you don't need locally
HTTP, request/response
Plain stateless HTTP. The client sends a JSON-RPC request, the server responds. No streaming.
When to use:
- Simple remote servers
- When streaming isn't needed
- Serverless deployments (Lambda, Workers) where long-lived connections are expensive
Pros:
- Simplest to build, simplest to host
- Works behind any HTTP infra
- Stateless, trivially scalable
Cons:
- No streaming, so slower on long tool calls
- More round-trips for multi-step interactions
Decision matrix
| If the server is… |
Use transport |
| On your machine, for your use only | stdio |
| Hosted, serving one user (you) | SSE or HTTP |
| Hosted, serving a team | SSE (for streaming) or HTTP (simpler) |
| Serverless (Lambda, Cloudflare Workers) | HTTP |
Mixing transports
Clients can connect to many servers, each over a different transport. Claude Code happily talks to local stdio servers (git, filesystem) and remote HTTP/SSE servers (Notion, Gmail) at the same time.