In one sentence
What is MCP?
The Model Context Protocol (MCP) is an open standard for connecting AI applications to the tools and data they need. A server written once (for your calendar, your database, GitHub) works with any AI app that speaks MCP, and an app that speaks MCP can use any server. The official site's analogy: think of MCP like a USB-C port for AI applications.
The problem it solves is counting. Without a shared protocol, every AI app needs its own custom integration with every tool. With one, each app and each tool only has to implement MCP once.
Without a shared protocol
With MCP
Who's who
Three roles: host, client, server
The host is the AI application you use: a chat app, a code editor, an agent. It runs the model and decides what to do. A client lives inside the host and holds the connection to one server: the host creates one client for each server it connects to. A server is a program that offers capabilities over MCP. It can run on your machine or on the internet.
The building blocks
What a server offers
A server can offer three kinds of thing. The useful way to tell them apart is who decides when they're used.
Tools
Model-controlledFunctions the model can call to do something or look something up: search flights, query a database, create a ticket.
get_weather(location)
tools/list · tools/call
Resources
Application-drivenData the host can read and add to the model's context, each with a URI: a file, a database schema, a document.
file:///project/README.md
resources/list · resources/read
Prompts
User-controlledReady-made templates a person picks, often as a slash command, that fill in a message for the model.
/summarize-pull-request
prompts/list · prompts/get
It also works the other way. With elicitation, a server can ask the person a question through the host, for example to confirm an option or fill in a missing detail. For anything sensitive, such as a password, it sends the person to a URL instead, so the secret never passes through the AI app. Servers can also tell the client when their list of tools, resources or prompts changes.
Message by message
One tool call, start to finish
You ask an AI app about the weather, and it has a weather server connected. Step through to see every message. Solid teal arrows are MCP messages (between client and server); dashed grey ones happen inside the host or with you.
Press Step to begin
Six short steps: discover, list, decide, approve, call, answer.
Under the hood
How messages travel
Every MCP message is JSON-RPC 2.0: a request has a method and an id, a response carries the same id back, and a notification is a one-way message that expects no reply. The spec defines two standard ways to carry them:
stdio, for local servers
The host starts the server as a program on your machine and exchanges messages through its standard input and output, one per line. No network involved; credentials usually come from the environment.
Streamable HTTP, for remote servers
Each message is an HTTP POST to one endpoint; the reply comes back as JSON or as a stream. Remote servers that need sign-in use OAuth 2.1, so the person authorises access instead of pasting an API key into the app.
In the current version (2026-07-28) the protocol is stateless: there is no handshake and no session. Every request carries its protocol version, client details and capabilities in _meta, and a client can call server/discover to learn what a server supports. Earlier versions (up to 2025-11-25) opened each connection with an initialize handshake, and plenty of servers still speak them.
Trust and safety
Key principles
MCP lets an AI app read real data and take real actions, so the spec is direct about safety. These are its three principles, in its own words.
User consent and control
- Users must explicitly consent to and understand all data access and operations.
- Users must retain control over what data is shared and what actions are taken.
- Implementors should provide clear UIs for reviewing and authorizing activities.
Data privacy
- Hosts must obtain explicit user consent before exposing user data to servers.
- Hosts must not transmit resource data elsewhere without user consent.
- User data should be protected with appropriate access controls.
Tool safety
- Tools represent arbitrary code execution and must be treated with appropriate caution.
- Descriptions of tool behavior, such as annotations, should be considered untrusted unless obtained from a trusted server.
- Hosts must obtain explicit user consent before invoking any tool, and users should understand what each tool does first.
What that means in practice
- Only connect servers you trust: a server's tool descriptions go straight into the model's context, and a malicious one can try to steer it.
- Read what a tool will do before you allow it, especially tools that send, delete, buy or publish.
- Give servers the narrowest access that works: a read-only token, one folder, one repository.
Where it fits
MCP vs …
Tool calling
Tool (function) calling is how a model asks for a tool inside one app. MCP doesn't replace it: it standardises where the tools come from and how they're called, so the same tools work in every app. Open AI Agents & Tool Calling →
RAG
RAG is a technique: retrieve passages, then answer with them. MCP is plumbing: a retrieval system can be exposed as an MCP tool or as resources, and any MCP app can then use it. Open RAG →
A plain API
An MCP server often wraps an existing API. What it adds is a standard, self-describing interface: the app can discover the tools, their arguments and their descriptions at run time.
Facts on this page follow the MCP specification, revision 2026-07-28, checked on 2026-11-27. MCP changes quickly; see modelcontextprotocol.io for the latest.