Regression: --mcp-cli flag removed in 2.1.x, breaks all external MCP tool calls

Resolved 💬 2 comments Opened Feb 23, 2026 by MyronKoch Closed Mar 23, 2026

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-cli in 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:

  1. 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.
  1. The mcp-cli alias referenced in Claude Code's own system prompt — Claude Code agents are instructed to use mcp-cli info before mcp-cli call, but the underlying command no longer exists.
  1. 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.
  1. 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 replacement
  • claude --mcp-cli call <server>/<tool> '<json>' → no replacement
  • claude --mcp-cli tools [server] → no replacement
  • claude --mcp-cli serversclaude mcp list (this one survived)

Expected behavior

Either:

  1. Restore --mcp-cli or provide an equivalent subcommand (claude mcp call, claude mcp tools, etc.)
  2. 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

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