computer-use MCP broken in CLI 2.1.92: native module path hardcoded to CI build machine
Summary
The --computer-use-mcp flag in Claude Code CLI 2.1.92 (installed via npm) fails to start because the native module path is hardcoded to the CI build machine's absolute path.
Error
Error: Cannot find module '/home/runner/code/tmp/claude-cli-external-build-2201/node_modules/@ant/computer-use-swift/prebuilds/computer_use.node'
Require stack:
- /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js
Steps to Reproduce
- Install Claude Code via npm:
npm install -g @anthropic-ai/claude-code - Run the MCP server:
node $(npm root -g)/@anthropic-ai/claude-code/cli.js --computer-use-mcp - Observe crash with
MODULE_NOT_FOUNDat the CI runner absolute path above
Root Cause
The bundled cli.js contains an absolute path to @ant/computer-use-swift that points to the CI build machine (/home/runner/code/tmp/claude-cli-external-build-2201/...). This path does not exist on end-user machines and the package is not included in the npm distribution.
The desktop app ships the binary under a different package name (@ant/claude-swift) and path (build/Release/computer_use.node vs prebuilds/computer_use.node), so it works there but not in the CLI.
Environment
- Claude Code version: 2.1.92
- Install method: npm global (
npm install -g @anthropic-ai/claude-code) - OS: macOS (Darwin 24.4.0, Apple Silicon)
- Node: /opt/homebrew/Cellar/node@22/22.22.1_3/bin/node
Impact
Computer-use MCP is completely non-functional in the npm CLI distribution. The @ant/computer-use-swift package is absent from the install and its path is baked in as a CI absolute path.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