MCP Transport Options
A transport is the channel that carries messages between an MCP client and an MCP server. The messages follow the same format no matter which channel moves them. Choosing a transport decides where the server can run and who can reach it.
The Message Format Stays the Same
MCP messages use a structured format called JSON-RPC. A client sends a request such as "list your tools," and the server sends back a reply. The transport only delivers these messages. The content does not change when the delivery route changes.
A Delivery Analogy
Two colleagues need to exchange a note. Sitting at the same table, one passes the note by hand. Working in different cities, they send it by courier. The note says the same thing in both cases. Only the delivery route differs. MCP transports follow that pattern: one route for nearby programs and one route for faraway servers.
Two Common Routes
Standard Input and Output (stdio)
The client launches the server as a small program on the same computer. The two programs talk through standard input and output, the same pipes a command-line tool uses. Setup stays simple, and no network port opens. Local helpers such as file readers and notes tools commonly use this route.
Streamable HTTP
The server runs as a web service. Clients connect over the internet or a company network using ordinary web requests. Many users can share one server, and the server owner updates it in one place. Remote services such as customer databases and company platforms commonly use this route.
Older MCP versions used a separate HTTP-plus-streaming design. Streamable HTTP replaced it in later versions of the specification.
Comparison
| Feature | stdio | Streamable HTTP |
|---|---|---|
| Server location | Same computer as the client | Any reachable web address |
| Setup effort | Low | Moderate |
| Number of users | One user per launched copy | Many users share one server |
| Security focus | Trust the program you launch | Authentication, encryption, and access control |
| Best fit | Personal tools and local files | Shared team and company services |
A Practical Example
A developer builds a notes helper that reads markdown files from a laptop folder. The helper uses stdio because the files and the client share one machine. A sales team later needs a shared customer lookup server. That server runs on a company host and uses Streamable HTTP with login checks, so every sales representative reaches the same data.
Choosing a Transport
- Pick stdio for personal, local, and experimental tools.
- Pick Streamable HTTP for shared services and remote data.
- Run only trusted programs through stdio, since the client launches them directly.
- Protect every remote server with authentication and encryption.
Sessions and Streaming
Remote connections need a way to keep track of a conversation between client and server. Streamable HTTP supports sessions, which group related messages together. The server can also stream results gradually instead of waiting for a complete answer. Streaming helps with slow tasks, such as a long report, because the client shows progress while work continues.
Security Reminders for Each Route
Local servers run with the permissions of the user who launched them. A careless program could read private files. Install local servers only from sources you trust and review what access they request. Remote servers face the open internet, so they need encrypted connections, login checks, and limits on what each user may do. Treat the transport as the front door of the server and lock it appropriately.
Key Takeaway for Beginners
The transport is the delivery route, and the message stays the same. Local routes favor simplicity. Remote routes favor sharing and scale. Match the route to where the server lives and who needs it.
