CourseModel Context Protocol: The Complete Course · Module 2: Protocol Architecture and Transports · part 18 of 77
Part 18 · Module 2: Protocol Architecture and Transports

Lab: Save the prototype server and check its wire

27 min read·13 Oct 2026
Module 2 · Lab · About 60 minutes · Needs: lessons 1 to 4 of this module, the Module 1 lab (or Step 2's cells), and a Groq or Gemini key in Colab's Secrets panel (Step 1 copies it; no model is called)

What you are building

MYDRIVE/NOTES-ASSISTANT AFTER MODULE 2 m02_lab.py the wire report m02_wire.py no SDK m02_server.py the prototype HTTP app port 8026 NoteStore Module 1 Host and Origin allowlist tests/test_m02_wire.py 3 tests, no key 17 checks all ok, committed
After this lab the report (blue) drives Lesson 1's server two ways, over stdio with no SDK and over HTTP behind an allowlist, and tests run the same 17 checks (green).

It is Thursday 10 September 2026, still week 1. This week's lessons built a prototype notes server with every part of the protocol, drove it with a client that has no SDK, and broke it on purpose over stdio and over HTTP. All of that lives in notebook folders. This lab saves it in the notes-assistant repository: Lesson 1's server as examples/m02_server.py, Lesson 1's raw driver as examples/m02_wire.py, and a new script, examples/m02_lab.py, that turns the module's lessons into one wire report: seventeen checks, each one request, its expected reply and the reply that came back. Tests run the same report, so a later change that breaks the wire fails a test. No package file changes and no model is called.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.