Claude Code 2.1.327 keeps MCP tokens off the command line and guards worktrees

Claude Code 2.1.327, dated 17 November 2026, adds stdin input for MCP server JSON and asks before removing worktrees. Teams that script MCP setup or use worktrees should check.

what changed

Claude Code 2.1.327 was listed on 17 November 2026. These are the changes that matter most for teams:

  • claude mcp add-json <name> - reads the server JSON from stdin, so a token does not have to sit on the command line. It does not work inside a Claude Code session.
  • claude mcp add --scope project now stops instead of overwriting .mcp.json when that file lists servers at the top level with no mcpServers key. Project-scope add and remove no longer delete other top-level keys in that file.
  • ExitWorktree asks before it removes a worktree that may hold unsaved work.
  • Stopping a server in worktree mode no longer deletes a running session’s git-ignored files, such as .env.
  • Auto mode ignores more broad allow rules, such as Bash(pnpm dlx *), and leaves those commands to the safety check.
  • /status lists broken agent, skill, command and output style files, and hook matchers that never match.
  • /install-github-app asks for confirmation before it changes a repository.

why it matters

Many teams add MCP servers from scripts. A token in a command line can end up in shell history and process lists. Reading it from stdin avoids that.

The .mcp.json fixes protect shared project config from being damaged by a script. The worktree changes protect unsaved work and local secrets. If we rely on broad allow rules in auto mode, some commands may now be checked again.

what we would do

  • Change our MCP setup scripts to pipe the server JSON in with add-json and -, and keep tokens in a secret store.
  • Run /status once on each shared repo and fix any broken skill or hook it lists.
  • Review our allow rules for broad patterns such as dlx runners, and replace them with narrow ones.
  • Check that no script of ours answers the worktree removal prompt automatically.

sources

Drafted with Claude from the linked sources, reviewed by us.