What Is the Model Context Protocol (MCP)? A Complete Introduction
Learn the fundamentals of MCP — what it is, why it matters, and how it enables AI agents to connect with external tools and data sources through a standardized protocol.
What Is the Model Context Protocol?
The Model Context Protocol (MCP) is an open standard that defines how AI models and agents communicate with external tools, data sources, and services. Think of it as USB for AI — a universal connector that lets any AI model talk to any compatible server.
Why MCP Matters
Before MCP, every AI integration was custom-built. Each tool, each database, each API required its own bespoke connector. MCP changes this by providing:
- ▸A standardized interface between AI models and external resources
- ▸Plug-and-play compatibility across different AI frameworks
- ▸Security boundaries that control what data an AI can access
- ▸Bi-directional communication allowing both queries and actions
Core Architecture
MCP follows a client-server architecture:
AI Model (Client) ←→ MCP Protocol ←→ MCP Server ←→ External ResourceMCP Hosts are applications like Claude Desktop, IDE extensions, or custom AI tools that want to access external data.
MCP Clients maintain 1:1 connections with MCP servers, handling the protocol communication.
MCP Servers are lightweight programs that expose specific capabilities through the standardized protocol.
The Three Primitives
MCP defines three core primitives:
- ▸Resources — Structured data the server exposes (like files, database records, API responses)
- ▸Tools — Functions the AI can call to perform actions (like writing files, querying databases)
- ▸Prompts — Reusable prompt templates the server provides
Getting Started
To start using MCP, you need:
- ▸An MCP-compatible host (like Claude Desktop)
- ▸One or more MCP servers
- ▸Configuration to connect them
The configuration is typically a JSON file:
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-name"]
}
}
}What's Next?
Explore our guides to set up specific MCP servers for databases, APIs, file systems, and more. Each guide walks you through installation, configuration, and real-world usage patterns.