Transport is the part of MCP that most often breaks in practice. The protocol messages can be perfectly correct while the connection model is wrong for the client. Choosing a transport is an architecture decision about trust, deployment, and failure modes.
The three models
| Transport | Lifecycle | Best for | Main risks |
|---|---|---|---|
| stdio | Child process, stdin/stdout | Local tools, offline work, secrets kept on the machine | Host-level permissions, process crashes, stdout pollution |
| Streamable HTTP | One HTTP endpoint, POST plus optional streaming | Shared services, containers, cloud deployment | Auth, TLS, Origin checks, proxies, network exposure |
| HTTP+SSE (deprecated) | Long-lived event stream plus message endpoint | Legacy compatibility only | Proxy buffering, reconnects, deprecated protocol |
The MCP specification deprecates HTTP+SSE for new implementations. If a server offers both, prefer Streamable HTTP. Do not treat a working SSE connection as evidence that the same URL works with a Streamable HTTP client.
stdio in practice
The client spawns a process and communicates over standard input/output using newline-delimited JSON-RPC. Benefits:
- No listening port and no network authentication surface.
- The server runs with the user’s existing file and database access.
- Simple packaging through npx, uvx, or a binary.
Costs:
- The server inherits the client’s environment and permissions.
- A crash kills the connection immediately.
- Debugging requires access to stderr.
- GUI clients may have a different PATH than your terminal.
Keep stdout exclusively for protocol messages. If a library prints a banner, redirect it to stderr or remove it. A single stray line can break framing.
Streamable HTTP in practice
A modern remote MCP server exposes one endpoint that accepts POST. The client sends JSON-RPC, may receive a single JSON response or a request-scoped SSE stream, and uses protocol metadata headers. The 2026-07-28 revision removed HTTP sessions; older revisions used Mcp-Session-Id and a GET stream.
Operational requirements:
- TLS for every public endpoint.
- Authentication before tool discovery and invocation.
- Authorization per tenant and per tool, not just a valid token.
- Origin validation to block browser-based abuse.
- Proxy configuration that preserves headers and does not buffer streams.
- Timeouts for requests and upstream calls.
The endpoint is not a generic REST API. A 200 from a health check tells you the process is alive, not that MCP initialization works. Test with a real MCP client or Inspector.
Protocol revisions and headers
The latest specification at the time of writing is 2026-07-28. It requires the MCP-Protocol-Version header to match the protocol version in the request metadata. A mismatch can produce HTTP 400 with HeaderMismatch (-32020). MCP-specific method and name headers travel with requests.
Older deployments may implement the initialize handshake and session behavior from 2025-11-25 or earlier. The 2026-07-28 revision removed both. This is why “it works with client A” is not a compatibility guarantee for client B. Client and server must agree on a revision and transport. Pin versions, test both sides, and document the supported range.
Choosing a transport
Use stdio when:
- The tool runs on the same machine as the client.
- The data should not leave the machine.
- The server can be packaged as a local process.
- The user can manage credentials locally.
Use Streamable HTTP when:
- Multiple users or clients need shared access.
- The server runs in a container or cloud environment.
- You can implement authentication, authorization, and observability.
- You can operate TLS, reverse proxies, and rate limits.
Avoid legacy SSE unless a server or client you must support has no Streamable HTTP option. If you must use it, document the limitation and plan a migration.
A transport decision checklist
- Where does the server execute, and who owns that environment?
- What data crosses the boundary, and who can observe it?
- How are credentials stored and rotated?
- Which client versions and protocol revisions are supported?
- What happens on disconnect, restart, or timeout?
- Can you observe failures without logging sensitive payloads?
The answers determine the transport more reliably than a feature comparison. A local personal tool and a multi-tenant SaaS integration should not share the same connection model just because both speak MCP.
For configuration specifics, see the clients section. For a local server walkthrough, read TypeScript stdio. For remote deployment, continue with Streamable HTTP and deploy an MCP server.
Sources
Sources were checked on Oct 23, 2026. Versions and client behavior can change; confirm the current documentation before relying on a configuration.