MCP (Model Context Protocol)
An open standard that lets AI assistants securely connect to external data sources, APIs, and tools through a unified interface.
Model Context Protocol (MCP) is an open protocol released by Anthropic in late 2024 that standardizes how AI assistants connect to external data sources and tools. Before MCP, every tool integration required custom glue code. MCP defines a common interface so any MCP-compatible AI application (Claude Desktop, Cursor, Zed) can connect to any MCP server without bespoke adapters.
The architecture
MCP uses a client-server model with three core primitives:
- Resources: File-like data that the server exposes to the model (e.g. a database row, a file in your repo, a calendar event).
- Tools: Functions the model can invoke (e.g. run a SQL query, create a GitHub issue, send a Slack message).
- Prompts: Reusable prompt templates the server provides.
Communication happens over local stdio or HTTP with Server-Sent Events. The client (AI app) controls what the server can access; the user approves tool calls before execution.
Why it matters for developers
MCP lets you give an AI assistant persistent, secure access to your dev environment: your filesystem, databases, APIs, browser, and internal tools - all through a single standardized interface. Instead of copy-pasting context into a chat window, the AI can read your actual codebase, check your CI status, and open a PR directly.
Building an MCP server
Anthropic provides SDKs in Python and TypeScript. A minimal server exposes tools as functions:
from mcp.server import Server
from mcp.types import Tool
server = Server("my-server")
@server.tool()
async def query_db(sql: str) -> str:
return run_query(sql)Popular pre-built MCP servers cover GitHub, PostgreSQL, Puppeteer, filesystem access, Slack, and dozens more.