ЁЯПл The SchoolтА║ЁЯФМ MCPтА║ЁЯНЭ рдзрдбрд╛ 01 тАФ MCP рдХрд╛: adapter рдЪреНрдпрд╛ рдбреНрд░реЙрд╡рд░рдЪреА рд╕рдорд╕реНрдпрд╛
ЁЯЦ╝я╕П See the drawing + lab ЁЯПа Course home ЁЯМ┐ Branch on GitHub тЬПя╕П View source
ЁЯЦ╝я╕П рдЖрдХреГрддреА рдЖрдгрд┐ labThe drawing + lab рдкреВрд░реНрдг рдкрд╛рдирд╛рд╡рд░ рдЙрдШрдбрд╛ тЖЧOpen full page тЖЧ

ЁЯНЭ рдзрдбрд╛ 01 тАФ MCP рдХрд╛: adapter рдЪреНрдпрд╛ рдбреНрд░реЙрд╡рд░рдЪреА рд╕рдорд╕реНрдпрд╛

ЁЯУН рддреБрдореНрд╣реА рдЗрдереЗ рдЖрд╣рд╛рдд: 8 рдкреИрдХреА рдзрдбрд╛ 01 ┬╖ рдкреБрдвреЗ: lesson-02-architecture


ЁЯУж рдпрд╛ рдмреНрд░рдБрдЪрдордзреНрдпреЗ рдХрд╛рдп рдЖрд╣реЗ

MCP рдЬреНрдпрд╛ рд╕рдорд╕реНрдпреЗрд▓рд╛ рд╕рдВрдкрд╡рдгреНрдпрд╛рд╕рд╛рдареА рдЬрдиреНрдорд╛рд▓рд╛ рдЖрд▓рд╛ рддреА рд╕рдорд╕реНрдпрд╛ тАФ рдЖрдгрд┐ protocol рдордзреАрд▓ рдкреНрд░рддреНрдпреЗрдХ рд░рдЪрдирд╛-рдирд┐рд░реНрдгрдп рд╕рдордЬрд╛рд╡рдгрд╛рд░реА рдПрдХрдЪ рдХрд▓реНрдкрдирд╛ (N├ЧM тЖТ N+M).

ЁЯОТ рд╕реБрд░реВ рдХрд░рдгреНрдпрд╛рдкреВрд░реНрд╡реА: рд╣рд╛ AI рдХреЛрд░реНрд╕рдЪреНрдпрд╛ рдмреЛрдирд╕ рдзрдбрд╛ 13 рдЪрд╛ рдЦреЛрд▓ рд╕рд╛рдереАрджрд╛рд░ рдЖрд╣реЗ, рдЖрдгрд┐ Agents рд╢рд╛рд│реЗрдЪреНрдпрд╛ рдЖрдзреА рдХрд┐рдВрд╡рд╛ рдирдВрддрд░ рдерд╛рдВрдмрдгреНрдпрд╛рд╕рд╛рдареА рдЪрд╛рдВрдЧрд▓рд╛ рдЯрдкреНрдкрд╛. рддреБрдореНрд╣рд╛рд▓рд╛ рдлрдХреНрдд Python 3 рд▓рд╛рдЧрддреЗ. рд╣реЗ рдХрд╛рдп рдирд╛рд╣реА: production-SDK tutorial тАФ рд╣реА рд╢рд╛рд│рд╛ рдкреНрд░рддреНрдпреЗрдХ byte рджрд╛рдЦрд╡реВрди protocol (рдЖрд╡реГрддреНрддреА 2026-07-28, рд╕рдзреНрдпрд╛рдЪреА) рд╢рд┐рдХрд╡рддреЗ; рдЦрд▒реНрдпрд╛ servers рд╕рд╛рдареА рдЕрдзрд┐рдХреГрдд SDKs рд╡рд╛рдкрд░рд╛.

ЁЯзТ 5 рд╡рд░реНрд╖рд╛рдВрдЪреНрдпрд╛ рдореБрд▓рд╛рд▓рд╛ рд╕рдордЬрд╛рд╡рд▓реНрдпрд╛рд╕рд╛рд░рдЦреЗ

