Model Context Protocol (MCP)
Introduction
The Model Context Protocol (MCP) is an open standard that enables AI models to securely interact with local and remote resources. It standardizes how agents discover, read, and manipulate data.
Core Concepts
1. Context
Context is the information an LLM needs to solve a task. MCP provides a structured way to fetch this context (files, database rows, API responses) dynamically.
2. Resources
Resources are read-only data sources identified by a URI (e.g., file:///logs/error.txt, postgres://users/123).
3. Tools
Tools are executable functions that agents can call (e.g., git_commit, send_email). MCP defines a standard JSON-RPC schema for tool definitions and execution.
4. Prompts
Prompts are reusable templates that can be shared between agents and tools.
Architecture
- MCP Server: Exposes resources and tools.
- MCP Client: The agent or IDE (e.g., Claude Desktop, Cursor) that connects to the server.
Why it matters
Before MCP, every agent needed custom integrations for every tool. With MCP, you write a server once, and any MCP-compliant agent can use it immediately.