Skip to content
BENIBIX Learn

The claude mcp Commands

Level 4 · Setup and extensions

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 contentsLesson 12 of 17

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

12 mincovers 8 glossary entries

Worth reading first: MCP, Skills and Hooks Menus

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 scopes for one server. --scope picks the box.

Worked 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.

The words for this lesson8

Check yourself

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

Finished this lesson?

Marking it complete also marks its 8 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.