Turning Point Academy · MCP Engineering

MCP Transports — Cheat Sheet

MCP Engineering course · M1


A transport is the channel a JSON-RPC message travels on between client and server. The protocol defines what they say; the transport, how it travels. This sheet covers the two current transports in revision 2026-07-28, stdio and stateless Streamable HTTP, and how a current server treats legacy traffic.

What changed in V2: the earlier version of this sheet taught sessions (Mcp-Session-Id), resumable streams and server-initiated messages as Streamable HTTP features. 2026-07-28 removed all three; they appear here only as legacy behaviour.

The key question

Does the host launch the server on the user's machine, or is it a service on the network?

SituationTransportBaseline
Local tool for one user, launched by the hoststdioNo port; credentials from the environment; logs to stderr
Local HTTP for developmentStreamable HTTP on 127.0.0.1Origin and Host checks; never 0.0.0.0
Shared or remote serviceStreamable HTTP over HTTPSOrigin checks, OAuth 2.1 resource server (L13), rate limits

stdio (current, 2026-07-28)

The client launches the server as a subprocess and they exchange lines on stdin and stdout.

Streamable HTTP (current, 2026-07-28)

The server exposes one MCP endpoint (for example https://example.com/mcp) that accepts POST.

Required headers on every POST

HeaderValueRequired for
MCP-Protocol-Versionsame as _meta io.modelcontextprotocol/protocolVersionall requests
Mcp-Methodthe JSON-RPC methodall requests
Mcp-Nameparams.name or params.uritools/call, resources/read, prompts/get

Headers mirror the body so gateways can route without parsing JSON. The server MUST reject a mismatch or missing required header with HTTP 400 and -32020 (HeaderMismatch). Do not mark secrets or personal data with x-mcp-header: intermediaries see headers.

Security baseline (Security & Endpoint section)

  1. Servers MUST validate Origin on all incoming connections and MUST return HTTP 403 if it is present and invalid. This is the defence against DNS rebinding (a web page reaching a local server).
  2. When running locally, servers SHOULD bind to 127.0.0.1, not 0.0.0.0.
  3. Servers SHOULD authenticate all connections (OAuth 2.1, L13).

What the lab server returned (captured 2026-11-26)

Official Python SDK mcp 2.3.0 on 127.0.0.1 (as in the L11 lab):

VariationHTTP statusBody
Correct server/discover200DiscoverResult (L06)
Mcp-Name does not match the body's name400-32020
No Mcp-Method header400-32020
MCP-Protocol-Version: 2099-01-01 (and same in _meta)400-32022, "supported":["2026-07-28"]
params without _meta400-32602
GET /mcp with MCP-Protocol-Version: 2026-07-28405Allow: POST
GET /mcp with no version header400-32600, "Missing session ID" (legacy path, below)
Origin: http://evil.example403Invalid Origin header
Host: evil.example:8000 (lab-l11)421DNS-rebinding protection

The 403 is the spec's MUST; the 421 is extra SDK protection for loopback servers.

Legacy: what older clients send (interoperability)

Glossary

To remember

  1. stdio: stdout carries only MCP messages; logs go to stderr; cancel with notifications/cancelled.
  2. Streamable HTTP is stateless (2026-07-28): POST only, request-scoped SSE, no Mcp-Session-Id, no resumption.
  3. Every POST needs MCP-Protocol-Version, Mcp-Method (and Mcp-Name for calls/reads/gets); mismatch = 400 -32020.
  4. Invalid Origin → 403; bind 127.0.0.1 locally; authenticate remote servers.
  5. Sessions and HTTP+SSE are legacy/deprecated: interoperate with them, don't build on them.

Turning Point Academy · MCP Engineering course · Module 1 · Lesson 7 (L07) · V2, spec 2026-07-28