4.3 — Transport Layers: stdio vs SSE vs Streamable HTTP
MCP is transport-agnostic — the protocol is the same regardless of how bytes move. But transport choice has major production implications.
| Transport | How It Works | When to Use | Limitations |
|---|---|---|---|
| stdio | Client spawns server as subprocess. JSON-RPC over stdin/stdout | Local tools (Claude Desktop, VS Code, IDEs). Simplest setup — zero networking | Must be local. One client per server process. No auth needed (runs as user) |
| SSE | HTTP POST for client→server, Server-Sent Events for server→client | Remote servers, web clients. Backwards-compatible with existing HTTP infra | Not truly bidirectional. Server can't initiate requests (only notifications). Session affinity required |
| Streamable HTTP | HTTP POST/GET with streaming responses. Full bidirectional support | Production remote deployments. Replaces SSE as the recommended remote transport | Newer — less client support. More complex to implement |
Transport Decision Tree
Continue Reading
This topic continues with more in-depth content, code examples, and diagrams. Sign up free to unlock the full guide with all 87 sections.
Sign Up Free to UnlockFree access · No credit card required