MCP: The USB-C for AI Agents
MCP (Model Context Protocol) is Anthropicโs open standard for connecting AI agents to external tools. Released Nov 2024, hit 1M+ MCP servers by mid-2026.
What is MCP?
Think USB-C for AI:
- One protocol, many tools
- Host (Claude Code, Cursor) speaks MCP
- Servers (Postgres, GitHub, Filesystem) speak MCP
- No custom integration code per host
The architecture
โโโโโโโโโโโโโโ MCP โโโโโโโโโโโโโโโโ
โ Host โโโโโโโโโโโโบโ MCP Server โ
โ (Claude) โ JSON-RPC โ (your tool) โ
โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
Your first MCP server (Python)
pip install mcp
# weather_server.py
from mcp.server import Server
from mcp.types import Tool
app = Server("weather")
@app.tool()
def get_weather(city: str) -> str:
"""Get current weather for a city."""
return f"Sunny, 72ยฐF in {city}"
app.run()
Connect from Claude Code
Add to ~/.config/claude-code/mcp.json:
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["weather_server.py"]
}
}
}
Now in Claude Code: โWhatโs the weather in Beijing?โ โ Claude uses your MCP tool automatically.
Real-world examples
- postgres-mcp: Query your DB from Claude
- github-mcp: Create PRs, read issues from Claude
- playwright-mcp: Browser automation
- github.com/addyosmani/agent-skills: 5 patterns for MCP servers
Key takeaways
- MCP is the standard, not a framework
- One server works across Claude Code, Cursor, Continue.dev
- Tools are auto-discovered by the host