grok-computer-mcp
Enables computer use on Linux desktops: the server observes the screen (accessibility tree first, Set-of-Mark screenshots as fallback), and clicks, types, scrolls and drags in native desktop apps and browsers, with window offsets and multiple displays handled internally.
Enables computer use on macOS desktops: the server observes the screen (accessibility tree first, Set-of-Mark screenshots as fallback), and clicks, types, scrolls and drags in native desktop apps and browsers, with HiDPI scaling and multi-display coordinates handled internally.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@grok-computer-mcp open Finder and verify my Downloads folder shows the latest file"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Grok Computer
English | 简体中文
Computer use for Grok Build: a Grok Build plugin (computer-use) plus a purpose-built MCP server (the grok-computer-mcp facade) that let Grok Build see the screen, click and type in desktop apps and browsers on macOS, Windows and Linux. The main use is checking UI inside the development loop (change code → launch the app → look at the UI → change again), and operating desktop and web tools that have no API.
Design document: docs/goal.md. Installation and configuration: docs/install.md. The documents under docs/ are written in Chinese.
How it works
main agent ──delegates──▶ computer subagent (own context; only reports go back)
│
├─▶ computer: grok-computer-mcp facade ──▶ Cua Driver ──▶ desktop (host / sandbox)
└─▶ browser: Playwright MCP (--isolated)
hooks: guard (risk grading and confirmation) · audit · verify_gate (report and final check) · selfcheckScreenshots stay out of the main session: all GUI work goes to the
computer-use:computersubagent; the main agent only receives a structured report of at most 2 KB (STATUS / SUMMARY / EVIDENCE / BLOCKERS / NEXT).Accessibility tree first, pixels last: an observation is a compact list of elements by default (one interactive element per line, with a stable ref). When the tree is not enough it falls back to a numbered Set-of-Mark screenshot, and only then to a grounding model or raw coordinates.
One coordinate space: every coordinate the model sees or sends is a pixel of the current observation image (long edge 1280 px). HiDPI scaling, window offsets and multiple displays are all handled inside the facade, and an action based on an observation of a screen that has since changed is refused (
STALE_OBSERVATION).Two safety layers: the hooks ask you before high-risk actions (send, delete, pay, ...), and the facade enforces hard rules itself and refuses everything when its policy cannot be loaded (deny-listed apps, secure fields, dangerous key chords, a session lock, an emergency stop).
The facade exposes nine tools: observe, click, type_text, press_keys, scroll, drag, apps, wait_for and locate.
Related MCP server: Open Computer Use
Quick start
curl -fsSL https://cua.ai/driver/install.sh | bash # desktop driver (macOS also needs permissions, see the install guide)
curl -LsSf https://astral.sh/uv/install.sh | sh # runs the facade
grok plugin marketplace add bo-516/computer-use
grok plugin install computer-use --trust
grok plugin enable computer-use
uvx grok-computer-mcp@0.2.0 doctor # self-checkThen describe the task to grok in plain language, or use /computer open Settings, turn on dark mode and confirm it took effect.
Privacy: screenshots are sent to the model provider. Deny-listed apps (password managers, keychains, terminals, banking apps, ...) are never observed; traces stay on your machine and are deleted after 7 days by default. See section 6 of the install guide.
Repository layout
Path | Contents |
| Marketplace index and component catalog |
| The plugin: subagent, skill and platform notes, |
| The facade MCP server (Python 3.11+, published on PyPI, run with |
| Task set (60 Cua Bench variants), host-mode runner and metrics, grounding benchmark, Phase 0 probes; see eval/README.md |
| Design document, install guide, Phase 0 verification record, state file schema |
| hooklib sync, plugin index generator |
| Hook fixture tests and repository contract tests |
Development
Requires uv (it installs Python 3.11 when needed); the dev-loop task tests also need Node.js.
uv sync
uv run pytest # all tests (fake backend; no desktop or account needed)
uv run ruff check
uv run pyright
uv run --python 3.8 --no-project --with pytest==8.3.5 pytest tests/hooks # hooks on Python 3.8
uv run python scripts/sync_hooklib.py --check # the facade's hooklib copy matches the plugin
uv run python scripts/plugin_index.py --check # the component catalog is current
grok plugin validate plugins/computer-useConventions are in AGENTS.md. The plugin directory ships files only and the hooks use the standard library only; the facade is the only code that talks to Cua Driver; the safety rules (fail-closed facade, R3 never loosened, typed text redacted, ...) must not regress.
Status
The plugin, the facade, the task set, the grounding benchmark and the Phase 0 probe kit are implemented and tested against a fake backend and a fake Cua Driver. What still needs a real environment (running the Phase 0 probes and the grounding benchmark, running the task set on macOS, Windows and Linux machines) is listed in docs/goal.md §10.1 and docs/phase0-verification.md.
License
Available Tools
9 toolsappsApps and windowsBIdempotent
list apps, list windows (optionally of one app), launch an app in the background, or focus (bring to front) an app.
Inputs: action (required), name, observation_id. Returns: object
clickClickADestructive
Click an element: prefer ref, then mark (from a som observation), then point (image pixels, last resort). Pass the observation_id you act on. Returns what changed and the next observation_id.
Inputs: observation_id (required), ref, mark, count, +3 more. Returns: object
dragDragADestructive
Drag from one ref/mark/point to another in the same observation.
Inputs: to (required), from (required), observation_id (required). Returns: object
locateLocate by descriptionARead-onlyIdempotent
Find a described target in the current screenshot with a grounding model when refs and marks fail. Returns candidate points in image pixels; when not confident, up to 3 candidates and an annotated screenshot.
Inputs: description (required), observation_id (required). Returns: object
observeObserve the screenARead-onlyIdempotent
Observe the GUI: interactive elements with refs (e7) and [x,y,w,h] boxes in image pixels. mode auto returns the tree, or a Set-of-Mark screenshot when the tree is thin; screenshot/som attach an image. root_ref expands a container; scope='screen' lists windows for cross-app work. Start every step with this.
Inputs: app, mode, page, scope, +3 more. Returns: object
press_keysPress keysADestructive
Press a key chord such as 'cmd+s', 'enter' or 'tab', or a list of chords in order. Quit, log-out, lock, task-manager and run-dialog shortcuts are refused.
Inputs: keys (required), observation_id (required). Returns: object
scrollScrollB
Scroll the window, or at a ref/mark/point, by wheel notches.
Inputs: direction (required), observation_id (required), ref, mark, +2 more. Returns: object
type_textType textADestructive
Type text into the field ref, or the focused field. Refused for password and credential fields: never type secrets. clear_first empties the field first.
Inputs: text (required), observation_id (required), ref, clear_first. Returns: object
wait_forWait for an elementARead-onlyIdempotent
Wait until an element whose label or value contains text (optionally of a role) appears, or disappears with gone=true. Returns a fresh observation.
Inputs: app, gone, text, ref_role, +2 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a clearly distinct action: observe for perception, wait_for for synchronization, locate for model-based grounding, and click/type_text/press_keys/scroll/drag for distinct input primitives. The observe/wait_for/locate trio is well-differentiated by intent and fallback role, so an agent can reliably pick the right one.
Mostly consistent lower_snake_case, with verb_noun forms (wait_for, type_text, press_keys) and clean single verbs (observe, click, scroll, drag, locate). The lone noun-style name 'apps' deviates slightly, but it is readable and unambiguous.
Nine tools is well-scoped for a GUI automation server, with each input modality (click, type, keys, scroll, drag) and perception path (observe, wait_for, locate) earning its place. No redundant or filler tools.
The surface covers perception, waiting, all major input primitives, app lifecycle, and a grounding fallback, which is strong for GUI control. Minor gaps remain, such as explicit double-click/hover, clipboard, or screenshot-only capture, though observe's som/screenshot modes partially mitigate this.
Maintenance
Related MCP Connectors
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Eyes and hands on real Windows PCs — observe, click, type via Glasswarp API.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables the model to observe and control the live desktop via accessibility trees and screenshots, performing actions like clicking, typing, scrolling, dragging, and setting values.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to observe and control the user's live desktop by listing apps, reading accessibility trees, and performing clicks, typing, scrolling, dragging, and other input actions with per-action approvals and local audit archives.1MIT
- AlicenseCqualityCmaintenanceEnables agent-native desktop control by driving mouse, keyboard, and interface elements through accessibility-first semantic operations, with fallback to screen coordinates when accessibility cannot reach a target.30MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to inspect and control allowlisted Windows applications using screenshots, mouse actions, Unicode keyboard input, UI Automation, and an Esc/F12 emergency stop.1Apache 2.0