New Tool Radar

AI Agents & Automation

How to Add an MCP Server to Claude Code With the Command Line

Use claude mcp add to register an MCP server in Claude Code, choosing the scope that decides who else gets it.

Schematic diagram with three steps: Pick the server and scope, Run claude mcp add, then List and test the server.

Claude Code takes a single claude mcp add command to load a server, and the scope you pick decides who gets it: local stays private to one project, project is stored in .mcp.json and asks each teammate once, and user applies it in every project.

Before you start

You need Claude Code installed and the server address or launch command, plus any key it needs. Decide the scope first: use local scope for a server only you should use.

Add the server with the scope you chose

Run claude mcp add with the server name and its command or URL, adding –scope local for a private server or –scope project for a shared one. For a remote server over Streamable HTTP, pass the URL and the transport flag. For a local server, pass the npx or uvx launch command.

Confirm the server is registered and test one tool

Run claude mcp list and check the server shows as connected. Ask Claude to use one tool from the server and check the result comes from the server, not from memory. If the server is missing, check the scope: a local-scope server only exists in the project where you added it.

Worked example: Adding a filesystem server for a fictional developer

Maple Dev is a fictional developer. She adds a read-only filesystem server to one project. The table shows the commands.

Step Command or check
Add claude mcp add with the server name and npx command
Scope Local, so only this project gets it
Confirm claude mcp list shows the server connected
Test Ask Claude to list the files in the project folder

Expected result (UNTESTED): claude mcp list shows the server connected, and the test question lists the project files. We checked the MCP setup guides, which describe the add command and the scopes, but we did not run the command on this machine.

Limits

A server added at user scope follows you into every project, so a careless server gets broad access. Prefer local scope for anything with write access, and review the server tool list after each update. SSE transport is deprecated in favour of Streamable HTTP, so do not start anything new on it.

Sources

See all