MCP (Model Context Protocol)
Also known as: Model Context Protocol
The Model Context Protocol is an open standard for connecting AI applications to external tools, data and prompts through a uniform client/server interface. It replaces per-integration glue with one protocol, so a tool implemented once is usable by any MCP-capable client.
Last reviewed · Part of the Architecture Glossary
In practice
An MCP server exposes three primitive kinds:
- Tools — callable functions with a JSON schema, invoked by the model.
- Resources — readable content addressed by URI, pulled into context.
- Prompts — parameterised templates the user can invoke deliberately.
Transport is stdio for local servers and HTTP with server-sent events for remote ones. The architectural value is the N x M collapse: without a protocol, five clients and twenty integrations is a hundred bespoke connectors; with one, it is twenty-five implementations.
Two engineering realities. Tool definitions occupy context window on every turn, so mounting a dozen servers has a per-request cost that shows up on the bill. And a server you do not operate is untrusted input into a privileged loop — the prompt injection surface grows with each one connected.
When it matters
Building internal tooling for coding agents, exposing a product's capabilities to AI clients, or standardising how a team's agents reach internal systems.
Common mistake
Wrapping an existing REST API one-to-one and calling it an MCP server. Models select tools from names and descriptions, not from OpenAPI conventions; forty CRUD endpoints make a worse agent than six task-shaped tools.
See also
- Tool-Use LoopThe tool-use loop is the core agent pattern: the model receives a goal and tool definitions, chooses a tool call, the runtime executes it and returns the result into the context, and the model decides again — repeating until it produces a final answer or hits a stop condition.
- Prompt InjectionPrompt injection is an attack in which instructions embedded in content the model processes — a web page, a document, a ticket, a tool result — are followed as if they came from the operator or user.
- Context WindowThe context window is the maximum number of tokens a model can attend to in one request — system prompt, conversation history, retrieved documents, tool definitions, tool results and the response combined.