рд╢рд╛рд│реЗрдЪреА рд╡рд┐рдЬреНрдЮрд╛рди рдкреНрд░рдпреЛрдЧрд╢рд╛рд│рд╛ ЁЯФм: рдкреНрд░рддреНрдпреЗрдХ рдЙрдкрдХрд░рдг (microscope, рддрд░рд╛рдЬреВ, thermometer) рд╕реНрд╡рддрдГрдЪреНрдпрд╛ рд╡рд┐рдЪрд┐рддреНрд░ cable рд╕реЛрдмрдд рдпреЗрддреЗ, рдЖрдгрд┐ рдкреНрд░рддреНрдпреЗрдХ рд╡рд░реНрдЧрд╛рдд рд╡реЗрдЧрд╡реЗрдЧрд│реЗ sockets рдЕрд╕рддрд╛рдд. рдЦреЛрд▓реА 3 рдордзреНрдпреЗ microscope? рдЦреЛрд▓реА-3-microscope рд╕рд╛рдареА рд╣рд╛рддрд╛рдиреЗ adapter рдмрдирд╡рд╛. рдирд╡рд╛ рддрд░рд╛рдЬреВ? рдкрд╛рдЪ рдЦреЛрд▓реНрдпрд╛ = рдЖрдгрдЦреА рдкрд╛рдЪ adapters.

N рдЦреЛрд▓реНрдпрд╛ ├Ч M рдЙрдкрдХрд░рдгреЗ = N├ЧM adapters. рд╕рдлрд╛рдИ рдХрд░реНрдордЪрд╛рд▒реНрдпрд╛рдЪрд╛ рдбреНрд░реЙрд╡рд░ рдореНрд╣рдгрдЬреЗ рдЧреБрдВрддрд▓реЗрд▓реНрдпрд╛ spaghetti рдЪрд╛ рдЧреБрдВрддрд╛. ЁЯНЭ рдЖрдгрд┐ рд╣реЗ рдХрд╛рд▓реНрдкрдирд┐рдХ рдирд╛рд╣реА тАФ MCP рдкреВрд░реНрд╡реА AI tooling рдЕрд╕реЗрдЪ рд╣реЛрддреЗ: IDE рд╕рд╛рдареА рддреБрдордЪреЗ GitHub integration, chatbot рд╕рд╛рдареА рдЖрдгрдЦреА рдПрдХ, рддреБрдордЪреНрдпрд╛ agent рд╕рд╛рдареА рддрд┐рд╕рд░реЗ. рддреАрдЪ рдХреНрд╖рдорддрд╛, рдкреНрд░рддреНрдпреЗрдХ app рд╕рд╛рдареА рдкреБрдиреНрд╣рд╛ рдмрдирд╡рд▓реЗрд▓реА, рдХрд╛рдпрдордЪреА.

рд╢рд╛рд│рд╛ (рдЖрдгрд┐ рдЙрджреНрдпреЛрдЧ) рдиреЗрд╣рдореА рдпрд╛рдЪ рдЙрдкрд╛рдпрд╛рд╡рд░ рдкреЛрд╣реЛрдЪрддрд╛рдд: socket рдЪреЗ рдорд╛рдирдХреАрдХрд░рдг рдХрд░рд╛ ЁЯФМ. рдкреНрд░рддреНрдпреЗрдХ рдЙрдкрдХрд░рдг рдорд╛рдирдХ plug рд╕реЛрдмрдд рдпреЗрддреЗ; рдкреНрд░рддреНрдпреЗрдХ рдЦреЛрд▓реАрдд рдорд╛рдирдХ рднрд┐рдВрддреАрд╡рд░рдЪреЗ socket рдЕрд╕рддреЗ. рдХреЛрдгрддреЗрд╣реА рдЙрдкрдХрд░рдг, рдХреЛрдгрддреАрд╣реА рдЦреЛрд▓реА: N+M.

MCP рдореНрд╣рдгрдЬреЗ AI рд╕рд╛рдареА рддреЗрдЪ socket: apps (hosts) рдирд╛ sockets рдорд┐рд│рддрд╛рдд, рдХреНрд╖рдорддрд╛рдВрдирд╛ (servers) plugs рдорд┐рд│рддрд╛рдд, рдЖрдгрд┐ рдпрд╛ repo рдордзреНрдпреЗ рдПрдХ рдЦрд░реА рдЪрд╛рд▓рдгрд╛рд░реА рдЬреЛрдбреА рдЖрд╣реЗ тАФ server/school_server.py рдЖрдгрд┐ client/mini_client.py тАФ рдЬреА рддреБрдореНрд╣реА рдзрдбрд╛ 07 рдкрд░реНрдпрдВрдд рдкреВрд░реНрдг рд╡рд╛рдЪрд╛рд▓. рдХреЛрдгрддреАрд╣реА рдЬрд╛рджреВ рдЙрд░рдгрд╛рд░ рдирд╛рд╣реА.

