Topic 1: Module 2 at a glance, and the setup
11 min read·22 Sept 2026
By the end of this module, you'll have:
- Driven the notes server by hand over raw stdio and over HTTP with
curl, and read every request, response, notification, and error as it crossed the wire. - Called
server/discover, sent the per-request_metaenvelope the 2026-07-28 revision requires, and provoked real-32700,-32600,-32601,-32602,-32603,-32020,-32021, and-32022errors. - Watched the legacy
initializehandshake andMcp-Session-Idsessions in action, and compared them with the stateless design on the same server. - Carried state across connections with a tool-returned handle (a
start_reading_listtool), and used pagination, progress, cancellation, completions, and resource links. - Diagnosed a polluted stdout, blocked a DNS rebinding request, and measured latency and bytes on the wire for in-memory, stdio, and HTTP.
Prerequisites: Module 1 (roles, JSON-RPC, primitives, and the tiny search_notes server in examples/m01_first_server.py). Comfortable with curl, HTTP status codes, and async/await.
Where we are: Module 1 connected a client to a one-tool server and let the SDK hide every message. This module takes the cover off. We look at the exact bytes a host and a server exchange, learn the rules that make those bytes a protocol, and see how they travel over the two standard transports.