Three official transports
stdio
Server runs as a subprocess. The host writes to stdin and reads from stdout, one JSON message per line.
Best for: local dev tools, Claude Desktop plug-ins, anything that doesn't cross machine boundaries.
HTTP + SSE
Client POSTs to send; an SSE channel streams server-to-client messages. Older but widely supported.
Best for: remote servers with simple infra; legacy clients.
Streamable HTTP
Single endpoint, bidirectional, supports both streaming and one-shot responses. The current recommendation for remote.
Best for: cloud servers, serverless, anything multi-tenant.
stdio in detail
Each line on stdin/stdout is one JSON-RPC message. stderr is free for the server's own logs — clients will display them but not parse them.
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["/path/to/weather_server.py"],
"env": { "API_KEY": "sk-..." }
}
}
}
Streamable HTTP in detail
- Single HTTP endpoint serves both POST and (optional) GET for streaming.
- Server-Sent Events used for server→client push.
- Standardised headers via SEP-2243 (e.g.,
Mcp-Session-Id). - Supports sessionless mode (SEP-2567) — explicit state handles instead of cookies.
Multi round-trip pattern (SEP-2322)
To avoid forcing transports to support arbitrary server-initiated requests, MCP standardised a multi round-trip pattern: the server returns a "need more info" response, the client gathers the data, and the client re-issues the original request with the extra payload.
Why it matters
- Transports only need request-scoped bidirectional flow — no persistent server-push channel required.
- The client always has context for what data the server is asking for.
- Works in serverless / stateless deployments.
Custom transports
MCP doesn't lock you in. Anything that can carry JSON-RPC messages with framing (length-prefixed, line-delimited, etc.) can host MCP. WebSockets, gRPC, named pipes — all viable for custom integrations.
Quick summary
- stdio for local plug-ins; Streamable HTTP for remote
- HTTP+SSE still works but is being superseded
- Multi round-trip pattern keeps server-initiated requests transport-friendly
- Build your own transport if you have a special integration