Module 1 · The protocol and its mental model · Lesson 2
The protocol on the wire
The JSON-RPC messages MCP sends, the stateless 2026-07-28 revision and the 2025-era handshake it replaced, stdio and Streamable HTTP framing, and the utilities and message patterns built on top.
By the end of this lesson you can
- Read and write MCP requests, results, errors and notifications, including resultType and the per-request _meta fields
- Explain why the 2026-07-28 revision removed the initialize handshake and sessions, and how a client learns a server's versions without them
- Predict which combinations of client and server eras interoperate, and serve both eras from one server
- Implement stdio framing correctly, with nothing but protocol messages on stdout and a clean shutdown
- Describe Streamable HTTP's single endpoint, routing headers and Origin validation, and the progress, cancellation, pagination and caching utilities