Remove an MCP server from Claude Code, and make it stay gone

The command is claude mcp remove <name>. If that were the whole story this page would not exist: servers arrive from five sources, and only one of them is the one you removed.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

Run claude mcp remove <name>. Without a scope flag it removes the server from whichever scope it exists in; pass -s local, -s project, or -s user to target one. If it comes back, the server is arriving from a different source: a committed .mcp.json, a plugin, a claude.ai connector, or managed enterprise settings. Use claude mcp logout to clear stored OAuth credentials afterwards.

What you need to know
  • claude mcp remove <name>. No scope flag removes it from whichever scope it is in.
  • Removing is not disabling. To keep the config, toggle it off in /mcp instead.
  • It came back? It is from a different source: .mcp.json, a plugin, a connector, or policy.
  • Removal does not clear OAuth. Run claude mcp logout <name> too.
  • --strict-mcp-config ignores every configured server for one run.
  • A project-scoped removal edits a tracked file. Commit it.

The command

Verified against claude mcp --help on v2.1.224, August 2026.
# remove from wherever it lives
claude mcp remove github

# target one scope explicitly
claude mcp remove github --scope user
claude mcp remove github -s project
claude mcp remove github -s local

# confirm
claude mcp list
The paranoid version. Run all three; extras are harmless no-ops.
claude mcp remove github -s local
claude mcp remove github -s project
claude mcp remove github -s user
claude mcp logout github        # clear any stored OAuth credential
claude mcp list

Where each scope actually stores it

Knowing the file matters, because a removal you can verify on disk is a removal you can stop arguing with.

ScopeFileCommitted?
local (default)~/.claude.json, under this project's pathNo
project.mcp.json in the repository rootYes
user~/.claude.json, top levelNo
PluginThe plugin's own .mcp.json or plugin.jsonVia the plugin
claude.ai connectorYour Anthropic accountNot a file
Managedmanaged-settings.json, admin ownedBy policy
Check the files directly when a removal does not seem to have happened.
# project scope
jq .mcpServers .mcp.json

# user scope
jq '.mcpServers | keys' ~/.claude.json

# local scope, for this project
jq --arg p "$PWD" '.projects[$p].mcpServers | keys' ~/.claude.json

# per-project disable list, written by the /mcp toggle
jq --arg p "$PWD" '.projects[$p].disabledMcpServers' ~/.claude.json

A project-scoped removal rewrites the tracked .mcp.json. That is correct behaviour and it is also a change to everyone's configuration, so commit it with a message that says why rather than leaving it in someone's working tree.

It came back. Which of the five is it?

Work down this list. The first two account for most cases.

SymptomSourceFix
Back after git pull, and teammates have it tooCommitted .mcp.jsonRemove at -s project, then commit
Back in every repositoryUser scopeclaude mcp remove <name> -s user
Tagged as from a plugin in /mcpPlugin-providedUninstall the plugin, or toggle it off
Tagged as from claude.ai in /mcpConnector on your accountRemove in claude.ai, or disable connectors
Cannot be removed at allManaged settingsIt is policy. Talk to your admin
Only in one projectLocal scope-s local from inside that project

Plugin-provided servers

You add and remove these by installing or uninstalling the plugin, not with claude mcp commands. You can still switch one off in /mcp, which stops Claude Code connecting without removing the plugin.

/plugin              # manage installed plugins
/reload-plugins      # apply enable or disable changes mid-session

claude.ai connectors

These are account state, so no local removal touches them. Remove the connector at claude.ai/customize/connectors, or switch connectors off in Claude Code entirely.

~/.claude/settings.json. True in any settings source wins.
{
  "disableClaudeAiConnectors": true
}
Or for a single shell session.
ENABLE_CLAUDEAI_MCP_SERVERS=false claude
Five places an MCP server can come from, and what actually removes each oneFIVE SOURCES, ONE LISTlocalclaude mcp remove -s localprojectremove -s project, then commituserclaude mcp remove -s userpluginuninstall or disable the pluginconnectorremove it in claude.ai/mcpone list, five ownersA sixth source, managed settings, cannot be removed at all. That one is policy.

Disabling instead of removing

Removal throws away the configuration. Half the time what you actually want is for the server to stop connecting while the config survives, which is a different operation with three different mechanisms depending on where the server came from.

