What it is
MCP, the Model Context Protocol, is an open-source standard for connecting AI applications to external systems. With it, apps such as Claude and ChatGPT can reach data sources (local files, databases), tools (search engines, calculators) and workflows (specialised prompts), so they can find what they need and take real actions.
The official analogy is a USB-C port for AI applications. USB-C gives devices one standard way to connect; MCP gives AI apps one standard way to connect to external systems. Before MCP, every AI app needed its own integration code for every new tool. With a shared protocol, a tool implements one MCP server and works with every app that supports MCP.
Anthropic introduced and open-sourced MCP in 2024, and support is now broad: AI assistants such as Claude and ChatGPT and developer tools such as Visual Studio Code and Cursor all act as MCP clients.
MCP covers only the protocol for exchanging context. It does not dictate how an AI application uses an LLM or how it manages the context it receives.
Key features
The MCP project includes:
- The MCP specification, which sets the requirements for clients and servers;
- Official SDKs in TypeScript, Python, C#, Go, Rust, Ruby, Java, Swift, PHP, Kotlin and more, grouped into tiers by completeness;
- Developer tools such as the MCP Inspector for debugging servers;
- Reference servers, an officially maintained set of example servers such as the filesystem server.
Examples of what MCP enables:
- Agents that access your Google Calendar and Notion and act as a more personal assistant;
- Claude Code generating a whole web app from a Figma design;
- Enterprise chatbots connecting to several databases across an organisation for chat-based analysis;
- AI creating 3D designs in Blender and sending them to a 3D printer.
How it works
Participants. MCP uses a client-server architecture with three roles:
- MCP host: the AI application, such as Claude Code, Claude Desktop or VS Code, which coordinates one or more MCP clients;
- MCP client: a component inside the host that holds a connection to one MCP server and fetches context for the host;
- MCP server: a program that provides context to clients.
The host creates one client for each server it connects to, a one-to-one pairing. Servers can run locally or remotely.
Two layers. MCP has a data layer and a transport layer:
- The data layer is built on JSON-RPC 2.0 and defines message structure and semantics, including capability and version discovery, the core primitives and notifications.
- The transport layer defines the channels. There are two: stdio, which uses standard input and output between processes on the same machine with no network overhead and suits local servers; and Streamable HTTP, which uses HTTP POST from client to server with optional Server-Sent Events for streaming, supports standard HTTP auth such as bearer tokens, and suits remote servers.
Core primitives. Servers can expose three kinds:
- Tools: executable functions the AI can call, such as file operations, API calls or database queries;
- Resources: data that provides context, such as file contents or database records;
- Prompts: reusable interaction templates, such as system prompts or few-shot examples.
Each primitive has discovery (*/list) and retrieval (*/get) methods, and tools also have tools/call. A client typically lists tools with tools/list and then calls them as needed. When a server’s tools change, it can notify clients in real time.
Clients can expose primitives too, such as elicitation, which lets a server ask the user for more information or for confirmation. In the latest protocol version, every request carries the protocol version and client capabilities, so servers do not depend on state from earlier requests.
How to use it
As a user: add a server to an MCP-capable app. In Claude Desktop, for instance, declare the server’s launch command under mcpServers in claude_desktop_config.json and restart the app to use its tools. Claude Code, Cursor and others have their own MCP settings.
As a developer: write a server with an official SDK. In Python, install the package:
uv add "mcp[cli]"
Then declare a tool in a few lines:
from mcp.server import MCPServer
mcp = MCPServer("weather")
@mcp.tool()
async def get_alerts(state: str) -> str:
"""Get weather alerts for a US state."""
...
if __name__ == "__main__":
mcp.run(transport="stdio")
The SDK generates tool definitions from type hints and docstrings. Use the MCP Inspector to debug during development. SDK APIs evolve with protocol versions, so follow the latest examples in the official docs.
Project links
- Website and docs: https://modelcontextprotocol.io/
- Specification: https://modelcontextprotocol.io/specification/latest
- GitHub organisation: https://github.com/modelcontextprotocol
- Reference servers: https://github.com/modelcontextprotocol/servers
Use cases
- Coding agents: let Claude Code, Cursor and others read designs, tickets and alerts and take part in development.
- Enterprise knowledge: wrap internal databases, document systems and business APIs as MCP servers shared by many AI apps.
- Personal productivity: connect calendars, notes and email so an assistant can organise and act.
- Tool vendors: ship one MCP server and reach many AI clients.
FAQ
How is MCP different from function calling? Function calling is a model capability: how a model says “I want to call this function”. MCP is a protocol between applications and external systems: how tools are discovered, described and invoked. They work together. The app gets the tool list over MCP, and the model’s function calling decides when to use them.
Local or remote server? Use a local stdio server when you need access to files or programs on your machine. Use a remote Streamable HTTP server when it needs to be shared or the service lives in the cloud.
Is MCP safe? MCP servers perform real actions, so safety depends on the server’s implementation and the permissions you grant. The docs include security best practices; install servers only from trusted sources and be careful with sensitive operations.
Do I need Anthropic products to use it? No. MCP is an open protocol that any application can implement as a client or server, and products from many vendors already support it.