Model Context Protocol
In short
The Model Context Protocol is an open standard that defines how AI applications connect to external tools, data sources, and prompts through a shared interface.
What is the Model Context Protocol (MCP)?
The Model Context Protocol, or MCP, is an open standard for connecting AI applications to the outside world. It was first released in late 2024 and is now developed as an open, vendor-neutral project supported by many AI tools. Instead of every chat app, coding assistant, and agent writing its own custom integration for every service, a service can publish one MCP server that any MCP-compatible application can use.
MCP uses a client-server design. The host application, such as an IDE or a chat app, runs an MCP client for each server it connects to, and each server exposes capabilities of three main kinds: tools, which are functions the model can call; resources, which are data such as files or database records; and prompts, which are reusable templates. Messages are encoded as JSON-RPC 2.0 and travel over standard input and output for servers running locally or over HTTP for remote servers, with OAuth commonly used to authorize access.
A popular analogy is a universal port for AI: just as one standard plug lets many devices work with many chargers, MCP lets many AI applications work with many tools without a custom adapter for every pair. Common MCP servers give access to file systems, databases, issue trackers, documentation, browsers, and internal company APIs. The idea is similar to the Language Server Protocol, which lets any code editor support any programming language through one shared protocol.
MCP is often confused with tool calling. Tool calling is the model's ability to request a function call, while MCP standardizes how applications discover, describe, and connect to tools living in separate programs; under the hood, the model still uses tool calling to invoke MCP tools. MCP is also not a replacement for REST APIs, since many MCP servers are thin wrappers around existing APIs, and because a server can run code and return text that the model will read, only trusted servers should be installed and their permissions kept narrow.
Key takeaways
- MCP is an open standard for connecting AI applications to tools and data.
- Servers expose tools, resources, and prompts; host applications connect through clients.
- Messages use JSON-RPC 2.0 over local standard input and output or remote HTTP.
- One MCP server can work with many AI applications, avoiding custom integrations.
- Install only trusted servers, since their output reaches the model and they can take actions.
Example
{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "search_issues",
"arguments": { "query": "login bug", "state": "open" }
}
}Readers ask
What is an MCP server?
An MCP server is a program that offers tools, data, or prompts to AI applications using the Model Context Protocol. It can run locally on your computer, for example to read project files, or remotely as a hosted service that wraps an existing API.
What is the difference between MCP and an API?
An API is a general interface that any program can call, while MCP is a standard layer designed for AI applications, with machine-readable descriptions of tools that a model can understand and choose from. Many MCP servers simply wrap an existing API.
Is MCP secure?
MCP defines how to connect and authorize, but safety depends on what you connect. A server can run code with your permissions and return text that may contain prompt injection, so use trusted servers, grant minimal access, and review risky actions.
See also
- Tool CallingAI & Machine Learning, p. 47Tool calling is an LLM feature in which the model asks the application to run a specific function with structured arguments, then uses the result in its answer.
- AI AgentAI & Machine Learning, p. 2An AI agent is a system that uses an LLM to plan and carry out multi-step tasks by deciding which tools to call, observing the results, and acting again.
- LLMAI & Machine Learning, p. 25An LLM is a machine learning model trained on huge amounts of text that generates language by repeatedly predicting the next most likely piece of text.
- RPCBackend & APIs, p. 39RPC is a communication style in which a program calls a function that runs on another machine as if it were a local function, hiding the network in between.
- APIBackend & APIs, p. 2An API is a set of rules that lets one piece of software request data or actions from another in a predictable, documented way.
- JSONBackend & APIs, p. 25JSON is a lightweight, text-based format for storing and exchanging structured data as key-value pairs and lists, readable by both humans and machines.
Spotted a mistake or something missing on this page?Suggest an edit