ЁЯЧ║я╕П рдЖрдХреГрддреА

flowchart LR
    subgraph before["ЁЯНЭ before: N├ЧM"]
        a1["IDE тип GitHub adapter"]
        a2["chatbot тип GitHub adapter"]
        a3["agent тип GitHub adapter"]
        a4["тАжevery pair, hand-built"]
    end
    subgraph after["ЁЯФМ after: N+M"]
        h["hosts with standard sockets:<br/>IDE ┬╖ chatbot ┬╖ agent"]
        s["servers with standard plugs:<br/>GitHub ┬╖ files ┬╖ your DB"]
        h ---|"one protocol"| s
    end
    before -->|"standardize the socket"| after

тЭУ рдХрд╛рдп

ЁЯдФ рд╣рд╛ рдХреЛрд░реНрд╕ рдХрд╛ (AI рдХреЛрд░реНрд╕рдЪреНрдпрд╛ рдмреЛрдирд╕ рдзрдбреНрдпрд╛рдРрд╡рдЬреА)

AI рдХреЛрд░реНрд╕рдЪрд╛ рдзрдбрд╛ 13 рд╡рд░реВрди рджрд┐рд╕рдгрд╛рд░реЗ рджреГрд╢реНрдп рджреЗрддреЛ. рд╣реА рд╢рд╛рд│рд╛ рдЬрдорд┐рдиреАрд╡рд░ рдЙрддрд░рддреЗ: рдЦрд░реА architecture (L02), рддреАрди primitives (L03), byte-by-byte wire (L04), рдкреНрд░рд╛рдорд╛рдгрд┐рдХрдкрдгреЗ security (L05), рдордЧ рддреБрдореНрд╣реА рдЦрд░рд╛ server рдЖрдгрд┐ client рд╡рд╛рдЪрддрд╛ (L06тАУ07) рдЖрдгрд┐ sequence рдЖрдХреГрддреНрдпрд╛рдВрд╕рд╣ production рд╕рд╛рд░рдЦреЗ рдкрд╛рдЪ use cases рдЕрднреНрдпрд╛рд╕рддрд╛ (L08).

ЁЯзк рдХрд░реВрди рдкрд╛рд╣рд╛ (60 рд╕реЗрдХрдВрдж тАФ рд╕рдВрдкреВрд░реНрдг protocol, live)

python3 client/mini_client.py

рдкрд╛рд╣рд╛: рдУрд│рдЦ ЁЯкк (server/discover), рдПрдХ discovery ЁЯУЛ, рддреАрди tool calls ЁЯз░ тАФ рдкреНрд░рддреНрдпреЗрдХ JSON message рдЫрд╛рдкрд▓реЗрд▓рд╛, рдкреНрд░рддреНрдпреЗрдХ request рд╡рд░ рддреНрдпрд╛рдЪрд╛ _meta badge (рдЖрд╡реГрддреНрддреА 2026-07-28: handshake рдирд╛рд╣реА). рддреЛ рд╕рдВрд╡рд╛рдж рд╣рд╛рдЪ рдпрд╛ рдХреЛрд░реНрд╕рдЪрд╛ рд╕рдВрдкреВрд░реНрдг рд╡рд┐рд╖рдп рдЖрд╣реЗ. рддреБрдореНрд╣рд╛рд▓рд╛ рд╣реЗ рджрд┐рд╕рд╛рдпрд▓рд╛ рд╣рд╡реЗ (рдЫрд╛рдЯрд▓реЗрд▓реЗ):

