Table of Contents
Claude Code can use GitHub, query Postgres, search Slack channels — these aren’t Claude’s innate capabilities. They’re plugged in through MCP (Model Context Protocol).
MCP is an open protocol Anthropic released in November 2024. Its design goal is singular: let AI agents connect to any external tool without writing custom integration code for each one.
TL;DR
MCP (Model Context Protocol) is an open standard defining how AI agents and external tools communicate. Like USB unified the connection standard for peripherals, MCP unifies the protocol for “AI calling tools.” Claude Code natively supports MCP and can connect to GitHub, Postgres, Slack, Google Drive, and hundreds of other existing MCP servers — or you can implement your own with the official SDK. As of 2025, MCP has been adopted by Cursor, Windsurf, and 40+ AI editors, establishing itself as the industry de facto standard.
Design Philosophy
Before MCP, AI tool integration worked like this: write a function for each tool (OpenAI calls it function calling, Anthropic calls it tool use), define its parameter schema, then describe its purpose in the system prompt.
This approach has a fundamental problem: coupling. Your AI agent code directly knows “there’s a GitHub tool, there’s a Postgres tool” — tool definitions and agent logic are mixed together. Every time you add a new tool, you have to modify the agent’s core code.
MCP’s design approach is to externalize tool definitions: tools exist as independent MCP servers with standardized interfaces. The AI agent discovers which servers are available at startup, retrieves tool descriptions from the server, then calls them using the standard protocol. The agent doesn’t need to know about tools in advance — anything conforming to the MCP standard can be plugged in.
Core Concepts
MCP’s Three-Layer Architecture
MCP Host (Claude Code)
↕ MCP Protocol
MCP Client (built into Claude Code)
↕ Transport (stdio / SSE / HTTP Streamable)
MCP Server (GitHub, Postgres, Slack, custom tools...)
MCP Host: The application using Claude (Claude Code, Cursor, etc.)
MCP Client: The MCP protocol implementation built into the Host, responsible for connecting and managing multiple servers
MCP Server: An independent process encapsulating specific capabilities — can be a local process (stdio transport) or a remote service (HTTP/SSE transport)
What MCP Servers Can Expose
MCP servers can expose three types of resources:
- Tools: Functions the AI can call (read a GitHub PR, execute a SQL query)
- Resources: Static or dynamic data (currently open files, database schema)
- Prompts: Preset prompt templates
Transport Modes
| Mode | Use Case |
|---|---|
| stdio | Local tools (most common, directly forks subprocess) |
| SSE (Server-Sent Events) | Remote server, unidirectional streaming |
| HTTP Streamable | Remote server, bidirectional, added in 2025 |
Claude Code’s MCP Implementation
Configuration
In ~/.claude/settings.json or the project’s .claude/settings.json:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres",
"postgresql://localhost/mydb"]
}
}
}
Tool Search: Solving MCP’s Context Problem
Every MCP server carries its tool definitions (schemas), and connecting multiple servers simultaneously means those definitions alone consume significant context window. Claude Code introduced Tool Search: at session startup, only tool names and server descriptions are loaded; detailed tool schemas are loaded lazily on demand. This reduces context consumption by approximately 46.9%.
In practice: you can connect 20 MCP servers and the context window usage is only marginally more than connecting 5.
How It Differs from Alternatives
| Approach | Advantages | Disadvantages |
|---|---|---|
| MCP | Standardized, cross-platform, rich tool ecosystem | Requires MCP server to be running |
| Function Calling (direct definition) | Simple and direct, no extra server needed | Tool definitions coupled into agent code, hard to reuse across platforms |
| LangChain Tools | Complete Python ecosystem | Framework lock-in, not cross-language |
| Direct REST API calls | Maximum flexibility | AI must understand each API’s format, no standardization |
MCP’s core advantage is reusability: a GitHub MCP server can be shared by Claude Code, Cursor, Windsurf, and all MCP-compatible tools. Tool authors only need to maintain one implementation.
When to Use MCP (and When Not To)
Good fit for MCP:
- You need your AI agent to connect to multiple external systems
- You want the same toolset used across multiple AI applications
- You’re building complex agent workflows that combine multiple tools
Poor fit:
- One-off simple tool integrations (direct function calling is faster)
- Tools that don’t need to be shared between AI applications
- Latency-sensitive scenarios (MCP’s process startup has initial overhead)
Bottom Line
MCP is an important infrastructure standardization effort for AI agent tool integration, solving the “every AI tool has to re-implement the integration for every external service” repetition problem. Its rapid adoption in 2024-2025 (Cursor, Windsurf, 40+ editors) demonstrates industry alignment on this direction.
The most practical starting point for engineers: check whether your commonly used tools (GitHub, Slack, your database) have existing MCP servers (they usually do), try a few, feel how AI agents can integrate into your workflow, then decide whether you need to implement a custom server.
References
Tags
Related Articles
Goodbye, Reptile Warriors: Python's Role Shift in the Age of AI
Python is still the dominant language for AI development, but the rise of AI coding tools is blurring the line between 'writing Python code' and 'doing AI development' — this is what that shift actually means.
AlphaProof: DeepMind's Neurosymbolic AI That Solved Olympic Math Problems
DeepMind's AlphaProof combines a language model with AlphaZero-style reinforcement learning to produce fully machine-verifiable mathematical proofs — achieving silver-medal level at the 2024 International Mathematical Olympiad.
How AI Reshapes How You Think: The Cognitive Shift Beyond the Tool
AI tools change more than your speed — they change how you think. The shift from 'how to do it' to 'what to do' and 'is this right?' has real long-term implications for engineers.