What is the Model Context Protocol?
The Model Context Protocol (MCP) is an open specification, introduced by Anthropic, for connecting AI agents and LLM applications to the outside world — tools they can call, data they can read, and context they can use. It answers a narrow but common question: how should an agent talk to a tool?
Rather than writing a bespoke adapter for every integration, a developer runs (or connects to) an MCP server that exposes capabilities in a standard shape. Any MCP client — an IDE, a chat app, an agent runtime — can then use those capabilities without custom code.
The client–server model
MCP uses a client–server architecture communicating over JSON-RPC 2.0. The host application spins up MCP clients, each of which connects to an MCP server.
- Host — the AI application (e.g. an IDE assistant or chat client) the user interacts with.
- Client — a connector inside the host that maintains a session with one server.
- Server — a program exposing tools, resources and prompts for a specific system (a database, a file store, an API).
The three primitives: tools, resources, prompts
An MCP server offers up to three kinds of capability. Keeping them distinct is what makes the protocol predictable.
- Tools — actions the model can invoke (e.g.
query_database,create_ticket). These map naturally onto model function calling. - Resources — read-only data the client can load into context (files, records, documents).
- Prompts — reusable, parameterised prompt templates a server can offer to guide common tasks.
When to use MCP
Reach for MCP when the core need is connecting an agent to tools, data or context — especially if you want that connection to be reusable across clients or shareable with others.
- Giving an agent access to internal systems (databases, ticketing, file stores) through a consistent interface.
- Building a tool once and letting many different AI apps use it.
- Standardising tool access across a team so integrations aren't rewritten per project.
MCP compared to A2A and Agent Protocol
MCP sits at the tool/context layer. A2A sits at the agent-to-agent layer. The Agent Protocol REST spec sits at the client-to-agent layer. They compose. See the full comparison for details.