MCP (Model Context Protocol)
MCP (Model Context Protocol) is an open protocol released by Anthropic at the end of 2024, standardizing how LLM applications connect to external tools and data sources. Think "USB-C for the Agent era".
Why MCP was needed
Before MCP, every LLM app had to write custom adapters for every data source (database, GitHub, Slack, local files). Anthropic estimated N × M integrations in the ecosystem (every LLM × every tool), everyone reinventing the wheel.
MCP collapses this matrix: each data source implements one MCP server, each LLM client implements one MCP client, and they compose.
Architecture
┌────────────────┐ MCP protocol ┌──────────────────┐
│ MCP Client │ ◄──────────────────► │ MCP Server │
│ (Claude/Cursor)│ JSON-RPC over │ (GitHub/DB/...) │
│ │ stdio / HTTP+SSE │ │
└────────────────┘ └──────────────────┘
- MCP Server: exposes
tools/resources/promptsprimitives. - MCP Client: discovers servers, invokes tools, subscribes to resource updates.
Three core primitives
- Tools: model-callable functions (like function calling).
- Resources: readable data (files, database records).
- Prompts: pre-set prompt templates (with parameters).
Ecosystem
- Official servers: Filesystem, GitHub, Postgres, Slack, Google Drive, etc.
- Client support: Claude Desktop, Cursor, Cline, Continue, Zed, etc.
- Chinese community: Alibaba, ByteDance, Baidu have launched MCP servers.
Relationship to function calling
MCP doesn't replace function calling — it's a standardization layer on top. LLMs still use function calling internally to decide which tool to invoke; tool discovery and registration goes through MCP.