CourseModel Context Protocol: The Complete Course · Module 6: Building Clients and Hosts · part 46 of 77
Part 46 · Module 6: Building Clients and Hosts

Lab: A host that answers from two servers

69 min read·13 Oct 2026
Module 6 · Lab · About 80 minutes · Needs: lessons 1 to 4 of this module and the Module 1 and Module 5 labs; a free Groq or Gemini key for Step 7 (course-guide/02)

What you are building

model chat() notes_assistant/host.py Host: policy lives here notes Module 5, stdio calendar Tomas, HTTP tests/test_host 8 tests calendar_server examples/ m06_lab.py one question earlier labs rebuilt, kept one host, two servers, four new files
The lab's host sits between the model (amber) and two servers (blue): Module 5's packaged notes server and Tomas's calendar, with eight keyless tests (green).

Thursday 24 September 2026, end of week 3. Nare wants one answer from two places: "How many participants will the nap study have, and which days is the sleep lab booked?" The four lessons built the parts in separate notebook files. This lab folds them into notes_assistant/host.py, saves Tomas's calendar as examples/calendar_server.py, and adds a script that asks a model, eight keyless tests and a commit.

The lessons connected the host to a compact notes server built on Module 3's. The lab connects it to Module 5's packaged server instead, python -m notes_assistant.server, launched exactly as the Module 5 lab launches it; Module 4's examples/m04_server.py stays in the repository, unused here.

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.