Part 2 · Lesson 14 of 16
Connecting MCP Servers to Claude Code
Give Claude access to your tools and data.
11 min
Step 1 of 5 · What MCP is
So far Claude Code has worked with your files and your terminal. MCP — the Model Context Protocol — lets it reach further: into your issue tracker, your database, your monitoring dashboard, and hundreds of other tools.
MCP is an open standard for connecting AI tools to external systems. You connect a server (for a specific tool, like GitHub or Sentry), and Claude can then read and act on that system directly — instead of you copy-pasting data into the chat.
Step 2 of 5 · Add a server with `claude mcp add`
You add servers from your terminal (not inside a session) with the claude mcp command. Most cloud tools expose a remote HTTP server:
claude mcp add --transport http sentry https://mcp.sentry.dev/mcpSome tools run as a local process on your machine instead. Those use the stdio transport, with the command after a -- separator:
claude mcp add --transport stdio playwright -- npx -y @playwright/mcp@latestStep 3 of 5 · Choose a scope
A scope decides which projects a server loads in, and whether your team gets it too:
local(the default) — only you, only in this project. Stored in~/.claude.json.project— shared with your team via a.mcp.jsonfile at the project root that you commit to version control.user— only you, but across all your projects.
claude mcp add --transport http paypal --scope project https://mcp.paypal.com/mcpStep 4 of 5 · Manage and use your servers
From the terminal you can claude mcp list, claude mcp get <name>, and claude mcp remove <name>. Inside a session, the /mcp command shows each server's status and tool count, and is where you complete login for servers that need OAuth:
/mcpOnce a server is connected, just ask in plain language — "What are the most common Sentry errors in the last 24 hours?" — and Claude uses the server's tools. Some servers also expose data you can pull in with an @ mention, like @github:issue://123.
Step 5 of 5 · Checkpoint & Recap
Recap
- MCP connects Claude Code to external tools and data via servers.
- Add one from the terminal:
claude mcp add --transport http <name> <url>(or--transport stdio … -- <command>). - Scopes:
local(default, just you),project(shared via.mcp.json),user(all your projects). - Manage with
claude mcp list/get/remove; check status and authenticate with/mcpinside a session. - Project servers prompt for approval; only connect servers you trust.
Frequently asked questions
How do I add an MCP server to Claude Code?
Run claude mcp add from your terminal. For a remote tool: claude mcp add --transport http <name> <url> (for example claude mcp add --transport http sentry https://mcp.sentry.dev/mcp). For a local one: claude mcp add --transport stdio <name> -- npx -y <package>. Then run /mcp inside a session to check it connected.
Where are MCP servers stored?
It depends on the scope. local (the default) and user servers live in ~/.claude.json. project servers live in a .mcp.json file at your project root, which you can commit so your whole team gets the same servers.
Do project-scoped servers need approval?
Yes. Claude Code prompts for your approval before using a project-scoped server defined in .mcp.json, so a config pulled in from version control can't run tools without your consent.
How do I see or authenticate my MCP servers?
Use /mcp inside a Claude Code session to see each server's status and tool count and to complete OAuth login for servers that require it. From the terminal, claude mcp list shows all configured servers and claude mcp get <name> shows the details for one.