mcp-cli call fails with 'command not found' when tool argument contains a slash (server/tool)

Resolved 💬 3 comments Opened Feb 18, 2026 by tfriedel Closed Mar 19, 2026

Description

mcp-cli call fails with command not found when the tool argument contains a / (e.g., screenpipe/search-content). All other mcp-cli subcommands work fine.

mcp-cli is a shell alias:

mcp-cli: aliased to /home/thomas/.local/share/claude/versions/2.1.45 --mcp-cli

Configuration

ENABLE_EXPERIMENTAL_MCP_CLI=true

Root Cause

The server/tool argument containing a forward slash (/) causes zsh to fail alias resolution. This is not an intermittent alias loading issue — the alias is always present, but zsh chokes specifically when the command line includes a / in the argument to mcp-cli call.

Reliable Reproduction

# These ALL work:
mcp-cli info screenpipe/search-content    # ✅ works
mcp-cli tools                             # ✅ works  
mcp-cli servers                           # ✅ works
mcp-cli read screenpipe/"Current Context" # ✅ works
mcp-cli call screenpipe                   # ✅ works (missing arg error)

# These ALL fail — the common factor is server/tool with a /:
mcp-cli call screenpipe/search-content '{"limit": 1}'     # ❌ command not found
mcp-cli call screenpipe/search-content test                # ❌ command not found
mcp-cli call context7/resolve-library-id test              # ❌ command not found
mcp-cli call screenpipe/export-video test                  # ❌ command not found

Note: mcp-cli read screenpipe/"Current Context" works despite having a /, and mcp-cli info screenpipe/search-content also works. So it may be specific to the call subcommand + / combination, or info/read are intercepted before reaching the shell.

Silent Failure

Without 2>&1, the Bash tool reports "Tool ran without output or errors" instead of showing the zsh:1: command not found: mcp-cli error on stderr. This makes it look like the MCP server returned empty results — extremely misleading.

Impact

  • mcp-cli call is the primary way to invoke MCP tools via the Bash tool, and it's completely broken
  • The system prompt instructs Claude to use mcp-cli call server/tool '{json}' — this path never works
  • Claude tells users "the MCP returned no results" when the command never ran
  • All MCP servers are affected (screenpipe, context7, figma, terraform all tested)

Suggested Fix

Make mcp-cli a real binary or symlink on $PATH rather than a shell alias, so zsh argument parsing doesn't interfere with alias resolution.

Environment

  • Claude Code v2.1.45
  • Platform: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
  • User shell: /usr/bin/fish
  • Bash tool shell: zsh

View original on GitHub ↗

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