| Files | Last commit | Last update |
|---|---|---|
| 4 hours ago | ||
| 4 hours ago | ||
| 4 hours ago | ||
| 4 hours ago | ||
| 4 hours ago | ||
| 22 hours ago | ||
| 22 hours ago | ||
| 4 hours ago | ||
| 22 hours ago | ||
| 4 hours ago | ||
| 4 hours ago |
Open Computer Use for Claude Code
One npm package that adds desktop Computer Use to Claude Code: the native
Open Computer Use runtime, its stdio MCP server, the open-computer-use
agent skill, a /computer-use:doctor diagnostic, and a Windows Escape-key
emergency stop.
The package does not vendor a binary. It declares the five platform runtime
packages as optionalDependencies in npm-shrinkwrap.json, so Claude Code's
plugin dependency install fetches only the package that matches the current
OS and CPU. scripts/mcp-launcher.mjs resolves that binary and hands stdio to
it unchanged.
This plugin owns the runtime. Do not also install a global open-computer-use
CLI or run install-*-mcp; the skill and the doctor command both say so.
Requirements
- Claude Code 2.1.x or later.
- Node.js 18+ and npm on
PATH. Claude Code uses npm for the dependency install and the launcher itself runs on Node. - Windows: a signed-in desktop session. macOS 14+: Accessibility and Screen Recording grants. Linux: a desktop session with AT-SPI2.
- Windows emergency stop: PowerShell 5.1+ (included with Windows 10/11). No extra permission or hotkey registration is required; the listener uses a low-level keyboard hook and observes Escape without consuming it.
Install
Add the marketplace once, then install the plugin:
claude plugin marketplace add https://gitcode.com/chzhang16/claudecode-computer-use.git
claude plugin install computer-use@chzhang16-computer-use
Then run /reload-plugins or start a new session.
Verify
claude mcp list
The server shows as plugin:computer-use:open-computer-use: ... Connected.
For a full check — runtime path, MCP handshake, tool list, emergency stop state, platform permissions — run:
/computer-use:doctor
Emergency stop (Windows)
The plugin starts a singleton global Escape listener when the MCP server starts. Pressing a physical Escape while the runtime is working on a Computer Use tool call (an input action or a read-only observation) does four things:
- Writes a cross-session latch (
${CLAUDE_PLUGIN_DATA}/stop.json). - Terminates the runtime's
powershell.exechild, leaving the MCP server alive. - Best-effort releases the left/right/middle mouse buttons and the Shift/Ctrl/Alt/Win modifier keys.
- Denies every later Computer Use tool call through the plugin's
PreToolUsehook until the user resumes.
Escape in an idle session is passed through and ignored: latching on every
Escape would stop the agent whenever the user closes a menu in another app.
Only the runtime started by this plugin's mcp-launcher.mjs is watched; another
application that runs the same open-computer-use binary (an IDE's own MCP
server, for example) is ignored.
/computer-use:stop # latch + terminate an in-flight action now
/computer-use:status # read-only latch/listener view
/computer-use:resume # clear the latch and re-arm Computer Use
The upstream runtime has no cancellation API. Its MCP notifications/cancelled
handler only discards the response and still finishes the action, so the plugin
cancels by terminating the platform action child. This cannot undo text that
was already typed or a scroll that was already delivered, and a message-style
drag may leave the target application in a drag state because the runtime's
Send-Drag path has no try/finally. The repository's Windows fixture test
reproduces this: the target sees WM_LBUTTONDOWN but no WM_LBUTTONUP. If that
happens, click once in the target application before resuming.
The listener is Windows-only in this release. macOS and Linux get the latch and
the tool-call gate, but startListener reports that no platform listener is
available; their Escape key is not intercepted. Set
OPEN_COMPUTER_USE_EMERGENCY_STOP=0 to disable listener startup entirely.
How the runtime is selected
scripts/mcp-launcher.mjs looks for the platform package, in order:
<plugin>/node_modules/@zachre/<platform-package>/bin/...(npm install)<plugin>/@zachre/<platform-package>/bin/...(hoisted install)<plugin>/packages/<platform-package>/bin/...(bundled checkout)<plugin>/../../packages/<platform-package>/bin/...(loaded in place with--plugin-dir)
Override with OPEN_COMPUTER_USE_BIN when reusing an existing install.
Uninstall
claude plugin uninstall computer-use@chzhang16-computer-use
Claude Code removes the cached copy and its orphaned version directory later.
The listener exits within 90 seconds after the MCP server stops. If you want a
completely clean sweep, delete ${CLAUDE_PLUGIN_DATA} (latch, listener record
and log) after uninstalling.
License
Plugin code MIT. The bundled runtime comes from
open-computer-use (MIT); each
platform package keeps its own LICENSE and THIRD_PARTY_NOTICES.md.