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.
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
/mcpinstead. - 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-configignores every configured server for one run.- A project-scoped removal edits a tracked file. Commit it.
The command
# 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
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.
| Scope | File | Committed? |
|---|---|---|
local (default) | ~/.claude.json, under this project's path | No |
project | .mcp.json in the repository root | Yes |
user | ~/.claude.json, top level | No |
| Plugin | The plugin's own .mcp.json or plugin.json | Via the plugin |
| claude.ai connector | Your Anthropic account | Not a file |
| Managed | managed-settings.json, admin owned | By policy |
# 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.
| Symptom | Source | Fix |
|---|---|---|
Back after git pull, and teammates have it too | Committed .mcp.json | Remove at -s project, then commit |
| Back in every repository | User scope | claude mcp remove <name> -s user |
Tagged as from a plugin in /mcp | Plugin-provided | Uninstall the plugin, or toggle it off |
Tagged as from claude.ai in /mcp | Connector on your account | Remove in claude.ai, or disable connectors |
| Cannot be removed at all | Managed settings | It is policy. Talk to your admin |
| Only in one project | Local 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.
{
"disableClaudeAiConnectors": true
}
ENABLE_CLAUDEAI_MCP_SERVERS=false claude
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.
| Goal | Mechanism | Where it is recorded |
|---|---|---|
| Stop connecting, keep the config | Toggle in /mcp | disabledMcpServers in ~/.claude.json |
Reject a .mcp.json server | disabledMcpjsonServers | Any settings file |
Approve specific .mcp.json servers | enabledMcpjsonServers | Any settings file |
| Approve all project servers | enableAllProjectMcpServers | Any settings file |
| Turn off every connector | disableClaudeAiConnectors | Any settings file |
| Ignore everything, one run | --strict-mcp-config | Nowhere. Flag only |
{
"disabledMcpjsonServers": ["heavy-server", "legacy-db"]
}
# 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.
- OAuth credentials. Stored in your system keychain on macOS or a credentials file elsewhere, and untouched by
remove. Clear them withclaude mcp logout <name>, or "Clear authentication" in the/mcpmenu. - Project approval choices. Approvals and rejections of
.mcp.jsonservers persist per project. Reset them withclaude mcp reset-project-choices. - Permission rules. Any
mcp__server__toolentry in yourpermissionsblock, and any hook matcher written against it, stays behind and silently matches nothing.
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.
| Approach | Effect | Best for |
|---|---|---|
disabledMcpjsonServers | Blocks it in every mode | A server nobody should ever load |
--setting-sources user | Ignores project settings entirely | Running against untrusted repositories |
--strict-mcp-config | Only what --mcp-config names | A build that must be reproducible |
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
# 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 | /mcp | Verdict |
|---|---|---|
| Absent | Absent | Gone. |
| Absent | Present | Plugin or connector. Not a scope problem |
| Present | Present | Another scope still has it |
| Present | Absent | Removed 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.