Key Updates in Claude Code v2.1.327 - Standard Input Support for MCP Configuration and Stricter Permission Checks

Key Updates in Claude Code v2.1.327 - Standard Input Support for MCP Configuration and Stricter Permission Checks

An overview of the Claude Code v2.1.327 update. claude mcp add-json can now read JSON from stdin, so you can register MCP servers without putting tokens on the command line. Also covers behavior changes like /status listing broken config files and stricter permission checks.
2026.11.18

This page has been translated by machine translation. View original

I'm Ishikawa from the Cloud Business Division. This post introduces the update to Claude Code v2.1.327 (2026-11-17). There are more ways to register MCP servers, and some changes alter behavior if you keep your current settings as they are. This time, I confirmed that claude mcp add-json can register an MCP server by passing JSON through standard input.

The previous update article is here.

https://dev.classmethod.jp/articles/20261117-cc-updates-v2-1-326/

Update Summary

The v2.1.327 CHANGELOG contains 173 entries. In this article's classification, they break down into 99 fixes, 20 improvements, 18 security items, 10 developer experience items, 10 performance items, 8 new features, 6 breaking changes, 1 deprecation, and 1 internal change. Many items concern permission checks, and the changes include more confirmations or denials for reads outside the working directory, auto mode allow rules, and so on. Fixes for bugs that unintentionally deleted files or settings keys are also included.

Code Mode has been getting a lot of attention over the past few days, and the official Claude Code X account has introduced it as well.

https://x.com/ClaudeDevs/status/2122801681939234950

In my own previous blog post, I tried Code Mode with agent teams left enabled, so please take a look if you're interested.

Notable Updates

claude mcp add-json can now read JSON from standard input

If you pass - instead of JSON, as in claude mcp add-json <name> -, the MCP server JSON is now read from standard input. You can register an MCP server without writing the token on the command line. It cannot be used inside a Claude Code session.

If you distribute MCP server settings via scripts, or don't want tokens left in your shell history, consider switching to registration via standard input.

/status now lists broken configuration files and settings that have no effect

/status now displays a list of broken agent, skill, command, and output style files, keybinding errors, unavailable sandboxes, ignored permission settings, and hook matchers that never match.

If you write your own skills or hooks, I think it's a good idea to open /status once after updating and check for broken files or settings that have no effect.

Fixed bugs that deleted files such as .env and keys in .mcp.json

