MCP (Model Context Protocol)
Connect Claude Code to external tools, data, and services.
MCP (Model Context Protocol) is an open standard that lets Claude Code connect to external tools and data sources — GitHub, Jira, Slack, databases, and more — so instead of copy-pasting information into chat, Claude can read and act on those systems directly.
What MCP is for
Without MCP, Claude only knows what you paste into the conversation. With an MCP server connected, Claude can query your issue tracker, pull a database schema, check a monitoring dashboard, or open a GitHub PR — all from a single prompt. Think of MCP servers as plugins: each one teaches Claude how to talk to a specific tool.
- "Implement the feature described in JIRA-4521 and open a PR on GitHub."
- "What are the most common Sentry errors in the last 24 hours?"
- "Find customers who haven't purchased in 90 days from our PostgreSQL database."
Add your first server
Run these commands in your terminal before starting a Claude session. There are two common shapes: a hosted server you reach over HTTP, and a local server that runs as a process on your machine.
# Hosted HTTP server (recommended for cloud services)
claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp
# Local stdio server — use -- to separate Claude's flags from the server command
claude mcp add playwright -- npx -y @playwright/mcp@latest
# Check what's connected and its status
claude mcp list
# Remove a server when you no longer need it
claude mcp remove playwrightAfter adding a server, start a Claude session and run /mcp to see connection status, authenticate OAuth servers, or reconnect a failed server. The first time Claude calls a new tool it will ask your permission — approve it to continue.
Server scopes
The scope controls where the server configuration is stored and who can use it. The default is local — private to you, active only in the current project.
- local (default): stored in ~/.claude.json, tied to the current project only. Good for personal or experimental servers.
- project: written to .mcp.json in your project root. Commit that file and every teammate who clones the repo gets the same server. Each person approves it once on first load.
- user: stored in ~/.claude.json at the top level. Active in all your projects, private to you.
# Share a server with your whole team (writes .mcp.json)
claude mcp add --scope project --transport http notion https://mcp.notion.com/mcp
# Use a server across all your projects
claude mcp add --scope user --transport http hubspot https://mcp.hubspot.com/anthropicUsing MCP tools
Once a server is connected, Claude picks the right tools automatically — you don't need to name the server in every prompt. Tool calls appear in Claude's output labeled with the server name, so you always know where information came from. MCP servers can also expose resources (data objects like issues or schemas) and prompt templates.
- Type @ in a prompt to reference a resource by path, for example @github:issue://123.
- Type / to see MCP prompt commands, in the format /mcp__servername__promptname.
- Run /mcp inside a session to check status, authenticate, or reconnect.
Stay safe with third-party servers
Each connected server also loads its tool names into every session, consuming space in Claude's context window. Remove servers you no longer use with claude mcp remove <name> to keep that space free.