# The claude mcp Commands

> How to add, list, sign in to and remove MCP servers from your shell. Which scope each one lands in, and how to load servers for one run only.

**Course:** [Claude Code Commands](https://learn.benibix.com/learn/ai-claude-code-commands)  
**Time:** 12 min

**After this lesson you can:**

- Add a server in the scope you mean
- Read a server's health in claude mcp list
- Load only your own servers in a CI run

## How to manage MCP servers from your shell

claude mcp add puts an MCP server into Claude Code from your shell. For a server on the web, give --transport http, a name and its address. For one that runs on your own computer, give a name, then -- and the command that starts it. By default it lands in local scope: just you, in this one project.

Three scopes decide who gets the server. Local, the default, is kept in ~/.claude.json under this project. --scope project writes it to .mcp.json in the repo, so the team gets it through git. --scope user adds it to every project of yours. A teammate is asked to approve a shared server before it loads.

claude mcp add-json takes the server as one block of JSON, not flags. Many server guides hand you that block. It is also easier when a server needs long headers. claude mcp add-from-claude-desktop copies the servers you set up in the Claude Desktop app. You pick which ones.

claude mcp list shows every server with a health mark: connected, needs a sign-in, or failed to connect. A failed mark means that server failed, not the list command. claude mcp get with a name shows one server in full: its address, scope and status, plus the error when it failed.

claude mcp login runs one server's sign-in from the shell, with no session open. Over SSH, add --no-browser to print the sign-in link instead. claude mcp logout clears what it stored. claude mcp remove deletes the server and its stored sign-in, but does not cancel that sign-in on the service. Run logout first to cancel it there too.

claude mcp serve works the other way round. It makes Claude Code itself an MCP server, so another app can use its tools to read, edit and run commands. It talks through the terminal's input and output lines, so it prints nothing when it starts. A quiet terminal means it is waiting.

Two launch flags change the servers for one run. --mcp-config loads servers from a JSON file or string, on top of yours. In a -p run it waits up to 30 seconds by default for them to connect. --strict-mcp-config skips all the others, so a CI job gets the same servers on every machine.

```bash
claude mcp add --transport http notion https://mcp.notion.com/mcp
claude mcp add --transport stdio --scope project airtable -- npx -y airtable-mcp-server
claude mcp list
claude mcp login notion --no-browser
claude -p --strict-mcp-config --mcp-config ./ci-mcp.json "check the open tickets"
```
Add a web server, then a local one for the team. Check their health and sign in over SSH. Then run with only the servers you pass.

![Three boxes. local covers this project, just you, and is kept in ~/.claude.json. project covers this project, shared by git, and is kept in .mcp.json. user covers all your projects, just you, and is kept in ~/.claude.json. A note says local is the default and --scope picks another.](https://learn.benibix.com/diagrams/cli-mcp-scopes.svg)

### Example: Lucy shares a server with her team

Lucy adds the team's ticket server with --scope project. The command writes it to .mcp.json, and she commits the file.

Her 4 teammates pull the change. Each is asked once to approve the server, and claude mcp list then shows it connected on all 5 machines.

**Words in this lesson:** [claude mcp add Command](https://learn.benibix.com/term/ai/claude-mcp-add-command), [claude mcp add-json Command](https://learn.benibix.com/term/ai/claude-mcp-add-json-command), [claude mcp list Command](https://learn.benibix.com/term/ai/claude-mcp-list-command), [claude mcp login Command](https://learn.benibix.com/term/ai/claude-mcp-login-command), [claude mcp remove Command](https://learn.benibix.com/term/ai/claude-mcp-remove-command), [claude mcp serve Command](https://learn.benibix.com/term/ai/claude-mcp-serve-command), [--mcp-config Flag](https://learn.benibix.com/term/ai/mcp-config-flag), [--strict-mcp-config Flag](https://learn.benibix.com/term/ai/strict-mcp-config-flag)

**Question:** You add a server with claude mcp add and no --scope. Who gets it?

**Answer:** Just you, in this one project. Local scope is the default. The server loads only in the project where you added it, and only for you. --scope project or --scope user widens it.

---

Source: https://learn.benibix.com/learn/ai-claude-code-commands/claude-mcp-commands
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
