Every AI coding tool has the same problem: it can read your code, but it can’t access your database. It can’t check your Jira tickets. It can’t read your Slack messages. It can’t query your production logs.
Until now.
MCP (Model Context Protocol) is a new standard that lets AI tools connect to anything — databases, APIs, file systems, project management tools, and more. It is like a USB-C port for AI. One standard connection that works with everything.
And you need to understand it because it is changing how AI coding agents work.
What is MCP?
MCP is an open protocol created by Anthropic in late 2024. It defines a standard way for AI models to connect to external tools and data sources.
Before MCP:
AI model ←→ Custom integration for each tool
AI model ←→ Different custom integration for another tool
AI model ←→ Yet another custom integration
After MCP:
AI model ←→ MCP ←→ Any tool (one standard for all)
Think of it like this:
- Before USB, every device had a different charger
- USB gave us one standard port that works with everything
- MCP does the same thing for AI connections
Google, OpenAI, and other major AI companies have adopted MCP. It is becoming the industry standard.
How MCP Works
MCP has three parts:
1. Host (The AI App)
The host is the AI application you use — Claude Desktop, Claude Code, Cursor, or any app that uses an LLM. This is where you interact with the AI.
2. Client (The Connector)
The client lives inside the host. It connects to MCP servers and translates between the AI model and the external tools. You don’t build this — it comes built into the host app.
3. Server (The Tool Provider)
The server is the external tool. It could be a database, a GitHub API, a file system, or anything else. Each MCP server exposes specific capabilities that the AI can use.
You (ask a question)
↓
Host (Claude Code)
↓
Client (connects to servers)
↓
Server (GitHub) ←→ Server (Database) ←→ Server (Slack)
When you ask Claude Code “What are the open issues in our GitHub repo?”, here is what happens:
- Claude Code (host) receives your question
- The MCP client checks which servers are connected
- It finds the GitHub MCP server and calls the “list issues” tool
- The GitHub server fetches the issues from the GitHub API
- The result comes back through the client to Claude
- Claude reads the issues and answers your question
All of this happens automatically. You just ask in plain English.
MCP Core Primitives: Tools, Resources, and Prompts
Every MCP server can offer three types of capabilities:
Tools
Actions the AI can perform. These DO something:
- Create a GitHub issue
- Run a database query
- Send a Slack message
- Deploy to production
Resources
Data the AI can read. These provide information:
- Read a file from Google Drive
- Fetch records from a database
- Get the current weather
- Read a Confluence page
Prompts
Pre-built templates for common tasks:
- “Summarize the latest pull requests”
- “Generate a weekly status report”
- “Review this code for security issues”
Available MCP Servers
There are already hundreds of MCP servers you can use. Here are the most useful ones for developers:
Official Servers (by Anthropic)
| Server | What It Does |
|---|---|
| Filesystem | Read and write files on your computer |
| GitHub | Issues, PRs, repos, code search |
| GitLab | Same as GitHub but for GitLab |
| PostgreSQL | Query your PostgreSQL database |
| SQLite | Query local SQLite databases |
| Slack | Read and send messages |
| Google Drive | Read documents and files |
| Brave Search | Search the web |
Community Servers
| Server | What It Does |
|---|---|
| Docker | Manage containers |
| Kubernetes | Manage clusters |
| MongoDB | Query MongoDB databases |
| Redis | Read/write Redis cache |
| Jira | Read and create tickets |
| Notion | Read and write Notion pages |
| Linear | Issue tracking |
| Sentry | Read error reports |
| Vercel | Manage deployments |
The full list is growing every day. Check github.com/modelcontextprotocol/servers for the latest.
Setting Up MCP with Claude Code
Step 1: Find the Server You Need
Go to the MCP servers repository and find the server for your tool (GitHub, database, etc.).
Step 2: Add It to Your Config
Claude Code reads MCP configuration from .mcp.json in your project root or ~/.claude/mcp.json globally:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "your-github-token"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory"]
}
}
}
Step 3: Use It
Start Claude Code. The MCP servers connect automatically. Now you can ask:
"Show me the open issues in our GitHub repo"
"What were the last 5 commits?"
"Query the users table and show me active users"
"Send a message to #engineering on Slack"
Claude uses the MCP servers to fulfill these requests. No custom code needed.
Real-World Examples
Example 1: Database-Aware Coding
With a PostgreSQL MCP server connected:
You: "Add a new API endpoint that returns the top 10 most active users"
Claude Code:
1. Queries the database schema via MCP to understand the tables
2. Sees the users table has a last_active_at column
3. Writes the API endpoint with the correct SQL query
4. The query actually matches your real database schema
Without MCP, Claude would guess your database schema. With MCP, it knows exactly what columns exist.
Example 2: GitHub-Integrated Development
With the GitHub MCP server:
You: "Fix issue #42"
Claude Code:
1. Reads issue #42 from GitHub via MCP
2. Understands the bug description and reproduction steps
3. Finds the relevant code files
4. Writes the fix
5. Creates a branch and opens a PR
6. Links the PR to issue #42
The AI reads the real issue, not a copy-pasted description. It has full context.
Example 3: Log-Based Debugging
With a Sentry MCP server:
You: "We're getting errors in the payment flow. Find and fix the issue."
Claude Code:
1. Queries Sentry for recent payment errors via MCP
2. Reads the stack traces and error messages
3. Finds the buggy code
4. Writes the fix
5. Adds error handling for the edge case
MCP vs Direct API Calls
Why not just call APIs directly?
| Direct API Call | MCP | |
|---|---|---|
| Setup | Write custom code for each API | Configure once in JSON |
| Standardized | No — every API is different | Yes — one protocol for all |
| AI-friendly | AI must learn each API | AI uses one standard interface |
| Maintenance | Update code when APIs change | Update the server (community maintained) |
| Security | You handle auth in code | Tokens in config, sandboxed access |
MCP is not about doing something new — it is about doing it in a standard way that any AI tool can use.
A2A: Agent-to-Agent Protocol
MCP connects AI to tools. But what about connecting AI to other AI?
That is what A2A (Agent-to-Agent) protocol does. It is the next step:
MCP: AI ←→ Tools (databases, APIs, services)
A2A: AI ←→ AI (agents talking to each other)
With A2A, you could have:
- A planning agent that talks to a coding agent
- A testing agent that reports results to a review agent
- Multiple specialized agents collaborating on one project
A2A is still early, but it builds on top of MCP. If you understand MCP, you will understand A2A when it arrives.
Security Considerations
MCP servers have access to your real data. Be careful:
- Use tokens with minimal permissions — give the GitHub MCP server read-only access unless it needs to create PRs
- Limit file system access — specify exactly which directories the filesystem server can access
- Review what the AI does — Claude Code shows you every MCP tool call before executing it
- Don’t expose production databases — connect to staging/dev databases, not production
- Keep tokens out of code — use environment variables or secure config files
How to Get Started
If You Use Claude Code
- Pick one MCP server that solves a real problem for you (GitHub is the easiest start)
- Add it to
.mcp.json - Run
claudeand try it
If You Use Cursor
Cursor is adding MCP support. Check their docs for the latest configuration.
If You Build Your Own Tools
You can create your own MCP server for internal tools:
- Company knowledge base
- Internal APIs
- Custom databases
- Deployment pipelines
The MCP SDK is available in Python and TypeScript.
Quick Summary
| Concept | What It Means |
|---|---|
| MCP | Standard protocol for connecting AI to external tools |
| Host | The AI app (Claude Code, Cursor) |
| Client | The connector inside the host |
| Server | The external tool (GitHub, database, Slack) |
| Tools | Actions the AI can perform |
| Resources | Data the AI can read |
| A2A | Future protocol for AI-to-AI communication |
MCP is the missing piece that turns AI coding agents from “smart autocomplete” into “software engineering partners.” Learn it now — it is becoming standard.
Related Articles
- What Are AI Coding Agents? — how agents use MCP to connect to tools
- CLAUDE.md and AGENTS.md Guide — context files that work alongside MCP
- How to Set Up Claude Code — the tool that uses MCP natively
- Build Your First AI Coding Agent — add MCP to your custom agent