The following 3 bugs were fixed.

  • When the server was stopped in Remote Control's worktree mode, Git-ignored files (such as .env) of the running session were deleted
  • A self-hosted runner with --use-anthropic-git-proxy deleted a non-empty directory specified by GIT_CONFIG_GLOBAL at startup. The runner now leaves the directory in place, ignores the variable, and shows a warning
  • Project-scope claude mcp add and claude mcp remove deleted other top-level keys in .mcp.json (such as $schema or other tools' servers)

If you use Remote Control's worktree mode, a self-hosted runner with --use-anthropic-git-proxy, or a project-scope .mcp.json, I think it's worth updating soon.

Path checks now reject some symbolic links. In addition, the check for what counts as inside the working directory has changed, and permission confirmation is now requested for some paths.

When permissions.blockReadsOutsideWorkingDirectories is enabled, more Bash commands are subject to confirmation in bypass permissions mode and auto mode, and some are denied in auto mode. Among Bash commands that specify paths under Read or Edit deny rules, some that previously asked for confirmation are now denied. The CHANGELOG does not state the conditions for which symbolic links or paths are affected.

If you have enabled permissions.blockReadsOutsideWorkingDirectories, or handle files outside the working directory via symbolic links, I think it's a good idea to check after updating whether confirmations or denials have increased.

Faster first Bash command in a session and execution of shell startup files

The first Bash command in a session is now faster. As a side effect, shell startup files may be executed before that command is approved, and may be executed even if you deny the command. Setting CLAUDE_CODE_DISABLE_SHELL_HEAD_START=1 turns this behavior off.

If you have processing with side effects, such as writing files, in startup files like .zshrc, I think it's a good idea to be aware of this behavior and set CLAUDE_CODE_DISABLE_SHELL_HEAD_START=1 as needed.

Claude in Chrome now refuses to upload some credential files

Claude in Chrome now refuses to upload some credential files. You attach those files to the page yourself. The CHANGELOG does not state which files are affected.

If you leave attaching files to pages to Claude in Chrome, I think it's a good idea to revisit your procedures on the assumption that you attach credential files yourself.

Update Details

New Features

Besides the standard input support for claude mcp add-json and the /status list introduced in the notable updates, the following features were added.

  • /install-github-app now asks for confirmation before modifying the repository
  • /config now shows a note on rows that are overridden by other settings
  • The attributionProject setting lets you specify the name of the session's billing group. This is for the Claude apps gateway with admin.billing_group_tag set
  • x-claude-code-managed-settings-checksum was added to the hint headers for gateways. It is sent in environments where CLAUDE_CODE_GATEWAY_HINT_HEADERS=1 is set in managed settings
  • /tui classic was added as a name for the non-fullscreen renderer. /tui default can still be used

New features of the VS Code extension are introduced in "VS Code Extension".

Security

In addition to the items introduced in the notable updates, there are the following changes and fixes.

  • Bash commands whose variable expansion produces very long text are now denied. You are guided to use a short value or a file
  • In the PowerShell tool, one more command now asks for confirmation even when a rule specifies that command. If there is no response, it is denied unless allowed by a tool-wide rule, auto mode, or bypass permissions mode. The CHANGELOG does not state which command is affected
  • A subagent resumed by a sibling subagent's message now follows the session's permission settings. It may ask for confirmation, or be denied in situations where no one can respond
  • A bug with some --disallowedTools rules containing parentheses was fixed
  • Claude is now instructed not to commit files likely to contain secrets when committing with new models and PowerShell
  • MCP server logs now record only the mode, action, and field names instead of the full content of elicitation requests and hook responses
  • In Anthropic-hosted cloud sessions, the range in which repository flags and plugin distribution settings are ignored has expanded. The repository's CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC is treated as at most equivalent to DISABLE_TELEMETRY
  • "don't ask again" is no longer shown in the confirmation for publishing an Artifact inside a subagent, or after background task results, other people's messages, or compaction
  • There are also other changes, such as the conditions for denying Artifacts in organizations that require approval for each new Artifact, denying the Artifact tool when Artifacts are turned off in settings, deny rule precedence in claude plugin eval, and notifying Claude that a command excluded from the sandbox remained inside the sandbox

Improvements

  • For unrecognized models, long responses cut off at 32,000 output tokens now continue with a limit of 128,000 tokens
  • In Amazon Bedrock, Google Vertex AI, and Microsoft Foundry terminal sessions, subagent progress summaries are now generated from short notes instead of the whole conversation, significantly reducing the tokens used
  • A subagent launched without specifying a model now stays on its launch-time model when resumed (including after /model)
  • Code Mode no longer refuses to start even if a mod that hooks tool calls is installed. Administrators can keep Code Mode turned off in managed settings
  • In many permission prompts, the arrow keys now stop at No instead of wrapping around. Pressing a number greater than the last option moves to No
  • On Windows, the PowerShell tool is up to about 0.5 seconds faster per command. Startup time in environments where Git Bash and pwsh are not on the PATH was also improved, and powershell.exe in System32 now takes priority over a powershell.exe found earlier on the PATH
  • There are also improvements and changes to the scope of transcript search (edits and written files), a reduction in git commands run before the first request in non-interactive (-p) mode, the layout of the MCP server page in /mcp, display in narrow terminals, and the operation of /install-github-app and /desktop. In the lists of /mcp, /sandbox, and many /config values, numbers are no longer shown outside screen reader mode, and you operate them with the arrow keys and Enter

Fixes

In addition to the 3 items introduced in the notable updates, the main fixes are as follows.

  • Fixed an issue where /export overwrote an existing file without confirmation. It now asks for confirmation in a dialog, and /export <name> leaves the file in place and guides you to run /export
  • Fixed an issue where, if compaction ran immediately after a response cut off by the output token limit, that response's tool calls and results were lost
  • Fixed an issue where changes to settings from /config and elsewhere failed to save without a warning. A line saying the save failed is now shown below the prompt
  • Fixed an issue where agents passed with --agents were lost after plugins were loaded or reloaded
  • Fixed an issue where Claude Code failed to start when https_proxy or HTTPS_PROXY was in host:port format and neither input nor output was a terminal (desktop app, SDK, cron)
  • Fixed an issue where claude -p stalled before the first request when fetching the model configuration hung, for example because of a proxy. It now continues without the configuration after 10 seconds
  • Fixed an issue where remote MCP servers stayed disconnected after a longer outage such as a VPN disconnection. Many servers on other machines connected by hostname and https are now retried in the background for about 1 day
  • Fixed an issue where, after compaction, Edit rejected files outside the project that had been fully read and not modified with "File has not been read yet"
  • Fixed an issue where Grep results were duplicated or missing when paging with head_limit and offset. Content and count results are now sorted by file path
  • Fixed an issue where in-process agent teammates running on a different model from the leader compacted using the leader's context limit and the wrong model. They now use their own limit and model (and that model's pricing)
  • Fixed an issue where nothing was displayed when hooks failed for SubagentStop of background agents, SessionEnd on /clear and /resume, and CwdChanged and FileChanged in fullscreen
  • Fixed an issue where setting an LLM gateway in ANTHROPIC_BASE_URL in the project's .claude/settings.json caused /model to list the wrong models in some terminal sessions
  • Many other small bugs were also fixed, including session resumption and message saving, background agent and Remote Control notifications, terminal display (Ghostty, tmux, Windows Terminal, and others), operation of screens such as /plugin, /mcp, and /resume, and Artifact publishing and approval

