Claude Code 2.1.327 Protects MCP Config

By Rogier Muller11.18.26
Claude Code 2.1.327 Protects MCP Config

claude mcp add --scope project now stops when .mcp.json lists servers at the top level with no mcpServers key, instead of overwriting the file. In Claude Code 2.1.327, that small refusal says a lot about the release: it protects existing configuration and gives Claude Code MCP setup a safer path for secrets with claude mcp add-json -.

Question Answer
Who must act Admins who manage settings and developers who edit project-scope MCP config should check this release.
What changes for them Claude Code now refuses or asks in more cases around MCP config, permissions, worktrees, artifacts, and shell commands.
Who can skip Users unaffected by MCP config or worktree cleanup can mostly treat it as a reliability release.

Read the refusal as file safety

The project-scope MCP change is narrow and useful. If .mcp.json has servers at the top level and no mcpServers key, claude mcp add --scope project stops rather than rewriting the file into a shape it assumes is correct.

That matters in repos where more than one tool reads the same JSON. The release also fixes claude mcp add and claude mcp remove with project scope deleting other top-level keys from .mcp.json, such as $schema or another tool’s servers.

This follows the same direction as Claude Code 2.1.325 Tightens Permission Prompts: fewer silent changes, more explicit stops. For Team conventions, that is a good default because shared config should fail loudly when its shape is unclear.

Rolling this out in your team?

We train engineering teams on their own codebase in two days. Claude Code setup, shared rules and review included.

Put secret-bearing MCP JSON on stdin

The new claude mcp add-json - command reads the server JSON from stdin. The release note calls out the reason directly: tokens can stay off the command line.

That replaces the weaker habit of passing secret-bearing JSON as an argument where shell history, process listings, or logs may capture more than intended. The limit is important too: this command is not available inside a Claude Code session, so use it from the shell.

This is the most practical Claude Code MCP change in the release. It does not make an unsafe server safe, but it removes one avoidable leak path during setup.

Check status before trusting a session

/status now lists broken project files and environment problems that used to be easier to miss. The changelog names broken agent or skill files, keybinding errors, ignored permission settings, unavailable sandbox state, and hook matchers that never match.

/config also adds a note when other settings override a row. That is small, but it helps explain why a setting visible in one place does not win at runtime.

This belongs to Review in our methodology: verify what Claude Code is actually running with before asking it to modify a repo. The point is not to add ceremony, just to catch stale assumptions before they become tool behavior.

Know which prompts got stricter

Claude Code 2.1.327 is not only an MCP release. It changes several boundaries where the safe answer is to ask or refuse.

Area New behavior Practical limit
Worktrees ExitWorktree asks before removing a worktree that may hold unsaved work. In don't-ask mode, or with nobody to answer, removal is refused unless an allow rule, auto mode, or bypass permissions mode allows it.
Project paths More symbolic links and paths outside the working directory now trigger refusal or permission checks. Existing scripts that relied on loose path checks may ask more often.
Package runners Auto mode ignores more allow rules that run any package, such as Bash(pnpm dlx *). The safety check decides those actions instead of trusting a broad allow rule.
Background and subagents A subagent resumed by a sibling’s message follows the session’s permission settings. It may now ask, or be refused where nobody can answer.

The cost is more friction in a few flows. The gain is that Claude Code is less likely to treat a broad rule or an unattended worker as permission to do something destructive.

Try it safely in one repo

Use this small check when an existing repo already has MCP config. It is scoped to one repo because the release focuses on concrete file behavior instead of a wide process change.

[ ] Inspect .mcp.json and confirm whether servers live under mcpServers before running project-scope MCP commands.
[ ] Move secret-bearing server JSON through stdin with claude mcp add-json - from a shell, since it is not available inside a Claude Code session.
[ ] Run /status and /config after the change, then fix broken files or overridden settings before resuming work.

Further reading

Next step

Pick one repo with .mcp.json and run the three-line check above before the next project-scope MCP edit.

Train your team on Claude Code

Two days on your team's own repository, onsite or remote, with a written proposal before you commit.

Book a call

Prefer to measure first? Take the free team check.