
deskhand-mcp
io.github.all3n2601/deskhand-mcp
Accessibility-first desktop control for any agent: background input, agent pointer, zoom, Chrome.
Documentation
Deskhand MCP
Deskhand MCP lets an AI agent use your computer while you keep using it.
It is an MCP server for coding agents (Claude Code, Codex, T3 Code, Cursor, or any MCP client over stdio). The agent reads apps through their accessibility trees, acts by element id, and works in tabs of your signed-in Chrome and Zen browsers. On macOS it does this without moving your pointer or taking focus.
Deskhand MCP (Deskhand for short; the repository and package name are deskhand-mcp, the binary and its commands are still deskhand) is a fork of Munim Computer Use by Munim Technologies, and most of its core comes from that project. See Credits and thanks.
How this README was written. Every behavior and number below was built, run or read in the source on 28 November 2026 (commit
8206eef, macOS 27.0.1, Apple M4 Pro). What was verified lists what ran and what did not. Where something was not checked here, this README says so instead of repeating an older claim.
Contents
- What you can do with it
- What sets it apart
- Quick start
- Browser control: Chrome and Zen
- Working alongside you
- Apps and sites the agent may use
- Tools
- Measurements
- What was verified
- Known problems
- Environment flags
- Build, test and repository layout
- Roadmap
- Contributing
- Credits and thanks
What you can do with it
Ask your agent in plain language:
Open Notes, create a note called Shopping and paste the list from my clipboard.
In Chrome, fill the application form at this URL from my résumé. Do not submit it.
Read this page and summarise it into a document in another app.
Close every tab you opened and leave mine alone.
Behind those prompts the agent uses the tools in Tools: get_app_state to read an app, element ids to act on it, edit_text to enter text and check it landed, browser_read and browser_form_snapshot with browser_fill for pages and forms, and browser_request_credentials so a password never passes through the conversation.
What sets it apart
These are properties of Deskhand that were checked in this repository and on this Mac (see What was verified). No other computer-use server was built or run for this README, so it makes no head-to-head claims against any of them; compare it yourself describes how.
- Background by design (macOS). Actions go through accessibility or events addressed to one app's window. Checked live: while the agent clicked an element and appended text in a background TextEdit window, the mouse position and the frontmost app were identical before and after.
- Strict background-only mode. With
COMPUTER_USE_BACKGROUND_ONLY=1the server refuses foreground handoffs. Checked live:activate_appreturnederror: foreground_required: background-only mode refused to activate an app…. - Policy you control. A
policy.jsoncan block apps and sites. Checked live: a blocked app madeget_app_state,screenshotandactivate_appall returnpolicy_blocked, and an invalid policy file blocked everything instead of being ignored. - Machine-readable errors. Results carry
structuredContentwith anerror_code(seen live:policy_blocked,foreground_required,not_found), so an agent can branch without parsing prose. - Verified edits.
edit_textreads the value back. Checked live:appended to e3 via accessibility; verified: value is now "hello world". - One shared runtime for many sessions. A per-user broker multiplexes every agent session onto one worker and one browser bridge. It stays up after the last client leaves. Agent tabs stay until the session lease ends (15 minutes by default,
COMPUTER_USE_SESSION_LEASE_SECS;0exits after a few seconds). The broker test suite passes: multiplexing, id isolation, cancellation isolation, worker restart, session isolation, disconnect cancellation, idle shutdown, and the lease. - Zen as well as Chrome. The same
browser_*tools drive Zen on macOS through a Zen add-on. On 1 December 2026,deskhand doctoron this Mac reported both extensions connected, at version 0.11.0. - Identical tool surface per platform.
scripts/check-tool-parity.mjspasses: 55 tools, identical in order, text and schema, with the 4 macOS-only tools left out of the Windows and Linux list. - A health check that names the fault.
deskhand doctorprints permissions, bridge state, extension capabilities and versions, and native hosts as JSON.
Compare it yourself
If you are choosing between computer-use servers, these are the questions this README can answer for Deskhand, and that you should ask of any alternative:
- While the agent works in a background window, does your mouse position or frontmost app change?
- What happens when the only way to continue is to take your pointer or focus? Does it refuse, or silently take it?
- Can you block an app or a site, and does an invalid rule fail closed?
- Does an error come back as a code, or only as text?
- How many tokens and how much time does one read of an app or page cost? See Measurements for Deskhand's.
- Does it use your signed-in browser, and does a password ever reach the model?
Quick start
Run it without building: npx -y deskhand-mcp downloads the matching binary from the latest release and starts the server. The package is deskhand-mcp; deskhand on npm is an unrelated project. It is also listed in the MCP Registry as io.github.all3n2601/deskhand-mcp. The release assets are deskhand-macos-universal.zip, deskhand-windows-x64.zip, deskhand-linux-x64.tar.gz, and deskhand-linux-arm64.tar.gz, with SHA256SUMS.txt. Or build from a checkout:
# macOS (macOS 14+; Swift 5.9 or newer, built here with Swift 6.4.2 in about 24 seconds)
cd macos && swift build -c release
# Windows / Linux (Rust 1.100, pinned in rust-toolchain.toml)
cd windows-linux && cargo build --release
On macOS, grant permissions once, then check the setup:
macos/.build/release/deskhand request-permissions # Accessibility and Screen Recording
macos/.build/release/deskhand doctor # JSON report: permissions, bridges, extensions
Register the binary with your agent, using its absolute path:
# Claude Code. Add `--scope user` to register it for every project.
claude mcp add deskhand -- /path/to/deskhand
# Codex: ~/.codex/config.toml
[mcp_servers.deskhand]
command = "/path/to/deskhand"
// Cursor: ~/.cursor/mcp.json
{ "mcpServers": { "deskhand": { "command": "/path/to/deskhand" } } }
deskhand identity prints the support directory (~/Library/Application Support/deskhand on this Mac). On Windows and Linux, deskhand check-native-host diagnoses the Chrome native-messaging host; on macOS use deskhand doctor.
Sharing one runtime between sessions
scripts/t3-only-deskhand-mcp.sh starts the server through the broker, and exits with status 78 unless it was launched from T3 Code (tests for both pass). The broker keeps the environment of whichever client started it, so give every registration the same env.
Browser control: Chrome and Zen
The browser_* tools drive your real, signed-in browsers over native messaging. Chrome is the default; pass browser: "zen" for Zen (macOS).
- Chrome: load
chrome-extension/as an unpacked extension, then rundeskhand install-native-host(orsh chrome-extension/install.sh;COMPUTER_USE_PATHpoints it at the binary). - Zen: run
deskhand install-native-host, then install the Mozilla-signed add-on deskhand-zen-0.11.0.xpi: download it and drag it into Zen, or open it with File ▸ Open File. It is signed as an unlisted add-on, so it survives Zen restarts. Mozilla signs each version number once: after changingfirefox-extension/, bump the version in itsmanifest.jsonand sign again withnpx web-ext sign --channel=unlisted --source-dir firefox-extension --artifacts-dir /tmp/zen-signed --ignore-files 'signed/**' '*.test.mjs' PRIVACY.md, copy the.xpiintofirefox-extension/signed/(needs an addons.mozilla.org API key inWEB_EXT_API_KEYandWEB_EXT_API_SECRET). For development, loadingfirefox-extension/manifest.jsonfromabout:debugging#/runtime/this-firefoxstill works, as a temporary add-on that disappears on restart.scripts/zen-signed.test.mjsfails CI if the signed file no longer matches the source, and the release workflow attaches it to each release.
The agent works in its own tabs and leaves yours alone unless you hand one over with browser_use_tab. Tabs Zen has unloaded are listed and marked as unreadable until you open them (seen live in browser_list_tabs).
The install steps above were not re-run from scratch for this README; both extensions were already installed and connected. More detail: docs/browser-tools.md.
Working alongside you
macOS. Element actions use accessibility; coordinate actions are delivered as events addressed to the target window. Verified here: pointer and frontmost app unchanged during an element click and a verified text edit in a background app.
Coordinate actions given without an app are delivered to the window under that point. Observed live: click at (400, 400) with no app returned clicked at (400, 400) in background, so aim coordinates carefully, or pass app. A drag that leaves its source window is refused, with an error telling the caller what to pass (PointerTools.swift:236).
Windows and Linux. The Rust server builds and its 212 unit tests pass on this Mac, but it was not run against a Windows or Linux desktop, so how well it works alongside you there is unverified here. The source says Windows UI Automation patterns avoid the pointer where they apply, and that Linux pointer input moves the real pointer; see docs/reliability.md and docs/deep-tools.md.
Strict background-only mode
Set COMPUTER_USE_BACKGROUND_ONLY=1 for an agent that must not interrupt you. Fallbacks that would take focus, move the real pointer or show a popup fail with a foreground_required result instead. The process policy cannot be disabled by an agent argument.
Apps and sites the agent may use
Put a policy.json in the support directory, or point COMPUTER_USE_POLICY at a file:
{
"apps": { "Keychain Access": "block", "com.apple.MobileSMS": "ask" },
"sites": { "bank.example": "block", "mail.google.com": "ask", "*": "allow" }
}
blockwas tested: blocked apps returnpolicy_blockedfromget_app_state,screenshotandactivate_app.- An invalid policy file blocks everything (tested).
askand the site rules exist in the source (Policy.swift) and are documented in the policy header; they were not exercised in this verification run.- This is a guard rail for an agent that follows its instructions, not a sandbox: a coordinate click lands wherever it points, and a whole-display screenshot shows every window.
Tools (55)
macOS lists 55 tools. The Rust server lists 51: manage_window, menu_action, file_picker_state and file_picker_choose are macOS only. Both lists were read from tools/list of the built binaries.
| Area | Tools |
|---|---|
| See | list_apps, get_app_state, observe_app, list_windows, get_media_state, screenshot, zoom, list_displays, wait_for_state |
| Act | open_app, open_resource, click, right_click, hover, drag, scroll, type_text, set_value, edit_text, select_text, press_key, manage_window, media_control, menu_action, activate_app, wait, run_steps |
| Clipboard | clipboard_read, clipboard_write |
| Browser | browser_open_tab, browser_list_tabs, browser_use_tab, browser_release_tab, browser_select_tab, browser_close_tab, browser_close_all_tabs, browser_preserve_tab, browser_navigate, browser_snapshot, browser_form_snapshot, browser_read, browser_screenshot, browser_click, browser_select_option, browser_hover, browser_handle_dialog, browser_page_errors, browser_type, browser_fill, browser_upload_file, browser_press_key, browser_frames, browser_request_credentials |
| File picker (macOS) | file_picker_state, file_picker_choose |
Every result carries structuredContent. run_steps runs a list of known actions in one call and stops at the first failure; its test passes. Per-tool behavior: docs/deep-tools.md and docs/browser-tools.md. The agent-side operating loop is in skills/deskhand/SKILL.md.
Measurements
Measured on 28 November 2026: MacBook Pro (Apple M4 Pro, 24 GB), macOS 27.0.1, release build of commit 8206eef, called over stdio with the repository's own MCP client (scripts/mcp-client.mjs), directly to the binary and not through the broker. One warm-up call dropped, then 10 timed calls, median reported. Tokens are characters divided by 4.
| Call | Median | Size (≈ tokens) |
|---|---|---|
browser_list_tabs, browser: "zen", all: true, 32 tabs | 0.008 s | 1.3K |
browser_read, Zen, the GitHub page of this repository in a background tab | 0.041 s | 5.1K |
browser_snapshot, same tab | 0.132 s | 2.6K |
These include the round trip through the Zen extension and its native host.
Not measured. Chrome browser tools (no Chrome window was open), Windows, Linux, and desktop reads of a large file list. A Finder benchmark was attempted and abandoned: the Finder window opened on a different Space from the agent's window, so it was not reachable, and moving your Spaces to force it was not worth it. Earlier versions of this README had numbers for those cases and for other servers; they came from a different codebase and machine and have been removed.
What was verified
The timing table above is from 28 November 2026, commit 8206eef. The checks in this table were run again on 1 December 2026 on this Mac (macOS 27, Apple M4 Pro), except the rows that name 30 November.
| Check | Result |
|---|---|
swift build -c release | passes |
cargo build --release | passes (dead-code warnings: Windows and Linux code compiled on a Mac) |
swift test | 68 tests pass |
cargo test --locked | 212 pass |
cargo fmt --check | clean on 30 Nov 2026 |
cargo clippy -D warnings | fails on this Mac with dead-code errors in platform-gated code. CI runs clippy on Ubuntu and Windows only |
Tool parity, T3 wrapper, Zen page-script freshness, extension builder, snapshot-cleanup, draft-preservation, bridge-peers | pass |
run_steps, broker, lifecycle-process, zen-bridge (against the built binary) | pass |
| Chrome extension tests (fake Chrome) | 106 pass |
| Zen extension tests (fake Firefox) | pass |
deskhand doctor | Chrome and Zen extensions connected, version 0.11.0 |
tools/list | 55 tools (Swift), 51 (Rust) |
| Strict mode, policy block, invalid policy, pointer and focus unchanged | behaved as described above |
scripts/deep-tools.e2e.mjs (live, TextEdit and Zen) | 85 pass on 30 Nov 2026. Zen's empty accessibility tree is reported as unsupported and the test stops there |
scripts/e2e-browser.mjs (throwaway Chrome for Testing) | 20 pass on 30 Nov 2026. The extension connects when the native-host manifest is in Chrome's real support directory and the server path is absolute |
| Windows and Linux on real desktops | not run |
| Install steps for Chrome and Zen from scratch | not run |
Known problems
These limits are still true.
- Zen page content through desktop tools. A Zen or Firefox window whose accessibility tree has no elements returns
error: unsupported:and says to read and edit the page with thebrowser_*tools. A window that does expose elements is read as usual. Taking focus to force a richer tree is not done. - Coordinate clicks without
appgo to the window under the point (see Working alongside you).
Environment flags
Each flag below was found in the source.
| Variable | Effect |
|---|---|
COMPUTER_USE_BROWSER=0 | Hide the browser_* tools |
COMPUTER_USE_AGENT_CURSOR=0 | Do not draw the agent pointer |
COMPUTER_USE_AGENT_CURSOR_TASK_FADE_SECS | How long the pointer waits before fading after the last tool call |
COMPUTER_USE_USE_INDICATOR=0 | Do not draw the ownership glow |
COMPUTER_USE_ALLOW_SECURE_FIELD_INPUT=1 | Allow typing into password fields |
COMPUTER_USE_BACKGROUND_ONLY=1 | Refuse foreground focus, real-pointer and popup fallbacks |
COMPUTER_USE_REMOTE_CONTROL=1 | Remote-desktop mode: input takes over the real pointer. BACKGROUND_ONLY takes precedence |
COMPUTER_USE_PARK_WINDOWS=0 | macOS: do not move minimized or hidden windows to an invisible display to act on them |
COMPUTER_USE_POLICY=<file> | Where to read the app and site policy |
COMPUTER_USE_PROFILE | Run under an embedding app's identity (docs/embedding.md) |
COMPUTER_USE_PATH | Binary path for chrome-extension/install.sh |
Build, test and repository layout
| Path | What |
|---|---|
macos/ | Swift server (Accessibility API, ScreenCaptureKit), broker, doctor, Zen bridge |
windows-linux/ | Rust server: UI Automation on Windows, AT-SPI and X11 on Linux |
chrome-extension/ | Chrome extension and native-host installers |
firefox-extension/ | Zen add-on (page-scripts.js and the prompt files are generated from the Chrome extension) |
scripts/ | Launcher, test suites, tool-definition and parity tools, Zen page-script generator |
skills/deskhand/ | The agent skill for Claude Code and Codex |
docs/ | Reliability, deep tools, browser tools, embedding, uploads, design notes |
npm/ | npm launcher, published as deskhand-mcp |
On Fedora, install gcc pkgconf-pkg-config clang-devel pipewire-devel libdrm-devel mesa-libgbm-devel mesa-libEGL-devel wayland-devel libxcb-devel before building the Rust server (not tested here).
cd windows-linux && cargo test
cd macos && swift test
node scripts/check-tool-parity.mjs
node scripts/t3-only-wrapper.test.mjs
node scripts/build-zen-page-scripts.test.mjs
node scripts/run-steps.test.mjs macos/.build/release/deskhand
node scripts/broker.test.mjs macos/.build/release/deskhand
node scripts/lifecycle-process.test.mjs macos/.build/release/deskhand
node scripts/zen-bridge.test.mjs macos/.build/release/deskhand
node chrome-extension/background.test.mjs
node firefox-extension/background.test.mjs
# Live, on a Mac with Accessibility and Screen Recording; drives TextEdit and Zen:
node scripts/deep-tools.e2e.mjs macos/.build/release/deskhand
Edit tool definitions with scripts/tool-defs.mjs, which rewrites the Swift and Rust lists together. After changing a Chrome page reader, run node scripts/build-zen-page-scripts.mjs.
Roadmap
- An empty Zen accessibility tree returns
error: unsupported:and points at thebrowser_*tools. The Chrome end-to-end test passes when the native host is registered in Application Support and the server path is absolute -
browser_fillfor ARIA comboboxes. Design - Release binaries, and publishing to npm as
deskhand-mcpand to the MCP Registry (deskhandon npm is an unrelated project). The macOS build is ad-hoc signed, not notarized - A Mozilla-signed Zen add-on, so it survives a Zen restart.
firefox-extension/signed/ - Keep the broker running between sessions. Agent tabs stay until the idle lease;
browser_preserve_tabhands a tab to the user and the lease does not close it - Measure Windows and Linux on real desktops
- See the Codex parity map for further gaps
Contributing
Issues and pull requests are welcome at all3n2601/deskhand-mcp. Read CONTRIBUTING.md first, and report vulnerabilities privately as described in SECURITY.md. Changes are made test-first; run the suites above before sending one. More documentation is indexed in docs/, including troubleshooting and the changelog. Everyone taking part follows the Code of Conduct.
Credits and thanks
Thank you to Munim and Munim Technologies. Deskhand exists because of Munim Computer Use. The idea of a computer-use server that reads accessibility trees, works in the background and leaves the user's pointer alone, and a large part of the code that does it, are theirs. Deskhand started from that code and builds on it, and their copyright notice stays in LICENSE. If Deskhand is useful to you, go and star the original.
Thanks also to arc-cua (MIT): on-screen pruning, dialog scoping, notification-based settling, OCR fallback, menu shortcuts and window parking follow its approach.
Deskhand is a modified version of an Apache-2.0 licensed work. Modifications are copyright 2026 the Deskhand contributors. Licensed under the Apache License 2.0; see LICENSE.
deskhand-mcpnpm install deskhand-mcp