← Back to the course home

📐 The 8 lessons as diagrams

Purple = the protocol (1–5) · orange = build & deploy (6–8). Lessons 02, 04, 07 are sequence diagrams — the natural language of protocols.

1 🍝 Why MCP

The adapter drawer (N×M) → the standard socket (N+M).

🍝 before: N×M adaptersIDE×GitHub · chatbot×GitHub ·agent×GitHub · every pair,hand-built, none reusable🏫 hosts - standard socketsIDE · chatbot · agent🔬 servers - standard plugsGitHub · files · your DB12🔌 N+Mwrite once,plug in everywhere3

Read full lesson 01 →

2 🏫 Architecture

Room (host) · wall socket (client) · instrument (server).

🧠 model🏫 host🔌 client🔬 serverthe model only ever ASKS · the host does · the server answers'I want lookup_grade(sita)' — in words1the host DECIDES — permission checks live here 🚧approved → forward2tools/call over the socket3result4→ lands on the model's desk 📄5

Read full lesson 02 →

3 🧰 The three shelves

Tools, resources, prompts — model, app and user each decide one.

🧰 TOOLSactions with inputs:lookup_grade · add_homeworkWHO decides: the MODEL(host permitting)📁 RESOURCESreadable context:file:// · db://students/3AWHO decides: the APP(what goes on the desk)📜 PROMPTSsuggested recipes:/summarize-ticketWHO decides: the USER(menus, slash-commands)123three shelves, three deciders — say it twice and you know more MCP than most 😄

Read full lesson 03 →

4 🤝 The wire

Three verbs and a handshake — the whole protocol, message by message.

🔌 client🔬 serverthree verbs and a handshake — run python3 client/mini_client.py and watch these exact linesinitialize {protocolVersion, clientInfo}1{protocolVersion, capabilities:{tools}, serverInfo}2notifications/initialized — no id, no reply3tools/list4{tools:[{name, description, inputSchema}…]}5tools/call {name:"lookup_grade", arguments:{student:"sita"}}6{content:[{type:"text", text:"Sita (3A) has grade A+."}]}7

Read full lesson 04 →

5 🚧 Transports & trust

Direct plug vs extension cord — and the three rules of not getting burned.

🔌 stdio - the direct plughost launches server as child process;JSON per line on stdin/stdout · local things1📡 HTTP - the extension cordsame messages over HTTP + auth (OAuth);remote/shared things · team DB, SaaS2🚧 rule 1: a server =installed software withYOUR permissions🚧 rule 2: tool results maycarry prompt injection —treat as data, not commands🚧 rule 3: WRITES get ahuman gate — reads may flow,add_homework waits for a click3

Read full lesson 05 →

6 🔬 Build a server

110 honest lines: the wrapped thing, the shelf, the dispatcher, the plumbing.

1 🗄️ the wrapped thingtoy DB here — YOUR Postgres/API in real life;MCP is just the plug on the front12 📋 the shelf: TOOLSname · description (FOR THE MODEL!) ·inputSchema — rich schemas steer behavior23 🔀 run_tool() dispatcherplain Python if-ladder — unit-testable,no protocol in sight34 🔧 main() plumbingline in → JSON-RPC → line out · flush=True!errors = polite isError content, never a crash4server/school_server.py — 110 lines, all four parts visible · the official SDKs automate exactly this

Read full lesson 06 →

7 🔌 Build a client

The side with the power — the model asks, the HOST does.

🧑 you (--drive)🏫 MiniHost🔬 school_serverclient/mini_client.py — swap the input() for a model API call and you have a real agent host"call lookup_grade {student: sita}"1⚡ the POWER moment: the host decides (real hosts: permission prompt here 🚧)tools/call {…, id:4}2{id:4, content:[…grade A+…]}3📄 lands on the desk4

Read full lesson 07 →

8 🌍 Real-world use cases

Coding, support, data, meetings, reports — with sequence diagrams.

🐙 coding assistantissue → code → tests → PR(PR waits for your click 🚧)1🎧 support deskorders DB (read-only!) + docs→ grounded answer + receipts2📊 data analystquery_db → make_chartSELECT-only via scoped account3📅 meeting-prep butlercalendar + CRM + email —3 servers, one desk (N+M!)4📁 report robotread folder → summarize →slack_post gated by a click 🚧5each drawn twice on the use-cases page: numbered flow + full sequence diagram →

Read full lesson 08 →