Model Context Protocol (MCP)
One protocol for connecting an LLM application to tools and data, instead of a bespoke integration per pair
Category: LLM Application Development
On this page: the problem it solves, the core modules, one worked runbook example, then interview prep.
Helpful first: a rough sense of what an LLM agent is and what "tool use" means (the AI Agents track covers that). Protocol-design experience isn't assumed.
Why MCP?
Before a shared protocol, connecting an LLM application to an external system — a database, a file store, a ticketing system — meant writing a custom integration for that specific pairing. An application that wanted to reach five different tools wrote five different integrations; a tool that wanted to be reachable from five different LLM applications had to support five different integration styles. That's an M×N problem: the integration work scales with the product of applications and tools, not the sum.
The Model Context Protocol defines one way for an LLM application to discover and call tools, read resources, and use prompts exposed by any compliant server — regardless of which model or application framework is on one side, or which underlying system is on the other. A server written once, following the protocol, becomes usable by any MCP-compliant application without either side needing to know anything specific about the other.
Analogy — MCP plays the role USB played for peripherals. Before USB, a keyboard, a printer, and a scanner each needed their own specific port and driver on a specific computer — swap computers and nothing connects without adapters and new drivers. USB defined one physical and logical interface any device and any computer could agree on, so a device built once works on any USB-compliant computer, no matter who made either side. MCP does the same for LLM applications and tools — build a server once, and any compliant application can use it.
The Three Roles: Host, Client, Server
MCP's own terminology for these roles is precise and worth using exactly as the spec defines — verify current role names and responsibilities against the official MCP specification, since this is an actively developed protocol.
A single host commonly runs several clients at once, each talking to a different server — a filesystem server, a ticketing-system server, a search server — giving the LLM application access to all of them through the same consistent protocol, rather than one integration style per system.
Learning Modules
Module 01 — Tools, Resources, and Prompts
The three things a server can expose
Topics covered:
A tool is something the model actively decides to call, with arguments, expecting a result back — closer to a function call. A resource is more like a file the host can read and hand to the model as context, without the model having to ask for it through a tool call. Conflating the two leads to a design where everything is modeled as a tool even when a plain resource would be simpler and cheaper to use.
Module 02 — Discovery and the Capability Negotiation
How a client learns what a server can actually do
Topics covered:
A client doesn't hard-code what a server offers; it asks, as the first step of the connection, and the server responds with exactly what it currently supports. This matters in practice because a server's capabilities can change between versions, or even at runtime — a client that assumes a capability without checking the negotiated result can fail confusingly against a server that simply doesn't offer it.
Module 03 — Permissions and the Trust Boundary
Why "the model can call a tool" is a security decision, not just a feature
Topics covered:
Connecting a host to a server that can delete files, send emails, or move money hands the model real-world capability, not just information. The protocol doesn't decide this for you — it's the host and server operator's responsibility to scope what's exposed, and to require explicit confirmation before a tool call with real consequences actually executes.
Production Example
Interview Prep
Lead with the problem, then your fix, then what changed — one minute a question is a good pace.
A Few Questions to Expect
Q1. Why would a server offer a reusable prompt template instead of leaving each caller to write its own prompt?
A: Problem: letting every caller write its own version of "summarize this ticket" produces inconsistent results and duplicated effort across every application that connects to the server. Solution: a server-provided prompt template is written and tuned once, with parameters filled in per call, so every connected host gets the same well-tested wording rather than reinventing it. Result: quality stays consistent across callers, and a later improvement to the template benefits every connected application at once, not just whichever one happened to write the best version.
Q2. What goes wrong when one server exposes far more tools than a given task actually needs?
A: Problem: a maximal server covering everything a backend system can do hands a connected model a correspondingly large surface of things it's technically able to call, whether or not the task in front of it needs most of them. Solution: splitting into several narrowly-scoped servers, each covering one real use case, means what's exposed to any given connection is small enough to actually reason about. Result: an audit of "what could this model have done" stays a short, answerable list instead of a sprawling one.
Q3. A server requests sampling — asking the connected client to run a model completion for it. Why might a host say no?
A: Problem: a server generating model calls through the host's own connection is still spending that host's real resources and model access, on a request the host didn't directly initiate. Solution: sampling is explicitly opt-in from the host's side — a host can decline it outright, or gate it behind its own approval and rate-limiting logic, rather than letting any connected server trigger model calls freely. Result: the host keeps control over its own resource and cost exposure, instead of inheriting an open-ended liability from every server it happens to be connected to.
More scenarios live in the Interview Q&A tab; the Cheatsheets tab has the role and message-flow reference in one place.

