Regression: --mcp-cli flag removed in 2.1.x, breaks all external MCP tool calls
Summary
The --mcp-cli flag (used as claude --mcp-cli call <server>/<tool> '<json>', claude --mcp-cli info <server>/<tool>, etc.) has been completely removed from the Claude Code binary. This was the only documented interface for external scripts, hooks, and automation to call MCP tools programmatically.
Version
- Current: 2.1.50 — flag is missing, zero occurrences of
mcp-cliin the binary - Previously working: was functional in earlier 2.x releases (exact removal version unknown)
Evidence
# The alias that previously worked:
$ claude --mcp-cli call backchannel/get_my_identity '{}'
error: unknown option '--mcp-cli'
# Confirmed: literal string "mcp-cli" does not exist in the binary
$ grep -c 'mcp-cli' /path/to/claude-code/cli.js
0
# The 'mcp' subcommand exists but only for configuration, not tool calls:
$ claude mcp --help
# Shows: add, remove, list, get, serve — no 'call', 'info', or 'tools' commands
What broke
The --mcp-cli interface was the bridge between Claude Code's internal MCP server connections and external tooling. Without it, the following are all broken:
- Hooks that call MCP tools — e.g., session startup hooks that register identity with coordination servers, check inboxes, send heartbeats. These hooks use
execFileSync(claude, ['--mcp-cli', 'call', ...])and now silently fail.
- The
mcp-clialias referenced in Claude Code's own system prompt — Claude Code agents are instructed to usemcp-cli infobeforemcp-cli call, but the underlying command no longer exists.
- Multi-agent coordination — any MCP-based agent coordination (backchannel servers, shared state, message passing) that relied on hooks or scripts calling MCP tools is dead.
- Automation scripts — any CI/CD, cron, or orchestration scripts that called MCP tools via
--mcp-cli.
The gap
The mcp subcommand still exists but only supports server configuration (add/remove/list). There is no replacement for the tool calling functionality that --mcp-cli provided:
claude --mcp-cli info <server>/<tool>→ no replacementclaude --mcp-cli call <server>/<tool> '<json>'→ no replacementclaude --mcp-cli tools [server]→ no replacementclaude --mcp-cli servers→claude mcp list(this one survived)
Expected behavior
Either:
- Restore
--mcp-clior provide an equivalent subcommand (claude mcp call,claude mcp tools, etc.) - Document the removal and provide a migration path for existing hooks and scripts
Workaround
Currently none that preserves the MCP session identity. Direct HTTP/stdio calls to MCP servers create new sessions with different identity than the one Claude Code's internal MCP client uses, causing coordination issues (messages go to wrong session, identity mismatch, etc.).
Environment
- macOS 15 (Darwin 25.2.0)
- Claude Code 2.1.50
- Node v22.18.0
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