тХРтХРтХР 1) introductions ЁЯкк тАФ server/discover (optional since 2026-07-28) тХРтХРтХР
тЖТ {"jsonrpc": "2.0", "id": 1, "method": "server/discover", "params": {"_meta": {"io.modelcontext тАж
тЖР {"jsonrpc": "2.0", "id": 1, "result": {"resultType": "complete", "supportedVersions": ["2026-0 тАж
   ЁЯФм school-server v2.0.0 speaks ['2026-07-28'] ┬╖ stocks: tools
тХРтХРтХР 2) discovery ЁЯУЛ тАФ 'what do you offer?' тХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХР
тЖТ {"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {"_meta": {"io.modelcontextproto тАж
тЖР {"jsonrpc": "2.0", "id": 2, "result": {"resultType": "complete", "tools": [{"name": "get_stude тАж
   ЁЯз░ get_student_count: How many students are in a class (3A or 3B)?
   ЁЯз░ lookup_grade: Look up one student's grade (read-only).
   ЁЯз░ add_homework: Add a homework item (WRITES state тАФ hosts should confirm with the user!).
тХРтХРтХР 3) tool calls ЁЯз░ тАФ what an agent's loop would do тХРтХРтХРтХРтХРтХРтХР
тЖТ {"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "get_student_count", "a тАж
тЖР {"jsonrpc": "2.0", "id": 3, "result": {"resultType": "complete", "content": [{"type": "text",  тАж
   ЁЯУД lands on the desk: Class 3A has 3 students: aishwarya, katrina, dipika.
тЖТ {"jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": {"name": "lookup_grade", "argume тАж
тЖР {"jsonrpc": "2.0", "id": 4, "result": {"resultType": "complete", "content": [{"type": "text",  тАж
   ЁЯУД lands on the desk: Katrina (3A) has grade A+.
тЖТ {"jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": {"name": "add_homework", "argume тАж
тЖР {"jsonrpc": "2.0", "id": 5, "result": {"resultType": "complete", "content": [{"type": "text",  тАж
   ЁЯУД lands on the desk: Added тЬПя╕П тАФ homework list is now: [{"title": "read MCP lesson 05", "due": "Friday"}]
тХРтХРтХР done тАФ that was the ENTIRE protocol: three verbs and a badge ЁЯкк (no handshake since 2026-07-28) тХРтХРтХР

рдзрдбрд╛ 07 рдкрд░реНрдпрдВрдд рддреБрдореНрд╣реА рддреНрдпрд╛рдЪреНрдпрд╛ рджреЛрдиреНрд╣реА рдмрд╛рдЬреВ рдордирд╛рдд рд▓рд┐рд╣рд┐рд▓реЗрд▓реНрдпрд╛ рдЕрд╕рддреАрд▓.

тЬЕ рддрдкрд╛рд╕рд╛ тАФ рддреБрдореНрд╣рд╛рд▓рд╛ рдХрд╛рдп рджрд┐рд╕рд╛рдпрд▓рд╛ рд╣рд╡реЗ

python3 client/mini_client.py рддреАрди рд╡рд┐рднрд╛рдЧ рдЫрд╛рдкрддреЛ тАФ ЁЯкк рдУрд│рдЦ (server/discover), ЁЯУЛ discovery (рддреАрди tools рдЪреА рдпрд╛рджреА), ЁЯз░ рддреАрди tool calls тАФ рдкреНрд░рддреНрдпреЗрдХрд╛рдд рдПрдХ тЖТ request рдУрд│ рдЖрдгрд┐ рдПрдХ тЖР reply рдУрд│, рдЖрдгрд┐ рд╢реЗрд╡рдЯ done тАФ that was the ENTIRE protocol рдиреЗ рд╣реЛрддреЛ. Exit code 0, stack trace рдирд╛рд╣реА. рдЫрд╛рдЯрд▓реЗрд▓реЗ рдЕрдкреЗрдХреНрд╖рд┐рдд output рдХрд░реВрди-рдкрд╛рд╣рд╛ рд╡рд┐рднрд╛рдЧрд╛рдд command рдЦрд╛рд▓реА рдЖрд╣реЗ.

ЁЯПБ рддреБрдореНрд╣реА рдЖрддреНрддрд╛рдЪ рдХрд╛рдп рд╕рд┐рджреНрдз рдХреЗрд▓реЗ

Python 3 рд╢рд┐рд╡рд╛рдп рдХрд╛рд╣реАрд╣реА install рди рдХрд░рддрд╛ рддреБрдореНрд╣реА рдЦрд░рд╛ MCP server рдЖрдгрд┐ рдЦрд░рд╛ MCP host рдЪрд╛рд▓рд╡рд▓рд╛ тАФ socket рдореНрд╣рдгрдЬреЗ рдЬрд╛рджреВ рдирд╛рд╣реА, рддреНрдпрд╛ ~230 рдУрд│реА рдЖрд╣реЗрдд рдЬреНрдпрд╛ рддреБрдореНрд╣реА рд╡рд╛рдЪрдгрд╛рд░ рдЖрд╣рд╛рдд.

тЪая╕П рдиреЗрд╣рдореАрдЪреНрдпрд╛ рдЪреБрдХрд╛

ЁЯПн рдкреНрд░рддреНрдпрдХреНрд╖ рд╡рд╛рдкрд░рд╛рдд рд╣реЗ рдХрд╛ рдорд╣рддреНрддреНрд╡рд╛рдЪреЗ: MCP рдЪреЗ рдореВрд▓реНрдп N+M рдЕрд░реНрдерд╢рд╛рд╕реНрддреНрд░рд╛рдд рдЖрд╣реЗ: рдкреНрд░рддреНрдпреЗрдХ рдХреНрд╖рдорддреЗрд╕рд╛рдареА рдПрдХ server, рдЬреЛ рдкреНрд░рддреНрдпреЗрдХ host рдкреБрдиреНрд╣рд╛ рд╡рд╛рдкрд░рддреЛ. рдЬреЗ teams рддреЛ рдиреАрдЯ рд╕реНрд╡реАрдХрд╛рд░рддрд╛рдд рддреЗ servers рдирд╛ рдкреНрд░рддреНрдпреЗрдХ app рд╕рд╛рдареАрдЪрд╛ рдЪрд┐рдХрдЯ рдЧреЛрдВрдж рди рдорд╛рдирддрд╛ рд╕рд╛рдорд╛рдпрд┐рдХ infrastructure рдорд╛рдирддрд╛рдд тАФ versioned, reviewed, least-privilege.

тПня╕П рдкреБрдвреЗ

рдирдХреНрдХреА рдХреЛрдг рдХреЛрдгрд╛рд╢реА рдмреЛрд▓рддреЛ? Hosts, clients, servers тАФ рддреАрди рднреВрдорд┐рдХрд╛.

git checkout lesson-02-architecture

ЁЯНЭ Lesson 01 тАФ Why MCP: the adapter drawer problem

ЁЯУН You are here: Lesson 01 of 8 ┬╖ Next: lesson-02-architecture


ЁЯУж What's in this branch

The problem MCP exists to kill тАФ and the one idea (N├ЧM тЖТ N+M) that explains every design choice in the protocol.

ЁЯОТ Before you start: this is the deep-dive companion to the AI course's bonus lesson 13, and a good stop before or after the Agents school. You need Python 3 only. What this is not: a production-SDK tutorial тАФ this school teaches the protocol (revision 2026-07-28, the current one) by showing every byte; for real servers use the official SDKs.

ЁЯзТ Explain like I'm 5

The school science lab ЁЯФм: every instrument (microscope, scale, thermometer) ships with its own weird cable, and every classroom has different sockets. Microscope in Room 3? Hand-build a Room-3-microscope adapter. New scale? Five rooms = five more adapters.

N rooms ├Ч M instruments = N├ЧM adapters. The janitor's drawer is spaghetti. ЁЯНЭ And it's not hypothetical тАФ that was AI tooling before MCP: your GitHub integration for the IDE, ANOTHER one for the chatbot, a THIRD for your agent. Same capability, rebuilt per app, forever.

The fix schools (and industries) always land on: standardize the socket ЁЯФМ. Every instrument ships the standard plug; every room has the standard wall socket. Any instrument, any room: N+M.

MCP is that socket for AI: apps (hosts) get sockets, capabilities (servers) get plugs, and this repo contains a REAL working pair тАФ server/school_server.py and client/mini_client.py тАФ that you'll read in full by lesson 07. No magic will remain.

ЁЯЧ║я╕П Diagram

flowchart LR
    subgraph before["ЁЯНЭ before: N├ЧM"]
        a1["IDE тип GitHub adapter"]
        a2["chatbot тип GitHub adapter"]
        a3["agent тип GitHub adapter"]
        a4["тАжevery pair, hand-built"]
    end
    subgraph after["ЁЯФМ after: N+M"]
        h["hosts with standard sockets:<br/>IDE ┬╖ chatbot ┬╖ agent"]
        s["servers with standard plugs:<br/>GitHub ┬╖ files ┬╖ your DB"]
        h ---|"one protocol"| s
    end
    before -->|"standardize the socket"| after

тЭУ What

ЁЯдФ Why this course (vs the AI course's bonus lesson)

The AI course's lesson 13 gives the aerial view. This school goes to the ground: the actual architecture (L02), the three primitives (L03), the wire byte-by-byte (L04), security honestly (L05), then you READ a real server and client (L06тАУ07) and study five production-shaped use cases with sequence diagrams (L08).

ЁЯзк Try it (60 seconds тАФ the whole protocol, live)

python3 client/mini_client.py

Watch: introductions ЁЯкк (server/discover), a discovery ЁЯУЛ, three tool calls ЁЯз░ тАФ every JSON message printed, each request wearing its _meta badge (revision 2026-07-28: no handshake). That conversation is the entire subject of this course. You should see, trimmed:

тХРтХРтХР 1) introductions ЁЯкк тАФ server/discover (optional since 2026-07-28) тХРтХРтХР
тЖТ {"jsonrpc": "2.0", "id": 1, "method": "server/discover", "params": {"_meta": {"io.modelcontext тАж
тЖР {"jsonrpc": "2.0", "id": 1, "result": {"resultType": "complete", "supportedVersions": ["2026-0 тАж
   ЁЯФм school-server v2.0.0 speaks ['2026-07-28'] ┬╖ stocks: tools
тХРтХРтХР 2) discovery ЁЯУЛ тАФ 'what do you offer?' тХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХРтХР
тЖТ {"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {"_meta": {"io.modelcontextproto тАж
тЖР {"jsonrpc": "2.0", "id": 2, "result": {"resultType": "complete", "tools": [{"name": "get_stude тАж
   ЁЯз░ get_student_count: How many students are in a class (3A or 3B)?
   ЁЯз░ lookup_grade: Look up one student's grade (read-only).
   ЁЯз░ add_homework: Add a homework item (WRITES state тАФ hosts should confirm with the user!).
тХРтХРтХР 3) tool calls ЁЯз░ тАФ what an agent's loop would do тХРтХРтХРтХРтХРтХРтХР
тЖТ {"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "get_student_count", "a тАж
тЖР {"jsonrpc": "2.0", "id": 3, "result": {"resultType": "complete", "content": [{"type": "text",  тАж
   ЁЯУД lands on the desk: Class 3A has 3 students: aishwarya, katrina, dipika.
тЖТ {"jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": {"name": "lookup_grade", "argume тАж
тЖР {"jsonrpc": "2.0", "id": 4, "result": {"resultType": "complete", "content": [{"type": "text",  тАж
   ЁЯУД lands on the desk: Katrina (3A) has grade A+.
тЖТ {"jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": {"name": "add_homework", "argume тАж
тЖР {"jsonrpc": "2.0", "id": 5, "result": {"resultType": "complete", "content": [{"type": "text",  тАж
   ЁЯУД lands on the desk: Added тЬПя╕П тАФ homework list is now: [{"title": "read MCP lesson 05", "due": "Friday"}]
тХРтХРтХР done тАФ that was the ENTIRE protocol: three verbs and a badge ЁЯкк (no handshake since 2026-07-28) тХРтХРтХР

By lesson 07 you'll have written both sides of it in your head.

тЬЕ Verify тАФ what you should see

python3 client/mini_client.py prints three sections тАФ ЁЯкк introductions (server/discover), ЁЯУЛ discovery (three tools listed), ЁЯз░ three tool calls тАФ each with a тЖТ request line and a тЖР reply line, and ends with done тАФ that was the ENTIRE protocol. Exit code 0, no stack trace. The trimmed expected output is under the command in the Try-it section.

ЁЯПБ What you just proved

You ran a real MCP server and a real MCP host with nothing installed beyond Python 3 тАФ the socket is not magic, it is ~230 lines you will read.

тЪая╕П Common mistakes

ЁЯПн Why this matters in production: MCP's value is the N+M economics: one server per capability, reused by every host. Teams that adopt it well treat servers as shared infrastructure тАФ versioned, reviewed, least-privilege тАФ rather than per-app glue.

тПня╕П Next

Who exactly talks to whom? Hosts, clients, servers тАФ the three roles.

git checkout lesson-02-architecture
тЖР Course homeall lessonsNext тЖТarchitecture

This page is the lesson's README from the lesson-01-why-mcp branch, shown here so the whole School stays on one site. Code files open on GitHub at the same branch.