Blog Network

Anthropic · 2026-11-17 · notable

Claude Code 2.1.327 — MCP tokens off the command line, safer worktrees

Claude Code 2.1.327 reads MCP server JSON from stdin so tokens stay off the command line, lists broken config files in /status, and asks before ExitWorktree removes a worktree that may hold unsaved work.

Claude Code repository card on GitHub

Claude Code 2.1.327 keeps MCP tokens out of shell history and fixes a Remote Control bug that deleted .env files.

What is it?

A new `claude mcp add-json <name> -` form in Claude Code 2.1.327 reads an MCP server's JSON from stdin, so tokens no longer have to sit on the command line. /status now lists broken agent, skill, command and output-style files, keybinding errors, an unavailable sandbox and hook matchers that never match.

How does it work?

The release also fixes data-loss bugs: stopping a Remote Control server in worktree mode could delete a running session's git-ignored files such as .env, and project-scope `claude mcp add` / `remove` could delete other top-level keys from .mcp.json. ExitWorktree now asks before removing a worktree that may hold unsaved work, and auto mode ignores more allow rules that run any package, such as `Bash(pnpm dlx *)`.

Why does it matter?

Teams that script MCP setup can stop leaking tokens into shell history, and anyone using worktrees or Remote Control is protected from losing local files. Some commands that ran before may now ask for permission, because path checks and the outside-working-directory rules got stricter.

Who is it for?

Claude Code users and admins who manage its settings

Try it

npm i -g @anthropic-ai/[email protected]

Sources

Tags

  • claude-code
  • anthropic
  • coding-agent
  • cli
  • mcp
  • worktrees
  • permissions
  • auto-mode
  • remote-control
  • vscode
  • developer-tools
  • release

← All releases