CourseModel Context Protocol: The Complete Course · Course guide · part 1 of 77
Part 1 · Course guide

Model Context Protocol: The Complete Course

5 min read·13 Oct 2026

How AI applications connect to tools and data through one open protocol: why it exists, what goes over the wire, how to build servers and hosts, how to authorise and secure them, and how to run them in production, built on one small project from the first lesson to the last.

You build one thing: a research notes assistant for Nare, who runs a small sleep and memory lab with Priya and Tomas. It starts as an MCP server over eight Markdown notes and grows into a host that lets a model search the notes and the lab's equipment calendar, saves new notes only with Nare's approval, checks who is asking over HTTP, resists instructions planted in a note, and runs as two replicas behind a balancer. The lab is fictional and its data is simulated; every lesson also opens with a real, cited case.

Who this course is for

You can write Python: functions, classes, dictionaries, async and await at a basic level, running a notebook. You know roughly what HTTP and JSON are. You do not need to have used MCP before.

You are...Start at
New to MCPModule 1, and go in order
A developer who has built a small MCP server alreadyModule 2 (the 2026-07-28 wire format changed a lot), then Module 3
Building a host or an agent that uses MCP serversModule 1, Lesson 3, then Modules 6 and 10
Responsible for securityModule 1, then Modules 7 and 8
Responsible for running servers in productionModules 2, 5 and 9
New to calling language modelsThe LLMs course, Modules 1 and 6, first

Every module's README lists what you need to know before starting it, so you can check whether it is safe to skip the one before.

What you need

  • A Google account, to run code in Google Colab. Nothing to install.
  • One free API key, from Groq or Google Gemini, for the lessons where a model chooses tools. Or no key at all, if you run a model on your own computer with Ollama and work in a code editor.
  • For a few steps (a desktop host, the MCP Inspector, a real identity provider, containers), your own computer. Those steps say so, and one page covers running the course locally: section 7 of course-guide/02.

Setup takes about fifteen minutes: course-guide/02-setup-colab-and-llm-providers.md.

The modules

#ModuleWhat you add to the notes assistantNeeds first
1FoundationsThe notes, NoteStore, chat() for three providers, "search my notes" with function calling and then as an MCP server, in memory and over stdioPython
2Protocol Architecture and TransportsA raw wire driver, the error codes, versions and discovery, stdio and Streamable HTTP, Origin and Host checksModule 1
3Toolssearch_notes and create_note with schemas, annotations, results and errors; tool choice measured on 20 questionsModule 1
4Resources, Prompts, and User Interactionnotes://index, notes://{note_id}, summarise_topic; confirmation by form; a key collected by URL, never in the chatModules 1 and 3
5Building ServersThe server as a configured, tested package; a long-running reindex with progress and cancellationModules 1, 3 and 4
6Building Clients and HostsA host with an agent loop, a second server, namespacing, approvals, timeouts and a tool searchModules 3 and 5
7AuthorizationToken verification with audience and scopes on the HTTP server: read for Priya and Tomas, write for NareModules 2 and 5
8SecuritySix attacks run and then stopped, pinned tool definitions, defences measured layer by layerModules 3 and 6; Module 7 helps
9Production and EcosystemStateless replicas, rate limits, redacted logs, tracing, a resumable bulk import, a registry entry, a containerModules 2, 5 and 7
10Design Patterns and Agentic SystemsA task-shaped server, composition, a retrieval server, an evaluation with a regression gateModules 3 and 6
11CapstoneThe finished repository against an acceptance checklist, six questions, and a record of what brokeThe modules before it

Where other courses go deeper

This course stays on the protocol and the systems built around it. For depth elsewhere:

  • How language models choose tools, structured output and tool calling without MCP: Module 6 of the LLMs course.
  • Agents that act unattended, with durable state, where MCP is one tool among many: the Agentic AI Engineer course. Its Module 4 is a shorter introduction to MCP; this course links to it where the two overlap.
  • Retrieval pipelines (chunking, embeddings, hybrid search, reranking): the RAG course. Module 10 here builds only a small retrieval server.
  • Web services, databases and deployment as general engineering: the AI Engineering course.

How each lesson works

Every lesson is a walk through one example from Nare's lab, one picture at a time:

  1. The situation: a specific problem in the lab.
  2. A real case, first: something that really happened, from a published source, cited.
  3. The idea: fifteen to thirty figures, one idea each, one running example.
  4. Run it: code with a walkthrough of every line.
  5. Break it: a failure you cause on purpose.
  6. In production: what teams do with this at scale.
  7. Check yourself: questions, one exercise, key terms and sources.

Each module ends with a lab (a guided piece of the notes assistant) and an incident file (a real, published failure replayed in the lab and fixed). Every output shown in the course comes from a real run. More detail: course-guide/01-how-this-course-works.md.

The tools you will use

Python throughout. The official MCP Python SDK (mcp 2.3.0, protocol revision 2026-07-28, checked 13 October 2026) for every server and client. LangChain for calling models and LangGraph for loops and approvals, so the same code works with Groq, Gemini or Ollama. PyJWT for tokens, OpenTelemetry for tracing, Redis (with fakeredis in a notebook) and RQ for jobs, pytest for tests, and Docker for the container. Everything is open source apart from the hosted model services.

Course guide

FileRead it when
01-how-this-course-works.mdBefore your first lesson
02-setup-colab-and-llm-providers.mdBefore you run any code; it also shows how MCP runs in a notebook and how to work locally
03-the-notes-assistant.mdTo meet the lab, the people, the fixed names, the dates and the repository
06-shared-data.mdTo see the notes and fixtures every module reuses
04-style-guide.mdOnly if you are writing or editing lessons
05-image-style-guide.mdOnly if you are drawing the course figures

The one measure

When a model reaches a tool through your server, does it get exactly what it should, only what it should, and only when the person it acts for would agree? Almost everything in this course exists to answer that with tests you can run.