MCP Protocol Overview
MCP (Model Context Protocol) is an open protocol from Anthropic that connects AI models to external data sources, tools, and services. Through a unified interface, models can discover, read, and invoke capabilities without custom adapters for each data source.
Protocol Layer
MCP defines a JSON-RPC 2.0 style message format:
- Initialization: Client and Server exchange capability lists (supported Resources, Tools, Prompts)
- Request–response: Standard formats for List, Read, Call, etc.
- Notifications: Server can push resource change events
Transport Layer
- stdio: Communicate via stdin/stdout with a subprocess; suitable for local MCP servers (e.g., file system, database)
- SSE over HTTP: Server exposes an HTTP endpoint; clients receive messages via Server-Sent Events; suitable for remote deployment
- WebSocket: Bidirectional; suitable for real-time push
Resources
Resources are context the model can read:
- URI scheme: e.g.,
file:///path/to/doc,db://schema/table - List: List available resources
- Read: Read content by URI; supports text, Base64, etc.
- Subscribe: Some implementations support resource change notifications
Tools
Tools are operations the model can invoke:
- List: List tool names, descriptions, parameter schemas
- Call: Execute with parameters and return results
- Permissions: Server can enforce access control; client declares required capabilities
Prompts
Prompts are reusable prompt templates provided by the server:
- List: List prompt names and descriptions
- Get: Get prompt content and parameters
- Client can fill variables and send the prompt as a system or user message to the model
Architecture Benefits
- Standardization: Implement once, reuse across clients (Claude Desktop, Cursor, custom apps)
- Security: Server controls exposure; supports permissions and auditing
- Composability: Multiple MCP servers can connect; model selects as needed
Summary
Understanding MCP's protocol, transport, Resources, Tools, and Prompts is the foundation for building extensible AI applications. MCP decouples "model" from "context and tools," providing a unified integration path for Skills, plugins, and Agents.