The claude mcp add command is the fastest way to connect an MCP server to Claude Code — one line in your terminal and Claude immediately has access to new tools. If you want to go from zero to a fully-equipped Claude Code session with web search, image generation, SEO analysis, and 165+ other tools, this guide covers every command you need.
MCP (Model Context Protocol) is the open standard that lets Claude connect to external tools and data sources. For a broader look at which MCP tools are worth connecting, see Best MCP Tools for Claude in 2026. This guide focuses specifically on the CLI mechanics: adding servers, managing them, and understanding scope.
According to Anthropic's MCP documentation, MCP has been adopted by over 10,000 developers since its release. Claude Code is one of the most capable MCP clients available — it can call tools while simultaneously reading files, writing code, and running terminal commands, making it ideal for developer workflows.
Everything before -- is the server name (what Claude will call it internally). Everything after -- is the shell command Claude Code runs to start the server process.
To connect ToolRouter — which gives Claude access to 165+ tools through a single MCP connection:
bash
claude mcp add toolrouter -- npx -y toolrouter@latest mcp
Breaking this down:
toolrouter — the name you give this server, used in list, get, and remove commands
-- — separator between the server name and the startup command
npx -y toolrouter@latest mcp — downloads and runs the ToolRouter MCP server; -y skips the npm install confirmation so it works non-interactively
Claude Code runs this command in the background each time you start a session. No daemon to manage, no port to configure.
You can repeat -e for multiple variables. The values are stored in Claude Code's config, not in your shell environment, so they persist across sessions without needing to export them.
Output shows each server's name, scope, and the command used to start it. If a server is failing to start, this is the first place to check — confirm the startup command is correct and the binary is accessible.
This prints the server name, scope, startup command, environment variables (keys only, not values), and the list of tools it exposes once connected. Useful for verifying a server is configured correctly before debugging a failing tool call.
This removes the server from Claude Code's config entirely. The next session will not attempt to start it. The underlying binary (the npm package) is not uninstalled — just the Claude Code configuration entry.
To remove a server that was added under a specific scope, include the scope flag:
bash
claude mcp remove toolrouter --scope user
Give your AI superpowers — connect once and access every tool.
Every MCP server in Claude Code is registered under a scope that controls where it is available. The default scope is local.
Scope
Flag
Where it applies
Stored in
Local
--scope local (default)
Current project directory only
~/.claude/ local config
User
--scope user
All projects on this machine
~/.claude/ user config
Project
--scope project
All team members who clone this repo
.mcp.json in the project root
Use --scope when adding a server to override the default:
bash
# Available in every project on this machine
claude mcp add toolrouter --scope user -- npx -y toolrouter@latest mcp
# Committed to the repo so your whole team gets it
claude mcp add toolrouter --scope project -- npx -y toolrouter@latest mcp
Project scope is the most powerful option for teams. When you add a server with --scope project, Claude Code writes an .mcp.json file to the project root. Commit that file and every developer who clones the repo gets the same MCP configuration automatically — no per-developer setup required.
User scope is best for personal tools you want available everywhere: a ToolRouter connection, a personal search tool, or a utility you use across all your projects.
Local scope (the default) is appropriate for project-specific servers that you are testing or that you do not want to commit.
If the same server name exists in multiple scopes, Claude Code applies them in priority order: Project overrides User, User overrides Local. This lets you define a team-wide default in .mcp.json and override it locally without editing the shared file.
Once a server is added, Claude Code discovers and uses its tools automatically. You do not need to select tools manually or reference them by name.
Start a session (claude) and ask naturally:
"Search for the latest benchmarks comparing Postgres and SQLite for read-heavy workloads"
"Generate a hero image for a developer tools product — dark background, terminal aesthetic"
"Check the SEO meta tags on toolrouter.com and flag any issues"
"Scrape the pricing table from this competitor URL"
Claude picks the right tool from the connected servers based on the request. If multiple tools could apply, Claude chooses the best fit given the context. You can also be explicit: "use the web search tool to find..." forces a specific tool if needed.
According to Anthropic's published Claude usage data, Claude Code users with MCP tools connected complete complex multi-step tasks 3x faster than those relying on Claude's built-in capabilities alone. Tools that chain across a single request — search, then extract, then generate — execute in the same conversation turn without any additional prompting.
MCP tools also work inside agentic sessions. When Claude Code is running a longer task (building a feature, conducting research, fixing a test suite), it will call MCP tools mid-task without surfacing them to you unless the tool call requires confirmation.
Managing individual MCP servers gets complicated quickly. A separate server for web search, another for image generation, another for SEO analysis — each with its own binary, config, and API key — adds maintenance overhead that compounds over time.
ToolRouter is the easiest way to give Claude Code access to 165+ tools through one MCP connection. Instead of managing a stack of servers, you add ToolRouter once and Claude gains access to the full catalog: web search, deep research, SEO auditing, image generation, screenshot capture, data extraction, lead finding, and more.
bash
claude mcp add toolrouter -- npx -y toolrouter@latest mcp
New tools are added to the catalog regularly and become available to your existing connection automatically — no config changes required. Connect ToolRouter to Claude Code and check the tool catalog to see what is available.
If you use Claude chat or Cowork rather than Claude Code, you do not need the CLI at all. Go to Settings → Connectors → Add custom connector, enter the ToolRouter URL, and you are done. See the connector guide for step-by-step instructions.
Frequently Asked Questions
What is the `claude mcp add` command?
`claude mcp add` registers an MCP server with Claude Code. You give the server a name and provide the shell command that starts it. Claude Code runs that command automatically at the start of each session, discovers the tools the server exposes, and makes them available during conversation. The command is part of the Claude Code CLI — run `claude mcp --help` to see all subcommands.
What is the difference between local and user scope?
Local scope (the default) applies only to the current project directory. User scope applies to every project on your machine. If you want a tool available everywhere — like ToolRouter for general-purpose tasks — add it with `--scope user`. If you want a tool only for one codebase, use the default local scope or commit it to the project with `--scope project`.
Can I add multiple MCP servers?
Yes, there is no limit. Each server gets its own name, and Claude Code starts all of them when you begin a session. Claude automatically selects the right tool from whichever server is best suited to the request. If you want to simplify management, ToolRouter replaces multiple individual servers with a single connection that covers most categories.
What MCP servers work with Claude Code?
Any server that implements the [Model Context Protocol specification](https://modelcontextprotocol.io) works with Claude Code. This includes servers built with the official MCP SDKs (TypeScript, Python, Go), community-built servers from the [MCP server directory](https://github.com/modelcontextprotocol/servers), and managed gateways like ToolRouter. The `npx` pattern used in this guide works for any server published to npm. For servers distributed as binaries or Docker containers, adjust the startup command accordingly.