MCP
MCP
Model Context Protocol (MCP) — Claude Code can connect to hundreds of external tools and data sources through it.
The Problem: Claude Code can read your files and run terminal commands, but it can't talk to your other tools — your databases, APIs, monitoring, issue trackers, etc. Every integration would need custom code.
MCP is like USB-C for AI: one standard protocol. Any AI client can connect to any MCP server. Build a server once, it works everywhere.
Architecture:
Claude Code (Host)
├── Client 1 —— Server A (Weather)
├── Client 2 —— Server B (Database)
└── Client 3 —— Server C (GitHub)
- Host: Claude Code manages connections to servers.
- Client: one per server, maintained automatically.
- Server: exposes tools Claude can call.
What servers expose:
- Tools: functions Claude can call (fetch data, query a database, run a search)
- Resources: data Claude can read (file contents, schemas, docs)
- Prompts: reusable interaction templates
Two ways to connect:
- stdio (local): server runs on your machine as a process.
- Streamable HTTP (remote): server runs somewhere else, connects over HTTP.
Adding an MCP server connection to Claude (added to settings.json):
claude mcp add --transport http hugging-face https://huggingface.co/mcp
MCP connections can be added to many different scopes.
# List all configured servers
claude mcp list
# Get details for a specific server
claude mcp get github
# Remove a server
claude mcp remove github
# (within Claude Code) Check server status
/mcp
The Model Context Protocol (MCP) is an open standard for connecting AI agents to external systems. Anthropic created MCP in 2024.
MCP client can talk to an MCP server: the Model's context window (via the MCP client) holds a system prompt plus tool definitions (Tool 1 def, Tool 2 def, ...) fetched from the server via tools/list / tools/list result; conversation messages flow between user/assistant; when the assistant calls a tool, the client sends tools/call to the server and receives tools/call result back, which is added to the context as the tool result.
MCP server has the following:
- Tools — tools that an external model can call.
- Resources — data that an external model can read.
- Prompts — reusable prompts an external model can use.
Related: MCP Configuration, MCP Rules, MCP Server Controls Settings, MCP How It Works, MCP Best Practices