Transports: stdio vs Streamable HTTP
Transports: how MCP messages travel
Level: from scratch — no prior experience needed. In the previous lesson you understood what MCP is and its three roles (host, client, server). Now we look at where the messages travel between them. Watch the video above and follow at your own pace.
You already know that an MCP server exposes tools and data, and that a client connects to it. But one piece is missing: how do they actually talk? Where do the messages go? That "plumbing" has a name in MCP: the transport. Choosing the right transport is the first practical decision you'll make when building a server.
What you'll learn
- What a transport is and why MCP defines more than one.
- The two that matter today: stdio and Streamable HTTP, explained plainly.
- Why the old HTTP+SSE transport became deprecated (obsolete).
- A simple rule to decide when to use which.
What a "transport" is, in one sentence
A transport is the channel through which MCP messages travel between the client and the server. MCP defines what they say (the protocol); the transport defines where they say it. The same conversation can travel over different channels — like a letter you can send by postal mail or by email: the content is the same, the medium changes.
stdio: the server lives on your machine
stdio means standard input / standard output: two text "pipes" that every terminal program already has. With this transport, the MCP server runs as a local subprocess — a program the host starts on your own computer — and messages go back and forth through stdin (input) and stdout (output).
- It's the simplest: no network, no ports, no URLs.
- It's the lowest-latency: everything happens inside your machine.
- Ideal for local and desktop tools (for example, a server that reads files from your disk from Claude Desktop).
If you're just starting, stdio is where you'll build your first server.
Streamable HTTP: the server lives on the network
When the server isn't on your machine but somewhere else — a remote server that many people connect to over the internet — you use Streamable HTTP (introduced in the specification version 2025-03-26).
- It exposes a single HTTP endpoint (a URL) that the client sends messages to.
- It can use SSE (Server-Sent Events), a technique for the server to send data to the client via streaming — useful for long responses or messages the server initiates on its own.
- It supports sessions, resumability (resuming a dropped connection), and the
MCP-Protocol-Versionheader to agree on which protocol version is being used.
It's the path for remote or hosted servers.
Why HTTP+SSE is deprecated
Before Streamable HTTP there was another network transport called HTTP+SSE (from version 2024-11-05). It worked, but it was more rigid: it used two separate channels and didn't handle reconnections or sessions well. Streamable HTTP replaces it and does everything in a single endpoint, more robustly. That's why HTTP+SSE became deprecated: it still shows up in old tutorials, but don't use it for anything new. If you see "HTTP+SSE" in a guide, it's a sign it's out of date.
Watch out for the common confusion: "SSE" (Server-Sent Events) is a technique that Streamable HTTP still uses for streaming. What's deprecated is the complete HTTP+SSE transport from 2024, not the SSE technique itself.
When to use which (the beginner's rule)
- Does the server run on your own machine, as a local or desktop tool? → stdio.
- Does the server live on the network and others connect over the internet? → Streamable HTTP.
- Did you find HTTP+SSE? → it's deprecated; choose Streamable HTTP.
A security note to keep on your radar: network transports require precautions like validating
the Origin header and listening only on localhost when the server is local, to avoid
improper access. Don't worry about the details now — we go deeper in a lesson dedicated to
security later on.
Key moments in the video
- 0 — The two types of transport: stdio (local, via subprocess) versus SSE/HTTP (over the network). It's exactly the distinction we work on in this lesson; as you listen, keep the question "is the server on my machine or on the network?" in mind.
Quick glossary
- Transport: the channel through which MCP messages travel between client and server.
- stdio: local transport; the server is a subprocess and uses stdin/stdout.
- Streamable HTTP: network transport (spec 2025-03-26); one HTTP endpoint, with optional SSE.
- SSE (Server-Sent Events): technique for the server to send data to the client via streaming.
- HTTP+SSE: old network transport (2024-11-05), deprecated.
- Endpoint: the address (URL) the client sends messages to.
- Session / resumability: maintaining and resuming the state of a connection.
MCP-Protocol-Version: HTTP header to agree on the protocol version.
To download
- 📄 Cheat sheet — MCP Transports (1-page PDF with the decision table and the essentials).
- 📄 Decision table: stdio vs Streamable HTTP (included in the cheat sheet).
Before you continue
If you keep one idea, let it be this: the key question is "is the server on my machine or on the network?" — that's where the transport comes from. In the course's hands-on part you'll start with stdio and later we'll publish a server with Streamable HTTP.
