What Is MCP and Why You Need It
Introduction to Model Context Protocol — the open standard for connecting AI to external tools and data.
The Problem: AI Lives in Isolation
Large language models are powerful, but by default they’re sealed boxes. They can’t:
- Read your files
- Make API requests
- Interact with databases
- Send messages or emails
- Access your calendar or project management tools
Every time you want AI to interact with the real world, you write custom integration code. Different code for each tool, each AI provider, each use case. It’s a mess.
The Solution: Model Context Protocol (MCP)
MCP is an open standard created by Anthropic that defines how AI applications communicate with external services. Think of it as USB for AI — one standard for connecting any tool to any AI model.
Before USB, every device had its own proprietary connector. Before MCP, every AI integration was custom-built. MCP standardizes the interface.
Why it matters:
- Write one MCP server → it works with Claude, VS Code, Cursor, and any MCP-compatible client
- Use community servers → connect to GitHub, Slack, databases without writing a line of code
- Open standard → no vendor lock-in
MCP Architecture
┌─────────────────┐ ┌──────────────┐ ┌──────────────────┐
│ MCP Host │────>│ MCP Client │────>│ MCP Server │
│ (Claude Desktop,│ │ (protocol │ │ (filesystem, │
│ Cursor, IDE) │ │ handler) │ │ GitHub, DB) │
└─────────────────┘ └──────────────┘ └──────────────────┘
- Host: The AI application (Claude Desktop, Cursor, Claude Code)
- Client: Manages the connection between host and server
- Server: Provides tools, resources, and prompts to the AI
One host can connect to many servers simultaneously. Claude Desktop talking to GitHub, your database, and your filesystem — all at once.
Three Types of MCP Server Capabilities
1. Tools — Functions AI Can Call
Tools are actions the AI can execute. The AI decides when to call them based on the user’s request.
| Tool | What It Does |
|---|---|
search_files | Find files by name or content |
create_issue | Create a GitHub issue |
run_query | Execute SQL on your database |
send_message | Send a Slack message |
2. Resources — Data AI Can Read
Resources provide context. The AI reads them to understand your environment.
| Resource | What It Provides |
|---|---|
file://project/README.md | File contents |
db://users/schema | Database schema |
api://docs/endpoints | API documentation |
3. Prompts — Ready-Made Templates
Prompts are reusable prompt templates that servers can expose.
| Prompt | What It Does |
|---|---|
review-pr | Code review template for a pull request |
write-tests | Test generation template for a function |
explain-code | Code explanation template |
Popular MCP Servers
The MCP ecosystem has grown fast. Here are the most useful servers:
| Server | What It Does | Best For |
|---|---|---|
| Filesystem | Read/write local files | Developers working with code and data |
| GitHub | Repos, PRs, issues, code search | Development teams |
| PostgreSQL | SQL queries, schema inspection | Data analysis, backend work |
| Slack | Send/read messages, channels | Team communication automation |
| Google Drive | Read/search Google Docs, Sheets | Content and document workflows |
| Puppeteer | Browser automation, screenshots | Web scraping, testing |
| Brave Search | Web search | Research, fact-checking |
| Memory | Persistent knowledge graph | Long-term AI memory |
| Sentry | Error tracking, issue analysis | Debugging production issues |
| Linear | Project management, issues | Product team workflows |
Full list: MCP Server Registry on GitHub
Getting Started: Your First MCP Server
Let’s connect the Filesystem server to Claude Desktop in 5 minutes.
Step 1: Open Claude Desktop Config
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Create the file if it doesn’t exist.
Step 2: Add the Server
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/yourname/projects"
]
}
}
}
Replace /Users/yourname/projects with the folder you want Claude to access.
Step 3: Restart Claude Desktop
Close and reopen the app. You’ll see a hammer icon — that means MCP tools are loaded.
Step 4: Test It
Type in chat:
Show me the files in my projects folder
Claude reads the filesystem through MCP and responds with actual file listings. No custom code needed.
Adding More Servers
You can run multiple servers. Here’s a config with GitHub and PostgreSQL:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/yourname/projects"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token"
}
},
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://user:pass@localhost:5432/mydb"
]
}
}
}
Now Claude can read your files, manage GitHub issues, AND query your database — all in one conversation.
MCP vs Custom Tool Integrations
| Aspect | MCP | Custom Integration |
|---|---|---|
| Setup time | Minutes (use existing servers) | Hours/days |
| Reusability | Works across all MCP clients | One app only |
| Maintenance | Community-maintained | You maintain |
| Standard | Open protocol | Your own API |
| Ecosystem | 1000+ servers | Build everything yourself |
MCP wins when you need to quickly connect AI to existing tools. Custom integrations win when you need fine-grained control or the tool doesn’t have an MCP server yet.
Security Best Practices
MCP servers have access to your data. Take security seriously:
-
Principle of least access — only grant access to folders and databases you need. Don’t mount your entire home directory.
-
Read-only where possible — if the AI only needs to read data, use read-only database credentials and filesystem permissions.
-
Environment variables for secrets — never hardcode tokens in the config file. Use the
envfield or system environment variables. -
Review before executing — Claude always asks for confirmation before executing actions. Don’t auto-approve everything.
-
Separate dev and prod — never connect MCP servers to production databases or APIs from your development environment.
How MCP Compares to Other Standards
| MCP | OpenAI Plugins | LangChain Tools | |
|---|---|---|---|
| Creator | Anthropic (open standard) | OpenAI (proprietary) | LangChain (open source) |
| Scope | Universal AI-to-tool protocol | ChatGPT only | Python framework only |
| Adoption | Claude, Cursor, VS Code, etc. | ChatGPT | LangChain apps |
| Server count | 1000+ | Deprecated | Varies |
| Transport | stdio, HTTP/SSE | HTTP | In-process |
MCP is the most widely adopted standard. OpenAI’s plugin system was deprecated in favor of GPTs and function calling. LangChain tools are framework-specific.
Next Steps
- Connect your first MCP server: MCP Practical Guide (step-by-step blog post)
- Learn Claude’s tool use system: Claude Tool Use
- Build a complete agent: Build Your First Agent