VS Code Extension

  • "Claude Code: Add to Chat" was added to the Explorer right-click menu. It @-mentions the selected files or folders in the chat
  • In large workspaces where rg is on the PATH, file search for @ mentions is faster. The ranking of results is closer to the terminal's, and tolerance for typos is lower
  • Chat edit diffs now stay open and keep asking for approval even when a terminal session in the same window sent the prompt
  • Unused tools (openFile, saveDocument, getOpenEditors, and others) were removed from the IDE connection
  • There are also fixes such as the reason not appearing in the permission prompt when a PreToolUse hook asks for confirmation (anthropics/claude-code#85950), long names being cut off in permission prompt titles, and closing a popup with Escape also stopping Claude's response, along with speed improvements for consecutive edits and startup

Breaking Changes and Deprecations

In this article, changes that alter the outcome of existing settings, commands, or operations and may require action are treated as breaking changes (the CHANGELOG has no "breaking change" category). The configuration and command examples below were created based on the CHANGELOG's descriptions.

Expanded allow rules ignored in auto mode

Before (up to v2.1.326): allow rules like the following were not subject to being ignored even in auto mode. The following is a configuration example (~/.claude/settings.json).

{
  "permissions": {
    "defaultMode": "auto",
    "allow": ["Bash(pnpm dlx *)", "Bash(/usr/bin/npm run:*)"]
  }
}

After (v2.1.327 onward): even with the same configuration, in auto mode, rules that run arbitrary packages (such as Bash(pnpm dlx *)) and forms that include the path or version of rules that were already ignored (/usr/bin/npm run:*) are ignored and judged by the safety check. According to the official documentation (permission-modes), rules dropped in auto mode are restored when you leave auto mode.

Worktree deletion via ExitWorktree

Before (up to v2.1.326): ExitWorktree did not ask for confirmation before deleting a worktree that might contain unsaved work. The following is a configuration example.

{
  "permissions": {
    "defaultMode": "dontAsk"
  }
}

After (v2.1.327 onward): it asks for confirmation before deletion. In don't-ask mode or when no one can respond, this deletion is denied unless allowed by an allow rule, auto mode, or bypass permissions mode. The following is a configuration example for allowing it with an allow rule (the rule syntax is an example).

{
  "permissions": {
    "defaultMode": "dontAsk",
    "allow": ["ExitWorktree"]
  }
}

claude mcp add --scope project on a .mcp.json without an mcpServers key

Before (up to v2.1.326): if .mcp.json listed servers at the top level without an mcpServers key, claude mcp add --scope project overwrote the file. The following are examples of the .mcp.json and the command (the values are from the examples in the official documentation (MCP)).

{
  "weather-api": {
    "type": "http",
    "url": "https://api.weather.com/mcp"
  }
}
% claude mcp add --scope project --transport http notion https://mcp.notion.com/mcp

After (v2.1.327 onward): for the same .mcp.json, claude mcp add --scope project stops without overwriting the file. In the .mcp.json format in the official documentation (MCP), servers are placed under mcpServers.

{
  "mcpServers": {
    "weather-api": {
      "type": "http",
      "url": "https://api.weather.com/mcp"
    }
  }
}

--worktree and a relative-path --add-dir

Before (up to v2.1.326): when you specified a folder next to the launch folder as a relative path in --add-dir, the Bash sandbox was given the folder next to the worktree. The following is a command example (the folder names are placeholders).

% cd ~/work/app
% claude --worktree feature-x --add-dir ../shared

After (v2.1.327 onward): with the same command, the Bash sandbox is given ~/work/shared, which is next to the launch folder (~/work/app).

Also, in some launches where a relative path pointing above the launch folder, such as .., is specified in --add-dir, the Bash sandbox and --bg sessions are now given only the worktree. The CHANGELOG does not state which launches are affected.

% cd ~/work/app
% claude --worktree feature-x --add-dir ..

Nested claude and CLAUDE_CODE_OAUTH_SCOPES

Before (up to v2.1.326): a nested claude with its own token could be rejected by forceLoginOrgUUID. Also, the session's CLAUDE_CODE_OAUTH_SCOPES was passed even to commands that do not receive the session's token.

After (v2.1.327 onward): this issue was fixed, and CLAUDE_CODE_OAUTH_SCOPES is no longer passed to commands that do not receive the session's token. Set it individually for the commands that need it. The following is an example (the scopes and command are placeholders).

% CLAUDE_CODE_OAUTH_SCOPES="<必要なスコープ>" <コマンド>

Deprecation: fallback to billed classifier requests in auto mode

The notification shown when auto mode falls back to billed classifier requests now indicates that this fallback will be removed in a future release. After removal, each operation that would have been checked by this fallback will be subject to confirmation or denial.

According to the official documentation (permission-modes), this fallback is used in sessions where auto mode review is not performed on the server side, such as when an LLM gateway or proxy drops review requests or results, and the notification is shown for accounts where classifier requests are billed.

Timing Auto mode judgment in sessions without server-side review
v2.1.327 Judged by Claude Code's own classifier requests (per the official documentation). The notification shown for billed accounts indicates that the fallback will be removed in a future release
After removal Each operation that would have been checked by the fallback is subject to confirmation or denial

List of changes that alter behavior

This is a list of the 6 items treated as breaking changes and the 1 deprecation, plus the items classified under security and fixes that change behavior. Items for which the CHANGELOG does not describe the previous behavior are marked "—".

Target Before After / Required action
Auto mode allow rules that run arbitrary packages (such as Bash(pnpm dlx *)) and forms that include the path or version of rules that were already ignored (/usr/bin/npm run:*) Not subject to being ignored Ignored and judged by the safety check
Deletion by ExitWorktree of a worktree that might contain unsaved work Does not ask for confirmation Asks for confirmation. In don't-ask mode or when no one can respond, it is denied unless allowed by an allow rule, auto mode, or bypass permissions mode
claude mcp add --scope project on a .mcp.json without an mcpServers key Overwrote the file Stops without overwriting
--worktree with a relative-path --add-dir pointing to a folder next to the launch folder The folder next to the worktree The folder next to the launch folder
--worktree with a relative-path --add-dir pointing above the launch folder, such as .. (some launches) — The Bash sandbox and --bg sessions are given only the worktree
CLAUDE_CODE_OAUTH_SCOPES for commands that do not receive the session's token Was passed Not passed. Set it individually for commands that need it
Some symbolic links in path checks — Denied
Check for what counts as inside the working directory — Permission confirmation is requested for some paths
Bash commands when permissions.blockReadsOutsideWorkingDirectories is enabled — More are subject to confirmation in bypass permissions mode and auto mode, and some are denied in auto mode. Some of those specifying paths under Read/Edit deny rules change from confirmation to denial
Bash commands whose variable expansion produces very long text — Denied. Use a short value or a file
One command in the PowerShell tool — Asks for confirmation even when a rule specifies that command. If there is no response, it is denied unless allowed by a tool-wide rule, auto mode, or bypass permissions mode
Subagent resumed by a sibling subagent's message — Follows the session's permission settings. It may ask for confirmation, or be denied in situations where no one can respond
The repository's CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC in Anthropic-hosted cloud sessions — Treated as at most equivalent to DISABLE_TELEMETRY
Upload of some credential files in Claude in Chrome — Denied. Attach them to the page yourself
WebFetch URLs longer than 2,000 characters — Denied before the permission prompt
Messages containing a large number of @ mentions — Only the first 100 are referenced as files
When a mod's $.model.complete or $.model.classify call reaches the usage limit The turn stopped The API error is received immediately. Handle the error on the mod side
Fallback to billed classifier requests in auto mode (deprecated) — Scheduled for removal in a future release. After removal, subject to confirmation or denial

Trying standard input support for claude mcp add-json

I checked the standard input support of claude mcp add-json by viewing the help and by running it outside and inside a Claude Code session.

Test environment

The test environment is macOS (Darwin 25.6.0, arm64) with Claude Code v2.1.327.

% claude --version
2.1.327 (Claude Code)

Checking the help

% claude mcp add-json --help
Usage: claude mcp add-json [options] <name> <json>

Add an MCP server (stdio, SSE, HTTP, or WebSocket) with a JSON string, or - to
read it from stdin

Options:
  --client-secret      Prompt for OAuth client secret (or set MCP_CLIENT_SECRET
                       env var)
  -h, --help           Display help for command
  -s, --scope <scope>  Configuration scope (local, user, or project) (default:
                       "local")

The description says "or - to read it from stdin", and passing - in the position of <json> reads the JSON from standard input. With the --scope option, you can specify local (default), user, or project.

Note that, at the time of writing, the examples under "Add MCP servers from JSON configuration" in the official documentation (MCP) only showed passing the JSON as an argument.

Registering via standard input outside a session

Because the CHANGELOG says it cannot be used inside a Claude Code session, I ran it in a terminal where Claude Code was not running. I created a folder for testing and created server.json using the values from the example in the official documentation (MCP). The token value (Bearer token) is a dummy from the documentation.

% mkdir mcp-stdin-test && cd mcp-stdin-test
% printf '%s\n' '{"type":"http","url":"https://api.weather.com/mcp","headers":{"Authorization":"Bearer token"}}' > server.json

This time I created server.json with printf, so this command contains the token. If you use registration via standard input to avoid leaving the token in your shell history, prepare the file in a way that does not write the token on the command line, such as creating it in an editor.

Specify - in the position of <json> and pass the contents of server.json via standard input.

% claude mcp add-json --scope project weather-api - < server.json
✔ Added http MCP server weather-api to project config
% cat .mcp.json
{
  "mcpServers": {
    "weather-api": {
      "type": "http",
      "url": "https://api.weather.com/mcp",
      "headers": {
        "Authorization": "Bearer token"
      }
    }
  }
}

The registration succeeded, and the content passed via standard input was written under mcpServers in the folder's .mcp.json. The value of headers is also saved as-is in .mcp.json.

Next, I removed the registered server.

% claude mcp remove --scope project weather-api
✔ Removed MCP server weather-api from project config
File modified: ~/workspaces/cc/blog/20261118-v2.1.327/mcp-stdin-test/.mcp.json
% cat .mcp.json
{
  "mcpServers": {}
}

An empty mcpServers remained in .mcp.json after removal. Since I did not add other top-level keys such as $schema this time, I did not verify the fix in v2.1.327 for the issue where other top-level keys were deleted.

Running it inside a Claude Code session

For reference, I ran the same registration command inside a Claude Code session (from the Bash that Claude runs). As stated in the CHANGELOG, it was refused, and the exit code was 1. .mcp.json was not created.

% claude mcp add-json --scope project weather-api - < server.json
Reading the JSON from stdin is refused inside a Claude Code session, because its permission prompt would not show the server. Run the command outside the session.

According to the message, reading from standard input is refused inside a session because the permission prompt would not show the server.

From the help description, I confirmed that passing - instead of JSON reads from standard input. Since JSON containing a token can be passed from a file via standard input, I think this is a convenient change for those who don't want to leave tokens in their shell history.

Conclusion

Most of the 173 entries in v2.1.327 are fixes, but I think the release includes changes that increase confirmations and denials in permission checks, such as the working directory check, symbolic links, and auto mode allow rules. If you use it for unattended runs or CI, I think it's a good idea to check its behavior once after updating and review any necessary allow rules and settings.

Why not check your permission settings, then update and give it a try?

References

https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

https://code.claude.com/docs/en/changelog

https://code.claude.com/docs/en/mcp

https://code.claude.com/docs/en/permission-modes

https://dev.classmethod.jp/articles/20261117-cc-updates-v2-1-326/


Claudeならクラスメソッドにお任せください

クラスメソッドは、Anthropic社とリセラー契約を締結しています。各種製品ガイドから、業種別の活用法、フェーズごとのお悩み解決などサービス支援ページにまとめております。まずはご覧いただき、お気軽にご相談ください。

サービス詳細を見る

Share this article

AI白書