The short version
The Model Context Protocol (MCP) is an open standard that Anthropic introduced on November 25, 2024 for connecting AI applications to the systems where data and tools live 1. Instead of building a one-off integration for every pairing of AI app and external system, a capability is exposed once as an MCP server, and any MCP-capable application can use it 1.
The specification says it takes inspiration from the Language Server Protocol, which standardized how editors talk to language tooling 2. MCP plays a similar role for AI applications: one protocol between many clients and many servers.
How it works
MCP defines three roles 2:
- Hosts — the AI application a person actually uses, such as a desktop assistant or an IDE.
- Clients — connectors inside the host; each one maintains a connection to a single server.
- Servers — services that provide context and capabilities.
Servers can offer three kinds of features 2:
| Feature | What it is | Typical example |
|---|---|---|
| Tools | Functions the model can execute | "search issues", "run a query" |
| Resources | Context and data for the user or the model | files, records, documents |
| Prompts | Templated messages and workflows | a reusable "review this pull request" prompt |
All messages between clients and servers use JSON-RPC 2.0 2. Discovering and invoking a tool is two requests: tools/list returns the available tools, and tools/call executes one 3.
{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": { "name": "search_issues", "arguments": { "query": "memory leak" } }
}Transports
The specification defines two standard transports 4:
- stdio — the client launches the MCP server as a subprocess and they exchange messages over standard input and output. This is the usual choice for local tools.
- Streamable HTTP — the server runs as an independent process that can handle multiple client connections, which suits remote and shared servers.
Messages are UTF-8 encoded JSON-RPC in both cases 4.
Where it fits
Tool calling (often called function calling) is how a model asks the application to run something. It does not say where that something lives or how it gets wired in, so every application ends up re-implementing the same integrations. MCP standardizes that side: the same server can plug into different hosts 12. Official SDKs and reference servers are published under the Model Context Protocol organization on GitHub 5.
A useful mental model:
- The model decides what to call.
- MCP defines how the application discovers and invokes the capability.
- The server decides what actually happens — and that is where your security boundary is.
Trade-offs
- Servers run with real privileges. A server that can read files or call APIs acts with whatever credentials you give it. Scope tokens narrowly and apply least privilege.
- Everything crossing the boundary is untrusted input. Tool descriptions, arguments and results can carry instructions aimed at the model. This is the indirect prompt injection problem described in Prompt Injection in RAG Pipelines.
- Keep a human in the loop for side effects. The specification's security principles center on user consent and control, and its tools section recommends that a human is always able to deny a tool invocation 23.
- Pin a spec revision. The specification is versioned by date — this guide references the 2025-06-18 revision 2 — so check which revision your SDK and hosts implement.
Getting started checklist
- Decide whether your capability is a tool (an action), a resource (data) or a prompt (a workflow).
- Start with stdio for local development; move to Streamable HTTP when several users or machines need the same server 4.
- Use an official SDK instead of hand-writing JSON-RPC plumbing 5.
- Treat every string that crosses the boundary — descriptions, arguments, results — as untrusted, and require confirmation before tools with side effects run.