What is MCP?
Model Context Protocol (MCP) is a standard way for AI assistants to connect with external tools and data sources. Instead of the AI being stuck with just what it knows, MCP lets it talk to databases, APIs, file systems, and other services. Think of it as USB for AI - a common plug that works with many different things.
Created by: Anthropic (the company behind Claude) released MCP in late 2024 as an open standard anyone can use.
The Problem: AI in a Bubble
Without MCP
AI assistants are isolated:
You want AI to check your database
↓
Build custom integration from scratch
↓
Each tool needs different code
↓
Lots of work, hard to maintain
Problem: Every integration is custom. Same work repeated for each AI tool.
With MCP
One standard protocol for everything:
You want AI to check your database
↓
Use existing MCP server for databases
↓
AI connects using MCP protocol
↓
Works with any MCP-compatible AI!
Result: Build once, works with many AI tools. Community shares integrations.
How MCP Works
graph TB
AI[AI Assistant - Claude, etc.] <--> MC[MCP Client]
MC <--> MS1[MCP Server - Files]
MC <--> MS2[MCP Server - Database]
MC <--> MS3[MCP Server - GitHub]
MC <--> MS4[MCP Server - Slack]
MS1 <--> F[Local Files]
MS2 <--> DB[(Database)]
MS3 <--> GH[GitHub API]
MS4 <--> SL[Slack API]
style AI fill:#e0f2fe,stroke:#0369a1,stroke-width:2px
style MC fill:#fef3c7,stroke:#f59e0b,stroke-width:2px
style MS1 fill:#dcfce7,stroke:#16a34a,stroke-width:2px
style MS2 fill:#dcfce7,stroke:#16a34a,stroke-width:2px
style MS3 fill:#dcfce7,stroke:#16a34a,stroke-width:2px
style MS4 fill:#dcfce7,stroke:#16a34a,stroke-width:2px
The AI talks to an MCP client, which connects to multiple MCP servers. Each server handles a specific tool or data source.
Key Concepts
- MCP Server: A small program that exposes tools and data. One server per integration (files, database, API, etc.)
- MCP Client: Lives inside the AI app (like Claude Desktop). Connects to servers and translates requests.
- Tools: Actions the AI can take - like "read file", "run query", or "send message". Servers expose these.
- Resources: Data the AI can read - files, database records, API responses. Servers provide access to these.
MCP Communication Flow
sequenceDiagram
participant User
participant AI as AI Assistant
participant Client as MCP Client
participant Server as MCP Server
participant Tool as External Tool
User->>AI: "What files are in my project?"
AI->>Client: List files request
Client->>Server: tools/call: list_files
Server->>Tool: Read directory
Tool-->>Server: File list
Server-->>Client: Results
Client-->>AI: File list data
AI-->>User: "Here are your files..."
What Can You Do With MCP?
Access Local Files
Let the AI read, search, and work with files on your computer. Great for coding assistants that need to understand your project.
Query Databases
Connect to PostgreSQL, MySQL, SQLite and run queries. AI can answer questions about your data directly.
Use Developer Tools
GitHub, GitLab, Jira - AI can read issues, create PRs, check build status. Fits into your existing workflow.
Connect to APIs
Weather, stocks, internal company APIs - wrap any API in an MCP server and AI can use it.
Popular MCP Servers
- Filesystem: Read and search files in allowed directories. Built by Anthropic.
- GitHub: Manage repos, issues, PRs. Search code across your projects.
- PostgreSQL/SQLite: Run read-only queries against your databases.
- Slack: Read messages, search channels, post updates.
- Brave Search: Web search for AI to find current information.
More servers available at github.com/modelcontextprotocol/servers