GoalMechanismWhere it is recorded
Stop connecting, keep the configToggle in /mcpdisabledMcpServers in ~/.claude.json
Reject a .mcp.json serverdisabledMcpjsonServersAny settings file
Approve specific .mcp.json serversenabledMcpjsonServersAny settings file
Approve all project serversenableAllProjectMcpServersAny settings file
Turn off every connectordisableClaudeAiConnectorsAny settings file
Ignore everything, one run--strict-mcp-configNowhere. Flag only
.claude/settings.json. Keeps the entry in .mcp.json but never loads it.
{
  "disabledMcpjsonServers": ["heavy-server", "legacy-db"]
}
The blunt instrument, useful for isolating a problem.
# ignore every configured server for this run
claude --strict-mcp-config --mcp-config '{"mcpServers":{}}'

# or load exactly one, and nothing else
claude --strict-mcp-config --mcp-config ./just-this-one.json

That pair is the fastest way to answer "is an MCP server causing this?" without touching a single config file. If the symptom disappears, you have your answer and nothing to undo.

The leftovers

Removing a server does not clean up everything it created. Three things outlive it.

  1. OAuth credentials. Stored in your system keychain on macOS or a credentials file elsewhere, and untouched by remove. Clear them with claude mcp logout <name>, or "Clear authentication" in the /mcp menu.
  2. Project approval choices. Approvals and rejections of .mcp.json servers persist per project. Reset them with claude mcp reset-project-choices.
  3. Permission rules. Any mcp__server__tool entry in your permissions block, and any hook matcher written against it, stays behind and silently matches nothing.
The full cleanup for a server you are done with.
claude mcp remove old-server
claude mcp logout old-server
claude mcp reset-project-choices     # only if it was a .mcp.json server

# stale permission rules referencing it
grep -rn "mcp__old-server" ~/.claude/settings.json .claude/settings.json 2>/dev/null

Headless runs, CI, and subagents

The rules change once nobody is at a keyboard, and this is where a server you thought was removed does the most damage: a claude -p run or an Agent SDK session cannot show the project-approval prompt, so project-scoped servers from .mcp.json load without asking. The interactive safety net is simply absent.

Three ways to keep a server out of an automated run.

ApproachEffectBest for
disabledMcpjsonServersBlocks it in every modeA server nobody should ever load
--setting-sources userIgnores project settings entirelyRunning against untrusted repositories
--strict-mcp-configOnly what --mcp-config namesA build that must be reproducible
A CI invocation that cannot inherit a server from the checkout.
claude -p "review the diff and comment on risks" \
  --strict-mcp-config \
  --mcp-config ./ci-servers.json \
  --setting-sources user

One related gap worth knowing: a removed server's tools do not vanish from a subagent definition. A subagent whose tools list names mcp__old-server__query keeps that entry, matching nothing, which reads as the subagent quietly failing rather than as a stale reference.

Verifying it is really gone

Three checks, because they answer three different questions.
# 1. configured, with a live health check
claude mcp list

# 2. this specific one, in detail
claude mcp get old-server        # should report it is not found

# 3. inside a session: what actually connected, including plugins and connectors
/mcp

Reading the result.

claude mcp list/mcpVerdict
AbsentAbsentGone.
AbsentPresentPlugin or connector. Not a scope problem
PresentPresentAnother scope still has it
PresentAbsentRemoved but the session is stale. Restart

Questions people ask

Run claude mcp remove <name>. Without a scope flag it removes the server from whichever scope it exists in. Add -s local, -s project, or -s user to target one scope explicitly.

It is arriving from a different source. The usual suspects are a committed .mcp.json at project scope, a plugin that bundles the server, a claude.ai connector on your account, or managed enterprise settings. Run /mcp to see which origin is labelled.

Toggle it off in the /mcp panel, which records the choice per project under disabledMcpServers in ~/.claude.json. For a .mcp.json server, add it to disabledMcpjsonServers in a settings file instead, which blocks it in every mode.

Run claude --strict-mcp-config --mcp-config '{"mcpServers":{}}'. That ignores every configured server for one run and changes nothing on disk, which makes it the right tool for isolating a problem.

Local and user scope both live in ~/.claude.json, local under the project path and user at the top level. Project scope lives in .mcp.json in the repository root, which is the one you commit.

No. OAuth credentials survive removal. Run claude mcp logout <name> to clear the stored token locally, and revoke the grant in the vendor's own settings for anything sensitive.

You cannot with claude mcp remove. Uninstall the plugin with /plugin, or toggle the server off in /mcp to stop Claude Code connecting to it while keeping the plugin installed.

Run claude mcp reset-project-choices, which clears every approved and rejected project-scoped .mcp.json server for the current project so the approval prompt appears again.

Sources

Every figure above was read from these pages on 3 August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. Claude Code MCP documentation
  2. Claude Code CLI reference
  3. Claude Code settings reference
Try it

Servers you
forgot about.

Continuum shows the token split per session, so the cost of a server nobody uses stops being invisible.

free app · your subscriptions · local-first