MCP 101: What It Is and Why It Exists
·
3 AI apps × 3 tools = 9 bespoke
integrations. 30 AI apps × 30 tools = 900, each one breaking independently the
next time a model, an API, or an auth flow changes underneath it.
·
The Model Context Protocol
(MCP) replaces the grid with a hub.
·
Client side: implemented once
per app.
·
Server side: implemented once
per tool.
·
Result: any client can talk to
any server.
In
scope: the shape of the protocol: who talks to
whom, what layers exist, and how one request actually moves end to end.
Out
of scope: implementation and security; those get
their own posts in this series.
One
naming note: MCP versions itself by release date.
When a diagram below says "deprecated 2026-07-28," that's a spec
revision, not a typo; what changed and why is next post's job.
1. The Integration Problem, Before and After
M×N
bespoke integrations collapse to M+N once every app and every tool speaks the
same protocol.
(illustration
only; the plain diagrams below are the source of truth)
Before,
every app wires every tool directly:
After,
every app and every tool wire the protocol, once:
2. Topology: One Host, One Client Per Server
·
Host: the AI application itself, an IDE,
a desktop app, or your own agent.
·
Client: an internal connector the host
owns; one per server, never shared.
·
Server: the process, local or remote,
that actually exposes tools.
The
host mediates everything. The model never talks to a server directly, only
through a client the host owns.
(illustration
only; the plain diagram below is the source of truth)
One client per server, always 1:1. A host
talking to three servers instantiates three clients, never one client fanning
out to three.
3. Two Layers: What Moves vs. How It Moves
·
Data layer: what a request means. Every
tool call, result, and notification is a JSON-RPC 2.0 message, regardless of
transport.
·
Transport layer: how those messages
physically travel. Either a subprocess's stdin/stdout, or an HTTP connection.
The
data layer is identical whether the bytes travel over stdio or HTTP. Swap the
transport, and the data layer doesn't notice.
4. Primitives: Six Capabilities, One Question Each
·
Server-exposed:
·
Tools: model-controlled, side-effecting,
meaning it can change state, not just read it; the model decides when to call
one, similar to a POST.
·
Resources: application-controlled,
read-only, meaning it never changes state, only returns data; the host decides
when to load one, similar to a GET.
·
Prompts: user-controlled, meaning a
human explicitly triggers it rather than the model or host deciding; typically
surfaced as slash commands.
·
Client-exposed:
·
Sampling: asks the client's own LLM for
a completion, so the server never needs its own model or API key.
·
Elicitation: pauses mid-task to ask the
user a structured question.
·
Roots: tells the server which files or
URIs it's allowed to touch.
·
All three always leave a human
able to refuse.
Every
MCP primitive answers the same question: who decides it gets used?
(illustration
only; the plain diagram below is the source of truth)
5. One Round Trip, End to End
Scenario: a user is chatting with an AI assistant wired to a GitHub MCP
server, and asks what repositories they have. The assistant doesn't know on its
own, so it discovers the right tool, calls it, and turns the result into a
sentence. Below is every hop that takes, JSON-RPC message by message.
·
Every arrow below is one
JSON-RPC message, a request, a result, or a notification.
·
`tools/list` and `tools/call`
are the two calls doing the real work; everything else is the host coordinating
around them.
"What
repositories do I have?": nine hops, one answer.
(illustration
only; the plain diagram below is the source of truth)
What's Next
This post covered shape, not mechanics.
Next: what actually happens during connection setup, why the 2026-07-28 spec
revision deleted the handshake entirely, and what stdio and Streamable HTTP
each cost you. After that: building one of these servers yourself.
No comments:
Post a Comment