Set up your app
Adding MCP servers to Claude Code
By Sophie Filer · Updated 6 Nov 2026
Claude Code manages MCP servers with one command, claude mcp add. You never have to open a JSON file unless you want to share servers with your team. Here is the short version, then the details that catch people out.
- Add with
claude mcp add- Team file
.mcp.jsonin the project- Local servers
- Yes
- Remote URLs
- Yes
At a glance
- Step 1
1. Pick a server
Find one on the shelf and open its page.
- Step 2
2. Run one command
Copy the Claude Code tab:
claude mcp add ... - Step 3
3. Check it starts
Run
claude mcp listand look for Connected. - Step 4
4. Ask Claude
Type
/mcpto see its tools, then ask away.
The short version
claude mcp add playwright -- npx -y @playwright/mcp@latestclaude mcp add --transport http context7 https://mcp.context7.com/mcpclaude mcp listThe double dash matters: everything after it is the command Claude Code runs to start the server, passed through untouched. claude mcp list starts each server and prints its status, such as Connected, Needs authentication or Failed to connect, so run it after every add.
Every server page on MCP Shelf has a Claude Code tab with the exact command, including any keys it needs.
Choosing where the server is saved
Every server has a scope. The default is local: only you, only in the folder you ran the command from.
| Scope | How to set it | Saved in | Available to |
|---|---|---|---|
| local | default | ~/.claude.json, under this project | You, in this project |
| project | --scope project | .mcp.json in the project root | Anyone who clones the repo |
| user | --scope user | ~/.claude.json, top level | You, in every project |
Project scope writes a .mcp.json file you can commit. Claude Code will not start servers from that file until each person approves them, which is why a fresh clone shows "Pending approval" in claude mcp list. Start claude in the folder and accept the prompt. claude mcp reset-project-choices clears those answers if you need to choose again.
If the same name exists in more than one scope, local wins over project, and project wins over user. The whole entry from the winning scope is used; fields are not mixed.
Passing API keys
Use -e (or --env) for environment variables and put it after the server name. If it comes straight before the name, Claude Code reads the name as another variable and stops with "Invalid environment variable format".
claude mcp add firecrawl -e FIRECRAWL_API_KEY=fc-your-key -- npx -y firecrawl-mcpFor remote servers that take a key in a header, use --header:
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer YOUR_TOKEN"Keys end up in plain text in ~/.claude.json, or in .mcp.json for project scope. For a file you commit, refer to environment variables instead. Claude Code expands ${NAME} and ${NAME:-default} in the command, args, env, url and headers of .mcp.json, so each person keeps their own key in their shell:
{
"mcpServers": {
"firecrawl": {
"command": "npx",
"args": ["-y", "firecrawl-mcp"],
"env": { "FIRECRAWL_API_KEY": "${FIRECRAWL_API_KEY}" }
}
}
}Pasting a config written for another app
Most READMEs give a Claude Desktop or Cursor JSON block. Pass the object inside "mcpServers" to claude mcp add-json, not the whole block:
claude mcp add-json playwright '{"command":"npx","args":["-y","@playwright/mcp@latest"]}'Server names may only use letters, numbers, hyphens and underscores. Rename a key such as "my server" before you add it.
The same works for servers that ship inside another app rather than as an npm package. The config for Burp Suite's MCP extension, for example, starts a small Java proxy, and claude mcp add-json takes it as it is.
Signing in to remote servers
Servers that use OAuth show "Needs authentication" in claude mcp list. Type /mcp inside a session and pick the server, or run claude mcp login <name> from your shell; both open the browser. Over SSH, claude mcp login prints the address to open on your own computer instead. claude mcp logout <name> signs you out.
Other commands worth knowing
| Command | What it does |
|---|---|
| claude mcp get <name> | Shows one server: scope, command, arguments, env, status and any error |
| claude mcp remove <name> | Removes it (add -s <scope> if the name exists in more than one) |
| claude mcp add-json <name> '<json>' | Adds a server from a JSON block, such as the configs on MCP Shelf |
| claude mcp add-from-claude-desktop | Copies servers over from Claude Desktop (macOS and WSL) |
| claude mcp login <name> | Signs in to a remote server from your shell |
| /mcp (inside a session) | Shows connected servers and tool counts, signs in, and turns servers on or off for this project |
Timeouts and large results
- A server that is slow to start, such as one npx has to download first, can time out. Start Claude Code with a longer limit in milliseconds:
MCP_TIMEOUT=60000 claude. - Claude Code warns when one tool result passes 10,000 tokens and caps it at 25,000 by default. Raise the cap with
MAX_MCP_OUTPUT_TOKENS=50000 claudefor servers that return big pages or query results. - A server you do not need in a project can be switched off in
/mcpwithout removing it.
Popular servers to try in Claude Code
The most-starred servers on the shelf. Each page has the Claude Code command ready to copy.
| Server | What it gives your assistant | You need |
|---|---|---|
| Sequential Thinking | A numbered scratchpad the model fills in, revises and branches while it works. | Node.js 24 or newer (the package asks for it) |
| Context7 | Pulls current, version-specific library docs into the conversation. | Node.js 22.13 or newer for the ctx7 setup command, or Node.js 18 or newer for the local server alone |
| Playwright MCP | Microsoft's browser automation server: navigate, click, type, read. | Node.js 18 or newer |
| GitHub | GitHub's own server for repos, issues, pull requests and Actions. | A GitHub account |
| Blender MCP | Prompt-driven modelling in a running copy of Blender. | Blender 3.0 or newer |
| Serena | IDE-style "find symbol" and "edit symbol" for an agent, backed by language servers. | uv, which installs Serena and the Python 3.13 it runs on |
| MCP Toolbox for Databases | Google's toolbox for Postgres, MySQL, BigQuery, Spanner and other databases. | Node.js 18 or newer |
| Framelink Figma MCP | Feeds Figma layout and styling to coding agents so the UI matches the design. | A Figma personal access token |
Questions
Where does Claude Code keep MCP servers?
Local and user servers are in ~/.claude.json. Project servers are in .mcp.json at the root of the project.
Can I paste the JSON configs from MCP Shelf into Claude Code?
Yes. Use claude mcp add-json with the server's inner block, for example claude mcp add-json playwright '{"command":"npx","args":["-y","@playwright/mcp@latest"]}'. Add "type": "http" to a block that only has a url.
Do Claude Code and Claude Desktop share servers?
No, they keep separate lists. claude mcp add-from-claude-desktop copies the Desktop ones across on macOS and WSL.
Why does claude mcp list say "Failed to connect"?
Claude Code could not start or reach that server. Run claude mcp get <name> to see the error, then look it up in Fixing MCP server errors.
Plant Your First Pea
Every server on the shelf has a tab with the exact config for your app.
For bots & AI agents
Machine-readable versions of this guide and MCP Shelf. Fetch these instead of parsing this page.
This guide (.md)llms.txtllms-full.txtai.txtFull catalog (.md)API specMCP serverMCP manifestDeveloper docs