Generated by Answer me with HTML 0.5.5 · 2026-10-17 12:54 · ★ Star on GitHub
Transport Agnostic Communication
From the Academy lesson "MCP Clients"
Lead: MCP messages are the same whatever channel carries them. The protocol defines what the client and server say. The transport, meaning how the bytes travel, is a separate choice you make for each setup.
Answer
Same messages, different pipes
- Messages do not change:
ListToolsRequest/ListToolsResultandCallToolRequest/CallToolResult. - The transport changes: stdio for a server on the same machine, a network connection for a remote server.
- Moving a server from local to remote changes only the connection setup, not the tool code.
Two layers
| Layer | What it is | Changes between setups? |
|---|---|---|
| Messages | JSON-RPC requests and results that MCP defines | Never |
| Transport | The channel that carries the messages | Yes, you choose it |
The lesson's two GitHub setups
Both connections carry the same CallToolRequest for get_repos and return the same CallToolResult.
What changes and what stays
| Local (stdio) | Remote (network) | |
|---|---|---|
| Where the server runs | Same machine, as a child process | Another machine or a cloud service |
| How the client connects | Starts the process, uses stdin / stdout | Opens a connection to a URL |
| Messages sent | tools/list, tools/call |
The same |
| Tool code in the server | get_repos and the rest |
The same |
| Message-handling code in the client | Pass tools to Claude, run tool calls | The same |
Only the config line changes
// local: start a process, talk over stdio{ "github": { "command": "github-mcp-server", "args": ["stdio"] } }// remote: connect to a URL over HTTP{ "github": { "type": "http", "url": "https://example.com/mcp" } }The command and URL are illustrative.
Transports in the official spec
| Transport | Use | Status |
|---|---|---|
| stdio | Local server process | Standard |
| Streamable HTTP | Local or remote server | Standard |
| HTTP + SSE | Remote server | Older, replaced by Streamable HTTP |
| WebSockets | Remote server | Custom; the spec allows custom transports |
The lesson names WebSockets as an example. Transport agnosticism is what lets such custom transports work.
Analogy
A letter by post or by email
The words of the letter stay the same. Only the delivery method changes. MCP messages are the letter; the transport is the delivery.