Claude Code MCP Servers
Claude Code connects to MCP servers with claude mcp add, for example claude mcp add --transport http notion https://mcp.notion.com/mcp, stored per user, per project in a shared .mcp.json file, or locally for one project.
To add an MCP server to Claude Code, run claude mcp add --transport http <name> <url> for a remote server (for example claude mcp add --transport http notion https://mcp.notion.com/mcp) or claude mcp add <name> -- <command> [args...] for a local one, then check it with /mcp inside a session (Connect Claude Code to tools via MCP, read Nov 6, 2026). The Model Context Protocol is an open standard for connecting AI tools to outside systems: a server gives Claude Code tools such as reading Jira tickets, querying a database or searching Slack.
Quick facts
| Add remote | claude mcp add --transport http <name> <url> |
| Add local (stdio) | claude mcp add <name> -- <command> [args...] |
| Manage | claude mcp list, get, remove, add-json, add-from-claude-desktop, login, logout |
| In a session | /mcp (status, sign-in, turn servers off) |
| Scopes | local (default), project (.mcp.json), user |
| Output limit | Warning above 10,000 tokens, limit 25,000 by default (MAX_MCP_OUTPUT_TOKENS) |
| Tool search | On by default: only tool names load at start |
Source for the table: Connect Claude Code to tools via MCP, Anthropic, read Nov 6, 2026.
How do you add an MCP server?
Remote servers run on someone else's machine and speak HTTP. --transport http is the current choice (streamable-http is accepted as another name for it). The older SSE transport is deprecated, though --transport sse still works. If the server needs a login, type /mcp in a session and pick it to sign in with OAuth; claude mcp login does the same from the shell.
Local servers run as a program on your computer and talk over standard input and output. Everything after -- is the command that starts it:
claude mcp add my-server -- npx -y <server-package> <server-args>
Claude Code sets CLAUDE_PROJECT_DIR in the server's environment. To bring over servers already set up in the Claude desktop app, use claude mcp add-from-claude-desktop; to paste a JSON definition, claude mcp add-json (Connect Claude Code to tools via MCP, read Nov 6, 2026). Anthropic's best practices add one tip first: if a system already has a command-line tool such as gh, Claude can usually use that without any MCP server (Best practices for Claude Code, read Nov 6, 2026).
Scopes and .mcp.json
Where a server is saved decides who gets it:
- Local (the default): this project only, for you alone, stored in
~/.claude.json. - Project (
--scope project): written to.mcp.jsonat the repository root, which you commit so the whole team gets it. Claude Code asks each person to approve a project's servers before first use;claude mcp reset-project-choicesundoes those answers. - User (
--scope user): every project on your machine, also in~/.claude.json.
When the same server name appears in several places, local wins over project, then user, then servers from plugins, then claude.ai connectors. A .mcp.json file can use environment variables such as ${API_KEY}, with defaults, so a shared file need not hold secrets (Connect Claude Code to tools via MCP, read Nov 6, 2026).
Connectors from claude.ai
If you sign in to Claude Code with a claude.ai account, the connectors added at claude.ai under Customize > Connectors are available in Claude Code automatically; on Team and Enterprise plans only admins add them. Reviewed servers are listed in the Anthropic Directory at claude.ai/directory, which uses the same MCP plumbing (Connect Claude Code to tools via MCP, read Nov 6, 2026). The step-by-step for the chat apps is on How to Connect Claude to MCP Servers.
Context, tool search and output limits
MCP tool search is on by default: only each server's tool names and instructions load at session start, and Claude looks up a tool's full definition when it needs one, so adding servers costs little context. ENABLE_TOOL_SEARCH=false turns it off. Tool output above 10,000 tokens draws a warning, and the default cap is 25,000 tokens; raise it with MAX_MCP_OUTPUT_TOKENS (for example 50000), or per tool up to 500,000 since Mar 30 to Apr 3, 2026 (What's new, read Nov 6, 2026). Connected servers still add their names and instructions on every turn, so Anthropic suggests turning off the ones you do not need from /mcp (Best practices for Claude Code, read Nov 6, 2026).
Beyond tools
Claude Code also supports MCP resources, which you reference with @ like a file; MCP prompts, which appear as commands; elicitation, where a server asks you a question mid-task; tasks that run on the server; and channels that push messages from Telegram, Discord or webhooks into a running session. In the other direction, claude mcp serve runs Claude Code itself as an MCP server for another app, such as the Claude desktop app (Connect Claude Code to tools via MCP, read Nov 6, 2026).
Permissions and safety
An MCP tool is called like any other tool, so permission rules apply: a rule such as mcp__github__create_issue in permissions.allow or permissions.deny controls a single tool. Local servers run outside the Bash sandbox with your user rights, and a remote server sees whatever data Claude sends it, so add only servers you trust. Anthropic's security page lists .mcp.json approval among its prompt-injection safeguards, and notes that a claude -p run shows no such prompt (Security, read Nov 6, 2026). Organizations can limit servers with managed MCP settings and allowedMcpServers (Settings reference, read Nov 6, 2026).
Frequently asked questions
How do I add an MCP server to Claude Code? Run claude mcp add --transport http <name> <url> for a remote server or claude mcp add <name> -- <command> for a local one, then type /mcp in Claude Code to confirm it connected and sign in if needed.
Where is the Claude Code MCP config file? Shared project servers are in .mcp.json at the repository root; your local and user-scope servers are in ~/.claude.json. Claude Code writes both when you use claude mcp add.
Why does my MCP server not show up in Claude Code? Check claude mcp list and /mcp for its status, approve the project's servers if Claude Code asked, sign in with OAuth for remote servers, and make sure a local server's command runs on its own in your shell.
Does Claude Code support SSE MCP servers? Yes, with --transport sse, but Anthropic marks SSE as deprecated; use --transport http for servers that offer streamable HTTP.
Can Claude Code use my claude.ai connectors? Yes. When Claude Code is signed in with a claude.ai account, connectors added at claude.ai are available automatically; on Team and Enterprise only admins add them.
Sources
- Connect Claude Code to tools via MCP, Anthropic, read Nov 6, 2026
- Best practices for Claude Code, Anthropic, read Nov 6, 2026
- Security, Anthropic, read Nov 6, 2026
- Settings reference, Anthropic, read Nov 6, 2026
- What's new, Anthropic, read Nov 6, 2026
- Model Context Protocol, MCP project, read Nov 6, 2026
- MCP in Claude Code, Claude, May 9, 2026 (video)
Moments
MCP in Claude Code
Claude
See also
-
Model Context ProtocolThe Model Context Protocol (MCP) is an open standard, introduced by Anthropic on Nov 25, 2024, for connecting AI applications such as Claude to outside tools and data through MCP servers. OpenAI, Google and Microsoft support it, and Anthropic donated it to the Linux Foundation's Agentic AI Foundation on Dec 9, 2025.
-
Claude CodeClaude Code is Anthropic's agentic coding tool. It reads a codebase, edits files, runs commands and opens pull requests from the terminal, VS Code, JetBrains IDEs, the Claude desktop app, the browser and Slack, and it comes with every paid Claude plan or a pay-as-you-go Console account. -
Claude Code PluginsA Claude Code plugin is a folder of skills, subagents, hooks and MCP servers that installs as one unit from a marketplace; type /plugin in Claude Code to browse Anthropic's official marketplace and install one. -
ConnectorsClaude connectors link Claude to apps such as Gmail, Google Drive, Slack, Notion and Asana so it can read and act in them with your permissions. They are on every Claude plan, Free included; Free accounts may add one custom connector. -
How to Connect Claude to MCP ServersConnect Claude to a remote MCP server in Customize > Connectors > Add custom connector, to a local one in Claude Desktop through a desktop extension or claude_desktop_config.json, and in Claude Code with claude mcp add.
-
Claude Code Permissions and ModesClaude Code has six permission modes (Manual, Accept edits, Plan, Auto, Don't ask and Bypass permissions), cycled with Shift+Tab; since v2.1.283 interactive sessions start in auto mode, and --dangerously-skip-permissions turns every check off and belongs only in a container or VM.