Skip to the workspace
Pebellslearn by building
Tools and the Model Context Protocol  ›  Lesson

MCP — Hosts, Clients and Servers

MCP Hosts 15 minThe Model Context Protocol is an open standard in which a host application runs one client per connection to servers that expose tools, resources and prompts.

ai agents / MCP — Hosts, Clients and Servers

Explore each scene at your own pace.

01 · The rule

The rule

MCP — Hosts, Clients and Servers

The railway company builds a timetable integration for Tripmate. Then a coding assistant wants the same timetable, then a chat app, then a calendar app. Without a shared standard, every app–service pair needs its own custom glue. The Model Context Protocol (MCP) is an open standard that lets a service describe its tools once and have any compatible AI application use them.

The rule

The host is the app, a client is one connection, a server offers capabilities.

MCP has three roles:

  • Host — the AI application the user actually works in: a chat app, a code editor, or your own agent such as Tripmate. It manages the conversation with the model and decides what the model is allowed to use.
  • Client — a connector inside the host. Each client holds one connection to one server. A host talking to three servers runs three clients.
  • Server — a program that exposes capabilities over the protocol. The main kinds are tools (actions the model can call), resources (data the app can read, like a file or a record), and prompts (reusable templates).
Host: Tripmate app ─┬─ client ──→ server: railway timetable (tools: search_trains)
                    ├─ client ──→ server: calendar (resources: events; tools: add_event)
                    └─ client ──→ server: files (resources: trip documents)

Messages between client and server follow a fixed request–response format (MCP uses JSON-RPC). When a client connects, it asks the server what it offers; the host can then pass those tool definitions to the model just like tools it defined itself.

The payoff is arithmetic. With 4 apps and 5 services, custom glue means up to 4 × 5 = 20 integrations. With a shared protocol, each app supports MCP once and each service ships one server: 4 + 5 = 9 pieces.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.