MCP Mental Model — Complete Guide
Curso MCP Engineering · 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.
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, and decides when to use a tool. | The waiter who serves you. | Claude Desktop, an IDE with AI, your own app. |
| Client | A connector that lives inside the host. It maintains the conversation with one server. 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.
A complete example, step by step
You open Claude Desktop and ask it: "Show me the open issues in my GitHub repository." This is what happens on the inside:
- Claude Desktop (host) receives your request and talks to the model, which decides: "for this I need the GitHub tool".
- Inside the host, 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.
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 works the same whether it's on your computer or on the other side of the internet.
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 the next lesson 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 (e.g. Claude Desktop) — 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.
Turning Point Academy · MCP Engineering Course · Module 0 · Mental Model