Episode 6: MCP Protocol - Claude's 'Outsourced Team'
The Model Context Protocol (MCP) is the heart of Claude Code's extensibility. Through MCP, you can connect Claude to almost any external service—from database queries to real-time weather, to advanced image processing.
What is MCP?
Think of it like this:
- Built-in Tools = Internal employees, available immediately for basic tasks.
- MCP Servers = Specialized "outsourced teams," each responsible for complex tasks in specific domains.
- MCP Protocol = Communication protocol, ensuring that reports submitted by outsourcing teams match company standards.
flowchart TB
subgraph Claude Code
CC[Claude AI]
TE[Tool Engine]
end
subgraph MCP Protocol Layer
PROTO[MCP Protocol
JSON-RPC 2.0]
end
subgraph MCP Servers
S1[MySQL MCP]
S2[Brave Search MCP]
S3[Image Analysis MCP]
end
CC --> TE
TE <-->|stdio / SSE| PROTO
PROTO <--> S1
PROTO <--> S2
PROTO <--> S3Two Transport Methods
| Method | Principle | Use Case |
|---|---|---|
| stdio | Claude Code spawns a child process, communicating via stdin/stdout | Most locally installed tools, like MySQL or Git |
| SSE | Connects to remote services via HTTP protocol | Centralized cloud services or tools used across devices |
Configuration Example (stdio mode)
MCP is typically configured in settings.json or settings.local.json:
"mcpServers": {
"mysql": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-mysql"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_DATABASE": "production"
}
}
}
Naming Convention
In a conversation, MCP Tools appear in the format mcp__<server-name>__<tool-name>. For example, the query function provided by the MySQL MCP would be identified as mcp__mysql__query.