Claude Code v2.1.186 release on GitHub showing the MCP login changelog entry Image: GitHub / anthropics/claude-code
by Michael Joiner

Claude Code 2.1.186: MCP Login from the CLI, Shell Commands That Auto-Invoke Claude, and 24 Bug Fixes

The June 22 release adds claude mcp login/logout commands for authenticating MCP servers without the interactive menu, makes ! shell commands automatically trigger a Claude response, and adds workflow status filtering and a Skills section to the plugin tab.

Share

Claude Code 2.1.186 shipped last night with five new features and a long list of bug fixes. The headlining change is CLI-based MCP server authentication, but there’s also a behavior change to shell commands that’s worth knowing about.

MCP Authentication Without the Menu

Until now, authenticating an MCP server that requires OAuth meant going through the interactive /mcp menu. For SSH sessions or headless environments, that flow was awkward or blocked entirely.

2.1.186 adds two new commands:

claude mcp login <name>
claude mcp logout <name>

Both take the server name as configured in your MCP settings. login opens the OAuth flow — or, with --no-browser, redirects the flow through stdin so you can complete it over SSH without a browser. logout clears the stored credentials for that server.

There’s also a related improvement: claude mcp get and claude mcp remove now suggest the closest configured server name when you mistype one, and truncate long server lists so the output doesn’t overflow your terminal.

Shell Commands Now Trigger a Response

When you prefix a command with ! in Claude Code, it runs in the shell and adds the output to context. Previously, that was all it did. You’d have to prompt Claude separately to do something with the output.

Starting in 2.1.186, ! commands automatically trigger Claude to respond to whatever the shell returned. If you run ! git log --oneline -10, Claude will now comment on those commits without you asking.

If you want the old behavior back — shell output added to context but no automatic response — set "respondToBashCommands": false in your settings.json.

Workflows and Plugin UI Changes

The /workflows agent detail view now supports status filtering. Press f to filter by agent status — running, completed, blocked. In sessions with many parallel agents, this makes the view a lot more navigable.

The /plugin Installed tab gets a “Skills” section. Previously it showed installed plugins but you had to dig elsewhere to see what skills each one provided. Now they’re listed directly.

There’s also a new teammateMode: "iterm2" setting. If you’re using auto mode with the iTerm2 backend, Claude Code will now warn you if it can’t find the it2 CLI instead of silently failing.

Bug Fixes Worth Noting

The release closes 24 bugs. A few that come up regularly:

  • Streaming requests would sometimes fail with “Content block not found” or JSON parse errors when the machine woke from sleep. That’s fixed.
  • Background session recaps were being duplicated, showing the agent’s summary twice. Fixed.
  • Subagent transcript scroll position was bleeding into the main transcript when you exited a background agent. Fixed.
  • Agent(type) deny rules and Agent(x,y) allowed-types restrictions weren’t being enforced for named subagent spawns. Fixed — this was a meaningful safety gap.
  • Esc and Ctrl+C weren’t responding while background agents were still running after the main turn ended. Fixed.
  • Workflow agent({schema}) subagents were looping forever on repeated schema validation failures instead of aborting. Now they stop after 5 attempts.

The full list is in the release notes linked below.

Claude Code 2.1.186 is available via npm install -g @anthropic-ai/claude-code or claude update.

Source: Claude Code v2.1.186 release notes

Share

The Weekly Diff

One email a week: every AI coding tool price change, plan restructure, and major release we verified, with sources. No filler.

Free. Unsubscribe anytime.