ProjekinAja. Agentic AI Stage 2 · How Agents Work Lesson 2.8
● Stage 2 · Lesson 2.8

MCP & the Plumbing

Tools are the hands; the plumbing is how those hands plug in. The Model Context Protocol is becoming the USB-C of AI tools — one standard so any agent can use any tool.

⏱ ~14 min read 🔌 The connective layer 🧩 Ecosystem unlock

🎯 By the end you'll understand

Why connecting agents to tools used to be a brittle mess, what the Model Context Protocol (MCP) is in plain language, the USB-C / power-socket analogy that makes it click, what an MCP server can expose (tools, resources, prompts), why a shared standard changes the whole ecosystem — and the honest caveats about a standard that's still young.

KEY INSIGHTThe one idea to take away

Back in 2.2 we gave the agent hands. This lesson is about the wall socket those hands plug into — and why everyone agreeing on one socket changes everything.

An agent's power comes from its tools — the ability to search, read files, send email, hit an API. But there's a hidden question nobody asks until they build something real: how does a tool actually connect to an agent? For a long time the answer was "however you can manage, by hand, every single time." The Model Context Protocol (MCP) is the attempt to replace that mess with a single, shared plug.

🔑 Hold onto this

MCP doesn't make the model smarter. It makes the model connectable. Build a tool once as an MCP server, and any MCP-aware agent can use it — no custom wiring per agent. It's plumbing, and plumbing is exactly the kind of boring thing that quietly unlocks an entire ecosystem.

CONTEXTBefore standards: the N × M problem

Picture the world just before MCP. You've got a handful of agents — a coding assistant, a research agent, a customer-support bot — and a handful of tools each one might want: a GitHub connector, a database reader, a Slack poster, a file system.

Now connect them. Every agent speaks tools in its own way: its own format for describing what a tool does, its own way of passing arguments, its own auth handling. So to let your coding assistant use GitHub, somebody writes a custom integration. To let the research agent also use GitHub? Write it again, differently, for that agent. Slack for the support bot? Another bespoke connector.

This is the classic N × M problem: with N agents and M tools, you can end up wiring up to N × M custom integrations — and each one is a brittle, one-off, hand-maintained bridge. Five agents and six tools is potentially thirty little integrations, each breaking on its own schedule.

▸ The receipt

Custom integrations rot. The tool's API changes, the agent's tool format changes, an auth token expires — and because every bridge was hand-built, every fix is also hand-built. Teams spent shocking amounts of effort just keeping the plumbing from leaking, with nothing reusable to show for it.

If that smell feels familiar, it should: it's the exact situation electronics were in before standard plugs — every device with its own proprietary charger. The fix, then and now, is the same: agree on one connector.

DEFINITIONWhat MCP actually is

The Model Context Protocol is an open standard — a shared agreement — for how AI agents connect to external tools, data, and prompts. Instead of every agent inventing its own way to talk to tools, MCP defines one common language for that conversation.

It has two sides, and the names matter:

MCP Server 🔌MCP Client (inside a Host) 🤖
Roleoffers capabilitiesconsumes capabilities
You build it to…expose a tool, a data source, a promptlet an agent discover & use whatever's offered
Real examplea GitHub MCP server, a Postgres MCP serveryour coding agent, a chat app, an IDE assistant
Analogythe wall socket on the wallthe device you plug in

One precise distinction worth keeping straight: the host is the application (your IDE, a chat app) that contains one or more clients, and each client holds a single 1:1 connection to one server. So a host with three connected servers is running three clients — one direct link each. "Host" is the app; "client" is the per-connection endpoint inside it.

So when someone says "there's an MCP server for Notion," they mean: somebody wrote a standard adapter that exposes Notion's capabilities through MCP. Now any MCP-aware agent — yours, mine, a tool you've never heard of — can plug into Notion without anyone writing fresh integration code. That's the whole magic trick.

📖 Model Context Protocol (MCP)

