[BUG] Computer Use MCP: Cannot read properties of undefined (registerEscape / checkAccessibility)

Status Closed — not planned
Maintainer reply ✓ Yes — localden
Activity 8 comments · opened Mar 31, 2026 · closed May 5, 2026
💡 Likely answer: A maintainer (localden, collaborator) responded on this thread — see the highlighted reply below.

Description

Computer Use MCP shows as "connected" in /mcp but all tool calls fail with internal JavaScript errors.

Error Messages

screenshot tool:

Cannot read properties of undefined (reading 'registerEscape')

request_access tool:

Cannot read properties of undefined (reading 'checkAccessibility')

Environment

  • Claude Code version: 2.1.88
  • macOS version: 26.4 (25E246)
  • Node.js version: v22.17.0
  • Machine: MacBook Pro
  • Plan: Max (Computer Use should be available)

Permissions Verified

  • ✅ Accessibility: Claude + Terminal both enabled
  • ✅ Screen Recording: Claude + Terminal both enabled
  • ✅ Computer Use MCP status: "connected" (shown in /mcp)

Steps to Reproduce

  1. Open Claude Code CLI (v2.1.88)
  2. Run /mcp — Computer Use shows as connected
  3. Call screenshot tool → Error: Cannot read properties of undefined (reading 'registerEscape')
  4. Call request_access tool → Error: Cannot read properties of undefined (reading 'checkAccessibility')

What I've Tried

  • Restarting Claude Code multiple times
  • Reconnecting MCP via /mcp
  • Verifying all macOS permissions (Accessibility + Screen Recording)
  • Confirmed Node.js v22 (not v25 which has known issues)

Expected Behavior

request_access should show the permission dialog, and screenshot should capture the screen.

Actual Behavior

Both tools throw TypeError: Cannot read properties of undefined immediately, suggesting an internal object is not initialized despite the MCP connection being established.

View original on GitHub ↗

8 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/41118
  2. https://github.com/anthropics/claude-code/issues/41188
  3. https://github.com/anthropics/claude-code/issues/41190

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

lefeiren · 6 months ago

I got same issue!!

MarioLxd · 6 months ago

I got same issue!! +1

kljopu · 6 months ago

Got same issue !

linzzzzzz · 6 months ago

Same issue

fa7eem · 6 months ago

Workaround: Fix checkAccessibility error on macOS Tahoe (macOS 26)

Environment: macOS 26.3.1 (Tahoe), Apple Silicon (arm64), Node v22.14.0, Claude Code v2.1.92

Root cause: The computer_use.node native binary from the @ant/computer-use-swift package is not bundled with the npm-distributed Claude Code package. The bundled cli.js has a hardcoded __dirname pointing to a CI build path (/home/runner/code/tmp/claude-cli-external-build-2201/node_modules/@ant/computer-use-swift/js) that doesn't exist on end-user machines. This causes jh().tcc to be undefined, which then throws Cannot read properties of undefined (reading 'checkAccessibility').

Fix: The code supports an env var override. The native binary does ship inside the Claude desktop app. Point the CLI to it:

export COMPUTER_USE_SWIFT_NODE_PATH="/Applications/Claude.app/Contents/Resources/app.asar.unpacked/node_modules/@ant/claude-swift/build/Release/computer_use.node"

Add this to your ~/.zshrc (or ~/.bashrc) to make it permanent.

Verification:

node -e "const m = require('/Applications/Claude.app/Contents/Resources/app.asar.unpacked/node_modules/@ant/claude-swift/build/Release/computer_use.node'); console.log(Object.keys(m.computerUse.tcc));"
# Output: [ 'checkAccessibility', 'requestAccessibility', 'checkScreenRecording', 'requestScreenRecording' ]

How I found this:

  1. Searched cli.js for the checkAccessibility call chain: jh() → ef4() → require(COMPUTER_USE_SWIFT_NODE_PATH ?? path.resolve(__dirname, "../prebuilds/computer_use.node"))
  2. Confirmed computer_use.node is missing from the npm package (find returns nothing)
  3. Found the binary inside Claude.app at the path above
  4. Module loads successfully and exposes all expected functions (tcc, apps, hotkey, display, screenshot, etc.)

Note: This requires the Claude desktop app to be installed alongside the CLI. The proper fix would be for the npm package to bundle the computer_use.node prebuild for each platform.

localden collaborator · 5 months ago

Thank you for your report — we are currently in the process of triaging MCP-related issues and this one appears to describe the same problem as #41188. To keep the discussion and any fix in one place, we're consolidating into that issue and closing this one. If you have logs, repro steps, or environment details that aren't already covered in #41188, please add them there — it'll help us track this down faster.

github-actions[bot] · 3 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.