CourseModel Context Protocol · Module 5: Building Servers · part 33 of 83
Part 33 · Module 5: Building Servers

Topic 6: Module 5 milestone and interview questions

8 min read·22 Sept 2026

Project Milestone

After this module the notes-assistant repository contains a real, tested server package. New in this module are config.py, server.py, the tests/ folder, and the examples/m05_* scripts.

PathStatus after Module 5
notes_assistant/store.pyUnchanged from Module 1: NoteStore, Note, SearchHit, the error classes, slugify, validate_note_id
notes_assistant/config.pyNew: Settings and load_settings() from NOTES_* environment variables
notes_assistant/server.pyNew: build_server(store), main(), SearchResult, NoteHit, CreatedNote; tools search_notes and create_note, resources notes://index and notes://{note_id}, prompt summarise_topic
tests/test_store.pyNew: 20 unit tests of NoteStore
tests/test_server.pyNew: 11 in-memory client tests, each run in both eras (22 results, 2 of them a strict xfail)
tests/test_reindex.py, tests/test_stdio_smoke.pyNew: progress and cancellation tests, and one real stdio launch
examples/m05_*.py, examples/m05_inspector.jsonNew: the scripts from this module, including the reindex server and the lab

What you can now do with it:

  • python -m notes_assistant.server serves the notes over stdio; NOTES_TRANSPORT=streamable-http NOTES_PORT=8050 python -m notes_assistant.server serves them at http://127.0.0.1:8050/mcp.
  • Legacy (2025-11-25) and current (2026-07-28) clients both work against the same process.
  • python -m pytest -q runs 45 tests in about 3 seconds.
  • npx @modelcontextprotocol/inspector --config examples/m05_inspector.json --server notes opens the server in the Inspector.

One known issue is carried forward on purpose and pinned by a strict xfail: read_note raises ValueError, so a missing note reaches clients as -32603 with a generic message instead of -32602 "not found".

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.