6.1 — MCP in Claude Code: what an MCP server is for
Without MCP, Claude Code only sees your repository and your terminal. For it to read a ticket or a production error, you have to paste the content into the conversation.
MCP (Model Context Protocol) is an open protocol that connects an AI assistant to external tools. An MCP server is a program that exposes a tool through this protocol. Servers exist for Sentry, Jira, GitHub or your database. Claude Code plays the client role. It connects to the server, discovers what it offers and calls it when your request needs it.
One command adds a server. This one connects Claude Code to Sentry:
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
You then run claude, type /mcp and sign in to your account in the browser. Now you can ask "What are the most frequent errors since yesterday?". Claude queries Sentry itself.
An MCP server can expose three things:
- Tools are actions Claude calls, such as creating a ticket or running a SQL query.
- Resources are data you reference with
@, such as a database schema or documentation. - Prompts are ready-made commands you run with
/.
The protocol is shared by several coding agents. A server written for Claude Code also works with Codex CLI, Cursor or Gemini CLI.
Adding servers costs little context. Tool search is on by default. At startup, Claude Code loads only the tool names and each server's instructions. It loads a tool's full definition when Claude needs it. If a server must stay available on every turn, add "alwaysLoad": true to its configuration.
To find a server, start with the documentation of your tool's vendor. The Anthropic Directory (claude.ai/directory) also lists connectors reviewed by Anthropic. You add the remote ones with claude mcp add. Section 6.11 explains how to write your own server.
Key takeaways
• An MCP server gives Claude Code access to an external tool, such as Sentry, Jira or a database.
• You add a server with claude mcp add, then check its status with /mcp.
• A server exposes tools (actions), resources (data) and prompts (commands).
• Tool search loads definitions on demand, which limits the context used.