An open protocol that standardizes how AI applications connect agents to external tools, data, and prompts. An MCP server exposes capabilities; a host (the agent's app) runs one or more clients, each holding a direct 1:1 connection to a server. Build the tool once; any compliant agent can use it. MCP is a shared convention, not a central router — connections stay point-to-point.

SEE ITPlug-and-play tools

Here are 4 agents and 4 tools. Flip between the old world and the MCP world and watch the wiring change. Then press add a tool and notice the difference in how much new plumbing each world needs.

🔌 Interactive · The same agents and tools, two worlds

Left column = agents (the clients/hosts). Right column = tools (the servers).

📊 Readout

🔑 Read the diagram carefully

There is no central MCP server everything routes through. Each client still keeps a direct, 1:1 connection to each server — the band in the middle is the shared standard (a common protocol both sides implement once), not a hub or message bus that traffic flows through. What collapses isn't the number of live connections; it's the amount of integration code you write: each side speaks one standard, so you build each integration once.

FRAMEWORKWhat an MCP server can expose

"Tools" is the headline, but an MCP server can offer three distinct kinds of thing. Knowing the difference helps you read any server's docs at a glance:

🛠️

Tools — actions

Functions the agent can call to do something: create_issue(), send_email(), run_query(). These are the verbs — the hands from Lesson 2.2.

📄

Resources — data

Files, records, or documents the agent can read as context: a file's contents, a database row, a wiki page. These flow into the context window (Lesson 2.3) — they're the nouns.

📝

Prompts — templates

Reusable, parameterized prompt templates the server author wrote for common tasks — e.g. a "summarize this PR" prompt that already knows the right structure. Shared expertise, packaged.

▸ The mental model

A good MCP server is like a well-labeled toolbox: tools (things to do), resources (things to look at), and prompts (good ways to ask). The agent opens the box, sees what's inside through one standard interface, and gets to work.

CORE CONCEPTWhy a boring standard is a big deal

Standards feel unglamorous. But back in Lesson 1.4 we said one of the quiet unlocks behind agents was standardization — and MCP is that idea applied to the connective tissue. Here's the chain reaction:

This is exactly why the USB-C analogy stuck. Before USB-C, every gadget needed its own cable and you carried a tangle of them. After, one port, one cable, anything plugs into anything. MCP is trying to be that port for AI tools — and when a standard wins, the whole field moves faster because nobody's rebuilding the same bridge.

PRACTICALThe rest of the plumbing

MCP is the most visible piece of the connective layer, but it sits inside a bigger picture of how agents reach the world. Three companions you'll keep meeting:

PieceWhat it doesWhy you care
APIsthe underlying interfaces tools exposeMCP servers usually wrap an API in a standard skin; the API is still doing the real work
Auth & permissionswho's allowed to do whata tool that can act needs scoped credentials — read-only vs. write, your data vs. everyone's
Sandboxeswalled-off environments to run risky actionslet an agent execute code or touch files without it reaching anything it shouldn't

The thread tying these together is control: a protocol gets the tool connected, but auth, permissions, and sandboxes decide how much the connected tool can do. We'll treat the security of all this seriously in Lesson 4.10.

💡 A grounding analogy

MCP is the standardized socket. Auth is the key to the building. Permissions are which rooms your key opens. A sandbox is a padded room where it's safe to let the agent experiment. You want all four — a great socket on an unlocked building is not a feature.

WEAKNESSAn honest note on a young standard

It would be dishonest to present MCP as finished and bulletproof. It isn't — and that's fine, but you should know the shape of the caveats:

⚠️ The danger in one line

A standard plug makes it easy to connect things — which means it's also easy to connect the wrong thing. Easy connection is a double-edged sword. We unpack how this and other things break in Lesson 2.9 · Failure Modes.

WEAKNESSCommon mistakes to avoid

✗ "MCP makes the model smarter."

It doesn't touch the model's intelligence at all. MCP makes the model connectable — it standardizes how tools and data reach the agent. The brain is unchanged; you've just given it a universal plug.

✗ "If a tool is connected over MCP, it's automatically safe."

No. The protocol standardizes connection, not trust. Auth, permissions, sandboxing, and watching for prompt injection are all still your job. A clean plug can carry dirty data.

✗ "You must use MCP for everything."

MCP shines when tools are shared and reused across many agents. For a single, private, one-off tool inside your own app, a plain function call may be simpler. Use the standard where standardization pays off — not as a religion.

KEY INSIGHTWhere this connects in your course

  • Tools (2.2) — MCP is how those hands plug in; this lesson is the socket for the hands you already met.
  • Multi-agent systems (2.7) — when many agents share the same MCP servers, a fleet can reuse one toolset instead of each wiring its own.
  • The standardization unlock (1.4) — MCP is that "boring standard quietly changes everything" idea made concrete.
  • No-code tool building (4.5) — when you wire your own agent to tools, MCP servers are often what you'll be plugging in.
  • Security & permissions (4.10) — auth, sandboxes, and locking down what a connected tool can actually do.

Forward, too: the very ease of connection sets up Lesson 2.9, where we look squarely at how agents — and their plumbing — fail.

GLOSSARYKey terms introduced

MCP (Model Context Protocol)
An open standard for connecting AI agents to external tools, data, and prompts through one shared interface.
MCP server
A program that exposes capabilities (tools, resources, prompts) over MCP — the "wall socket" any agent can plug into.
Host
The agent's application (an IDE, a chat app) that contains one or more clients — the "device" that plugs into sockets.
Client
A per-connection endpoint inside a host that holds a single direct 1:1 link to one MCP server. One host can run several clients.
Resource
Data an MCP server makes readable to an agent — a file, record, or document pulled in as context.
Protocol
A shared agreement for how two systems talk, so they can interoperate without custom, one-off code.
Integration
The wiring that connects a tool to an agent; before standards, each one was custom and brittle.
API
Application Programming Interface — the underlying interface a tool exposes, often what an MCP server wraps.

ACTIVE RECALLCheck your understanding

Answer in your own words first, then reveal.

1What problem did MCP exist to solve?›

The N × M problem: with N agents and M tools, every agent–tool pair needed its own custom, brittle integration. MCP replaces that with one shared standard, so a tool built once works with any MCP-aware agent — collapsing the wiring toward N + M.

2In MCP, what's the difference between a server and a client/host?›

A server offers capabilities (the wall socket). The host is the agent's app that consumes them (the device you plug in); inside it, each client holds a direct 1:1 connection to one server. Build the server once; any compliant client can use it.

3What three kinds of thing can an MCP server expose?›

Tools (actions the agent can call), resources (data the agent can read as context), and prompts (reusable prompt templates). Verbs, nouns, and good ways to ask.

4Why is "connected over MCP" not the same as "safe"?›

MCP standardizes connection, not trust. A connected tool can carry attacks inward — e.g. prompt injection hidden in a resource. Auth, permissions, and sandboxes (Lesson 4.10) still decide how much a connected tool can actually do.

Easy connection cuts both ways. Next: how agents fail →