MCP Mental Model — Complete Guide
MCP Engineering course · M0
This guide gives you the mental map of MCP: the three pieces that appear every time an AI uses an external tool, and the two layers through which its messages travel. We're not writing code yet — this is pure concept. When this picture is clear to you, the rest of the course reads itself.
Revision taught: MCP specification 2026-07-28 (current). Where older material differs, this guide labels it legacy (2025-11-25 and earlier).
In one sentence
Every time an AI application uses an external tool, there are always three players —host, client, and server— that communicate over two layers: one defines what they say to each other (the data) and the other how those messages travel (the transport).
The analogy you won't forget
Think of a restaurant:
- You, the diner, place an order with the waiter. The waiter is the host: they take what you want, coordinate everything, and bring you the result.
- The waiter doesn't cook. They pass the order to the kitchen through a window. Each window connects the waiter to one specific kitchen: that window is the client.
- The kitchen is the one that knows how to make the dishes: it's the server, the one that exposes capabilities (the dishes it can prepare).
If the restaurant has three kitchens (grill, pasta, desserts), the waiter uses three windows, one per kitchen. Keep this image: we're going to map it piece by piece.
The three roles
| Role | What it is | In the restaurant | Real example |
|---|---|---|---|
| Host | The AI application that coordinates everything: receives your request, talks to the model, enforces consent and decides which tool calls the user must approve. | The waiter who serves you. | Claude Code, an IDE with AI, your own app. |
| Client | A connector that lives inside the host. It handles all requests to one server and attaches the protocol version and capabilities to every request. Golden rule: one client per server. | The window to a kitchen. | The connector that talks to the GitHub server. |
| Server | The program that exposes capabilities (tools, data, prompts). It's what you'll learn to build. | The kitchen that prepares the dishes. | GitHub server, your database server, your calendar server. |
Notice the one-to-one relationship between client and server: if the host connects to three servers, inside it has three clients. It's not one client that talks to all of them; it's one dedicated per server, like one window per kitchen.
Current (2026-07-28): since 2026-07-28 each request is self-contained. A client is not "a connection that remembers"; it is the component that attaches the right metadata to each request for its one server. Legacy (2025-11-25 and earlier): clients opened a session with an initialize handshake first.
A complete example, step by step
You open Claude Code and ask it: "Show me the open issues in my GitHub repository." This is what happens on the inside:
- Claude Code (host) receives your request and talks to the model, which decides: "for this I need the GitHub tool".
- The host shows you the tool call and its arguments and asks you to approve it (unless you pre-approved that specific tool). Then the client dedicated to GitHub sends the request to the GitHub server.
- The GitHub server exposes the "list issues" capability, runs it against GitHub, and returns the list.
- The host gathers that response and shows it to you on screen.
Three pieces, one flow: the host coordinated, the client connected, and the server exposed the capability. If tomorrow you add a second tool (for example, your calendar), the host opens a second client to the calendar server, and that's it — the structure doesn't change, just one more window is added.
Who owns what: consent, isolation, validation
- Consent lives in the host. The spec says there SHOULD always be a human able to deny tool invocations. How the prompt looks is host-specific; your server cannot force a dialog.
- Annotations are hints.
readOnlyHintordestructiveHinthelp a host present a tool, but clients MUST treat them as untrusted unless the server is trusted. - Isolation. Servers should not read the whole conversation or see into other servers. A database server never sees what the GitHub server returned unless the host passes it along.
- The server still validates. Servers MUST validate all tool inputs, implement access controls, rate-limit and sanitise outputs. A user can approve a call that is still invalid.
Logical, not physical — the point that gets confused most
"Client" and "server" are logical roles, not different computers. It's not "one client machine and another server machine". They describe a function in the conversation, not two separate devices.
It's like the words "guest" and "host": they describe a role in a situation, not two different people forever. A single app can be a server for one thing and a client for another at the same time. Don't think of two machines; think of two parts that someone plays at a given moment.
The two layers
Every MCP conversation is organized into two layers. For now you only need to recognize the names; each one has its own lesson later on.
| Layer | What it defines | In the restaurant |
|---|---|---|
| Data layer | What the client and server say to each other: the common language. That language is called JSON-RPC 2.0, a standard message format. | The language the order tickets are written in. |
| Transport layer | How those messages travel from one side to the other (inside your computer or over the network). | The mail carrier who takes the ticket from the table to the kitchen. |
The rule to remember it:
The data layer is the language; the transport layer is the mail carrier. You can change the mail carrier without changing the language: the message says the same, travel however it may. That's why the same server's tools behave the same whether it's on your computer or on the other side of the internet, apart from the security and auth that network transports require (headers, Origin validation, authorization).
You don't need to understand JSON-RPC 2.0 yet. Keep the name: it's simply the agreed format so that client and server understand each other without ambiguity.
How this connects to the rest of the course
This model is the foundation of everything that follows:
- The N×M problem from the previous lesson is solved right here: since all hosts speak the same language (data layer) with any server, there's no need to program an integration by hand for each pair.
- In lesson L03 you connect a real server (the L11 lab server) to a host and watch the consent prompt appear; in L04 we open the server from the inside: which primitives it exposes (tools, resources, and prompts).
- The first time we build a real server is in Module 2. Everything you do there fits into this same picture: you'll be on the kitchen side.
Glossary
- Host: the AI application that coordinates everything and owns consent (e.g. Claude Code) — the "waiter".
- Client: connector inside the host; one per server — the "window".
- Server: exposes capabilities (tools, data, prompts) — the "kitchen"; what you'll learn to build.
- Logical role: a function in the conversation, not a different computer.
- Data layer: the language of the messages; it's called JSON-RPC 2.0.
- Transport layer: how those messages travel (inside the computer or over the network).
- JSON-RPC 2.0: the standard message format that client and server use to understand each other.
To remember
- Three roles: the host coordinates, the client connects, and the server exposes capabilities.
- Golden rule: one client per server (one window per kitchen).
- "Client" and "server" are logical roles, not different machines — like "guest" and "host".
- Two layers: the data one is the language (JSON-RPC 2.0); the transport one is the mail carrier.
- What you'll learn to build in the course is the server.
- Consent belongs to the host; validation belongs to the server. Annotations are hints, never a security control.
Turning Point Academy · MCP Engineering course · Module 0 · Lesson 3 (L03) · V2, spec 2026-07-28