omp packages

@agent-sh/computer-use-linux0.7.64

Native Linux desktop control for AI agents (MCP server, Pi tools, and CLI): semantic AT-SPI accessibility trees, screenshots, compositor window targeting, Wayland/X11 input, and an on-screen activity indicator.

avifenesh Published 8 days ago MIT ~15K downloads/mo

Works on omp

1 of 1 report says this package works on omp.

1 works0 broken

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 1

  • worksTested by omp packagesv0.7.64 · 1 day ago

    Tested on omp 19.4.1: `omp plugin install` succeeds and the package loads with no errors. It adds tools computer_use_linux_tools; 1 skill. Its tools were not called.

Readme

computer-use-linux

Native Linux desktop control for AI agents over MCP, Pi native tools, and CLI.

CI crates.io npm License: MIT

Running open models for your company? Tiyuvta helps with model choice, deployment and optimization, and fine-tuning on your hardware or cloud account.

Sponsor

Built and maintained with a lot of agent tokens and hours. If it saves you time, sponsoring helps keep it going.

computer-use-linux gives AI agents real, structured control of a local Linux desktop: semantic AT-SPI accessibility trees, bounded screenshots, compositor-aware window targeting, Wayland/X11 input synthesis, and single-round-trip post-action verification across GNOME, KDE Plasma/KWin, Hyprland, niri, COSMIC, i3, Sway, labwc and other wlroots compositors, and X11/EWMH, plus a click-through on-screen activity indicator on GNOME and on Wayland compositors with wlr-layer-shell.

Quick start

Pick the setup that matches your agent or shell workflow:

Host / workflow Install command
Claude Code (plugin + skill) claude plugin marketplace add agent-sh/computer-use-linux && claude plugin install computer-use-linux@computer-use-linux
Codex CLI (plugin + skill) codex plugin marketplace add agent-sh/computer-use-linux && codex plugin add computer-use-linux@computer-use-linux
Pi Coding Agent (native lazy-loaded tools) pi install npm:@agent-sh/computer-use-linux
Hermes Agent (CLI + skill + MCP server) npm install -g @agent-sh/computer-use-linux && hermes skills tap add agent-sh/computer-use-linux && hermes skills install agent-sh/computer-use-linux/computer-use-linux && hermes mcp add computer-use-linux --command computer-use-linux --args mcp
CLI + any stdio MCP client (npm) npm install -g @agent-sh/computer-use-linux
CLI + system setup from source git clone https://github.com/agent-sh/computer-use-linux && cd computer-use-linux && ./install.sh
Rust crate (crates.io) cargo install computer-use-linux

Verify desktop readiness from the shell (after installing the CLI on PATH via npm install -g @agent-sh/computer-use-linux, ./install.sh, or cargo install computer-use-linux):

computer-use-linux doctor | jq .readiness
computer-use-linux setup                      # enable AT-SPI accessibility bridge if needed
computer-use-linux setup-window-targeting     # install GNOME Wayland window-control extension if needed

Plugin-only or Pi-only installs: The Claude Code / Codex plugin launcher and pi install manage private cached binaries and do not add computer-use-linux to PATH. Either run the MCP doctor / setup_accessibility / setup_window_targeting tools (or computer_use_linux_doctor in Pi) directly from your agent, or also install the CLI above when you want shell subcommands on PATH.

The Rust crate is published as computer-use-linux and the npm package as @agent-sh/computer-use-linux. Prebuilt x86_64 and aarch64 Linux binaries ship with the latest release. They need glibc 2.28 or newer: RHEL 8 and its rebuilds, Debian 10, Ubuntu 20.04, and anything later. On an older system, build from source with cargo install computer-use-linux.

Need an isolated desktop where the agent never touches your real mouse, keyboard, or focused window? Use the sibling project agent-workspace-linux alongside this one.

What this is

computer-use-linux is a Rust MCP server and CLI for Linux desktop control. It ships three binaries: the main computer-use-linux server/CLI, the computer-use-linux-cosmic Wayland toplevel helper for COSMIC, and the computer-use-linux-indicator click-through activity overlay. Any MCP host (Claude Code, Codex CLI, Codex Desktop's Linux build, Pi Coding Agent, Hermes Agent, Claude Desktop, or your own client) can spawn it to inspect accessibility trees, list and focus windows, take screenshots, click, drag, scroll, type, and invoke semantic accessibility actions.

Most computer-use MCP servers are macOS-only (they lean on AppKit, AXUIElement, CGEvent). The few that target Linux either drive xdotool against an X11 root window or shell out to OCR over screenshots. It differs in five ways:

  • Wayland actually works. On Wayland, pointer actions use /dev/uinput or org.freedesktop.portal.RemoteDesktop. ydotool sends only untargeted wheel events there, and a coordinate action with neither route is refused. Literal text prefers KDE clipboard integration on Plasma, wtype on compatible Wayland compositors, and portal keysyms on other Wayland sessions, including GNOME with ydotool installed. Portal text startup or conversion errors fail the call without replaying text through ydotool. Raw ydotool text accepts printable ASCII, tab and newline only, and its physical US key positions can produce different text under the active layout. Screenshots use the GNOME Shell DBus screenshot method when present, org.freedesktop.portal.Screenshot otherwise, then on a native X11 session a root-window GetImage (device pixels, no toolkit scaling), and finally spawn gnome-screenshot for background/systemd contexts where the DBus paths are denied.
  • Window targeting is compositor-aware. The window registry tries GNOME Shell extension, GNOME Shell Introspect, COSMIC Wayland helper, KWin DBus scripting, Hyprland hyprctl, the niri IPC socket, the umbriel CLI, i3 IPC, labwc's labwc.sock, wlr-foreign-toplevel-management, and generic X11/EWMH in order, then reports exactly which backend won or why each backend failed. Terminal windows are enriched with their controlling TTY and foreground process so agents can target "the terminal running pytest" directly. Every window_id fits JavaScript's exact integer range (at most 2^53-1), so JSON clients can pass it back unchanged; a larger value is rejected with a prompt to re-run list_windows.
  • Semantic selectors first, pixel coordinates when needed. Tools like click, perform_action, and set_value accept role / name / text / states selectors or element_index values backed by AT-SPI, and every mutating tool can return a post-action screenshot and updated accessibility tree in the same round trip. Pixel coordinates remain available for rendering-only surfaces (canvas, games, X clients without ATK).
  • Visible to humans, invisible to screenshots. While an agent acts, computer-use-linux-indicator renders a click-through overlay with a per-agent cursor glide, click ripple, keycaps/typing banner, screen-edge glow, and status pill, and hides automatically under a shared capture lock before any screenshot is read.
  • One JSON readiness report. computer-use-linux doctor returns a structured document covering platform, portals, AT-SPI, windowing, input, and a readiness summary with explicit blockers and a recommended next step. MCP hosts can render or surface that to the user without parsing prose.

The crate was extracted from codex-desktop-linux (the Linux distribution of Codex Desktop), which bundles this backend for its native Computer Use feature. This standalone repo is the upstream.

MCP tools & features

Category Tool What it does
Diagnostics & setup doctor Single-shot JSON readiness report (platform, portals, accessibility, windowing, input, readiness summary, and capability map).
setup_accessibility Enables and verifies GNOME's org.gnome.desktop.interface toolkit-accessibility setting so toolkit apps expose AT-SPI trees.
setup_window_targeting Installs and enables the bundled GNOME Shell extension. GNOME Wayland needs it for exact window activation and move/resize; every GNOME session needs it for the on-screen indicator.
Discovery & observation get_app_state Combined screenshot + compacted AT-SPI accessibility tree with stable element_index handles. Scope with app_name_or_bundle_identifier or a window target (window_id, pid, app_id, wm_class, title).
get_tree_page Page through the latest cached tree by node offset, for trees too large to return inline when the host cannot read the spill file. Pass snapshot_id to refuse a page from a tree a later snapshot replaced. Search the snapshot instead of paging all of it with query (text in a node's name, text or description), role and within (an element_index subtree).
screenshot Bounded PNG or JPEG capture of the full desktop (full_screen: true or no target), a raised and cropped target window (window_id, pid, app_id, wm_class, title, raise_window), or one monitor (monitor, a 0-based index in reading order: rows of monitors top to bottom, each row left to right) at its own resolution, with its origin in the caption for click coordinates.
list_windows Compositor windows with window_id, title, app_id, wm_class, PID, focus state, client type (wayland/x11), bounds, and terminal TTY/process metadata.
focused_window The window currently holding keyboard focus.
list_apps Running desktop applications visible to the AT-SPI registry.
Input click Click by element_index, semantic selector (role/name/text/states), or desktop/window-relative coordinates (left/right/middle, click_count).
drag Desktop coordinate drag from (start_x, start_y) to (end_x, end_y).
scroll Page-based vertical/horizontal scroll on an element, window, or pixel coordinate.
press_key Single keys or chords (Ctrl+L, Alt+F4, Return), optionally focusing a target window or terminal first, or with delivery: "background" to an element, browser tab or terminal without moving keyboard focus.
type_text Literal text entry, optionally targeted at a window or terminal (tty, terminal_pid, terminal_command, terminal_cwd), or with delivery: "background" to an element, browser tab or terminal without moving keyboard focus.
Semantic actions perform_action Invoke any AT-SPI action exposed by an element (Press, Activate, Toggle, Jump, …); defaults to the primary action.
set_value Write directly to a settable accessibility element (text fields, sliders, spinners).
Batching run_batch Run 1 to 100 desktop tool calls (and sleep_ms pauses) in order in one call, passing the latest snapshot_id along. It cannot call run_shell, js, complete_interaction or itself.
Window management activate_window Focus a window by window_id, pid, app_id, wm_class, title, or terminal selectors.
move_window / resize_window Reposition or resize a window in desktop coordinates (GNOME Shell extension and X11/EWMH backends).
Opt-in host tools complete_interaction Parameter-free desktop completion notification (notify-send); registered only when COMPUTER_USE_LINUX_NOTIFY_ON_COMPLETE=1.
run_shell Bounded non-login /bin/sh -c execution; registered only when COMPUTER_USE_LINUX_ENABLE_SHELL=1 (absent by default).
js / js_reset A persistent Node.js REPL with a desktop API over the tools above, for multi-step scripts in one call. Registered only on stdio with COMPUTER_USE_LINUX_ENABLE_REPL=1, or alone with COMPUTER_USE_LINUX_REPL_ONLY=1; never over HTTP. Needs Node.js.

Every tree result carries a snapshot_id: get_app_state, an include_tree observation, and get_tree_page. The server caches one tree, and each new tree replaces it. Pass the snapshot_id with an element_index (or a selector, except on scroll) to click, scroll, perform_action or set_value, and to get_tree_page: if a later tree replaced that snapshot, the call is refused before any window is raised or input is sent, since the index could name another element by then. A full capture-space x/y point does not come from the tree, so it is not checked. A coordinate_space: "atspi" click maps through its element, so it is checked. Without snapshot_id, the element resolves in the latest tree. An element_identifier names the AT-SPI object itself and is not checked against a snapshot. Ids differ between server processes, so an id from before a restart is refused.

click, scroll, perform_action, and set_value take an optional app target (pid, window_id, app_id, wm_class, window_title). With one, an element_index (or a selector, where the tool takes one) from another app's get_app_state snapshot is refused; call get_app_state for the target app first. When the window backend reports no pid for a target window (i3 without xprop, COSMIC, other wlroots compositors), the snapshot must have been taken for that window, or the call is refused. perform_action and set_value do not focus the target window. An element_identifier is refused when its owner on the accessibility bus is a different pid than the target; it is not checked when either pid is unknown.

Low-token trees and searching the snapshot

For long sessions, such as web research, keep the tree out of the result and ask the snapshot for what you need:

  • tree_detail on get_app_state, on get_tree_page and on post-action include_tree picks the node encoding: "minimal" (index, role, name, text that differs from the name, a value, and states other than routine ones such as enabled, visible and showing), "compact" (the default) or "full". element_index values are the same in every encoding.
  • max_tree_bytes on get_app_state and post-action include_tree caps the inline tree in bytes (default and ceiling 32000). 0 returns no nodes: the call still reads the desktop, caches the whole tree under a new snapshot_id and writes the spill file, and errors, warnings, truncation and the readiness block are returned as usual. The message says how many nodes were kept and where the tree is.
  • get_tree_page takes query, role and within to return only matching nodes of the cached snapshot, in tree order, without reading the desktop again. within is applied to the whole tree first, so a plain container (a results list, an article) bounds the search even when the interactive view leaves it out.
  • interactive_only on get_app_state keeps the whole tree beside the interactive view it returns. Actions are unchanged: element_index values and selectors resolve against the interactive view, as before. get_tree_page pages and searches that view by default; pass interactive_only: false to page or search (query, role, within) the whole tree, including page text and containers the view leaves out. within may name a container the view leaves out. A hit on a node outside the view (a price, say) is evidence to read, not a target: act on interactive nodes such as the link next to it.

A research step is then a refresh and a search, for example get_app_state {app_name_or_bundle_identifier, include_screenshot: false, interactive_only: true, tree_detail: "minimal", max_tree_bytes: 0} followed by get_tree_page {snapshot_id, query: "£", interactive_only: false, tree_detail: "minimal"}. On an eBay search and listing sequence (find the search box, search, read titles and prices, open a listing, read its title and price) this moved about 41 KB of tool results instead of about 404 KB with get_app_state and get_tree_page paging.

Post-action observation in one round trip

All mutating tools (click, drag, scroll, press_key, type_text, perform_action, set_value, activate_window, move_window, and resize_window) accept optional post-action observation parameters so an action and its verification complete in a single MCP tool call:

  • screenshot_after: true | "screen" | "window" | false: capture after the action is dispatched and the indicator overlay is hidden (true or "screen" for full desktop, "window" cropped to the action's target window or the focused window when untargeted)
  • format, quality, scale, max_width, max_height, max_bytes: same screenshot payload controls as screenshot and get_app_state
  • screenshot_file_path: save the post-action screenshot to this new file instead of returning it as image content (see Screenshot files)
  • include_tree: true: include a fresh compacted AT-SPI accessibility tree and its snapshot_id; it replaces the cached tree, so later element_index values come from it
  • tree_detail, max_tree_bytes: encoding and inline byte cap of that tree; max_tree_bytes: 0 caches it without returning nodes (see Low-token trees)

When post-action screenshot capture succeeds, the image is returned as the first MCP image content block alongside the JSON action summary and screenshot metadata. If the action succeeds (ok: true) and only the post-action screenshot or tree capture fails, ok remains true and the error is reported in screenshot_error / accessibility_error and appended to message.

Screenshot sizing & coordinate scaling

Screenshot payloads are size-bounded by default before they are returned to the MCP host: max 1920 px width/height and 2 MiB image bytes, with hard caps even when callers request more. Agents that need more detail can pass max_width, max_height, max_bytes, scale, format: "jpeg", or quality, preferably with a window target or crop. PNG remains the default; JPEG lets callers trade lossless pixels for a smaller payload before the byte cap forces further resizing. Returned screenshot metadata includes coordinate_width, coordinate_height, scale, format, and quality so callers can convert from a downscaled preview to desktop coordinate pixels.

Screenshot files

screenshot, get_app_state and the screenshot_after capture of mutating tools take screenshot_file_path. With it, the image is saved to that file and no MCP image content is returned, so a capture costs no image tokens until the agent reads the file. The metadata stays the same (width, height, coordinate_width, coordinate_height, scale, format, quality, bytes) plus file_path: in the screenshot caption, and in screenshot.file_path for the other tools.

  • The path must be absolute, and its parent directory must exist. Directories are not created.
  • The extension must match format: .png for png (the default), .jpg or .jpeg for jpeg.
  • The path must end with the file name, so a trailing / or /. is refused.
  • File output creates a new file and never replaces one. Any existing entry at the path is refused: a file, a directory or a symlink.
  • The image is written to a temp file in the same directory, then moved into place with a step that fails if anything exists at the path (renameat2 with RENAME_NOREPLACE, or link where that is unsupported). A reader never sees a partial file, and an entry created meanwhile is neither followed nor replaced. The file is created with mode 0600.
  • A bad path is refused before anything is captured or any input is sent.
  • A failed write is never answered with the image inline. screenshot returns an error, get_app_state sets screenshot_error, and a mutating tool sets screenshot_error and keeps the action's ok.
  • Over stdio the path is on the machine that runs the server. Over HTTP (mcp --listen) the parameter is refused, so a remote client gets no way to write files on the host.

Input & semantic targeting contracts

For a plain left click by element index or selector, the element's first AT-SPI action takes precedence over bounds when it is click, press, or toggle. Entry activate and slider jump must be requested explicitly with perform_action; they are never a substitute for a pointer click, even when bounds are missing. This avoids pointer conversion for GTK3 HiDPI extents and GTK4 zero-origin bounds when the element exposes such an action. The preference does not substitute an arbitrary action name for a coordinate click. Explicit x/y, right clicks, and double/multiple clicks retain pointer semantics. Re-check application state after either kind of activation.

On KDE Wayland, element clicks that need pointer dispatch match the cached AT-SPI frame to a coherent KWin window/output snapshot, then map the target separately to physical capture pixels (uinput) and logical desktop coordinates (portal). Client-local and decorated frames, actual decoration offsets, and nonzero or negative output origins are supported when the geometry and uniform output scale can be verified. Ambiguous windows, mixed or unknown scales, overlapping outputs, or stale pointer geometry fail before input. These clicks get no off-screen or monitor-gap warning, since KWin maps the point onto an output; the uinput route still reports a clamp.

Explicit x/y defaults to coordinate_space: "capture" (raw screenshot pixels). To click a global AT-SPI screen point, pass coordinate_space: "atspi" together with its element_index or semantic selector; KDE Wayland then applies the same native KWin decoration and scale conversion as an element-bounds click, including when the AT-SPI window frame is client-local. This mode requires both coordinates and element identity and cannot be combined with relative: true. Other calls keep their existing coordinate behavior.

For coordinate click or scroll with relative: true, select a target window and measure from its clipped screenshot crop origin. Divide preview x and y by the returned screenshot scale before passing them. These are not raw GDK surface or widget-local coordinates; decorations and clipping can change the origin. A missing window target is rejected.

GNOME clipboard fallback: Pass paste_fallback: true when portal keysyms cannot deliver text, such as CJK characters or text transformed by an active input method. GNOME first tries verified AT-SPI insertion, then uses the Remote Desktop clipboard only when no AT-SPI edit is possible. The previous clipboard is restored with every offered MIME type; a newer clipboard owner is left unchanged. Clipboard paste confirms dispatch, not field contents, and is never retried after an uncertain AT-SPI edit. The default is false, which preserves the existing keyboard routes.

X11 text fidelity: xdotool/XTEST can silently substitute symbols under non-US XKB layouts (reported with Brazilian br/ABNT2) or changing keymap state, even when type_text returns ok: true. Every successful xdotool text dispatch includes a layout warning. XKB layout replacement events, persistent mapping/group changes, and keyboard focus/grab transitions detected across a call return an error after dispatch, without replaying the text. Keyboard grabs can divert characters without changing the polled focused-window ID. If monitoring cannot start, xdotool still dispatches and the response explicitly warns that layout-change and keyboard interception detection were unavailable. PointerRoot focus is unsupported because pointer motion can redirect input without a detectable focus event. This also detects a setxkbmap layout changed and restored during one call. Temporary raw remaps or group switches restored within a call and dropped text with a stable map remain unverified. Re-observe the actual text before pressing Enter, submitting it, or treating it as delivered. Use include_tree: true for AT-SPI readback when the application exposes the text, or screenshot_after: true to inspect it. These observations do not automatically compare the field to the requested text. Do not retry blindly.

Targeted press_key/type_text results append focused-element feedback from AT-SPI (role, name, editable); type_text also warns when a concrete non-terminal focus is not editable. Terminals accept keyboard input without an EditableText interface; re-observe the contents to confirm input. Click/screenshot/input results warn when the target window or coordinate is partially or fully off-screen. A click, scroll or drag coordinate between monitors, where monitors of different sizes or offset rows leave part of the screenshot uncovered, gets a warning too: the server reads the monitor layout once per screenshot (from the portal session, KWin, the GNOME Shell extension, Hyprland, kscreen, Sway, COSMIC, niri or wlr-output-management, and from RandR on X11 only) and checks the point in screenshot pixels. Without a layout that fits the screenshot, only its outer rectangle is checked. The warning says what the route did. The portal sends nothing. X11 keeps the pointer on the screen, so a point off the screenshot lands at an edge. On X11 and the uinput pointer, a point between monitors lands at a monitor edge or on no visible pixel. A failed X11 click or scroll gets no warning, since nothing was sent. A failed drag gets none either, though it may have pressed and released before it failed. A drag checks its start and end points, and each warning names the endpoint. On the uinput pointer, a drag result also says where an off-screen endpoint was clamped to, as a click result does. Points along the path are not checked: the portal moves them onto the nearest shared monitor, and on X11 and uinput the drop goes to the end point. get_app_state returns a compact readiness block by default; pass verbose: true for the full diagnostics report. Tree nodes use a compact encoding: null, empty, zero and false fields are left out, containers do not carry the U+FFFC placeholder text Chromium gives them, and actions lists action names (pass one as perform_action's action). verbose: true returns the full encoding, with every field and action descriptions and keybindings. interactive_only: true returns only nodes with an action, editable text or a value, plus headings, status and live regions, windows and dialogs; containers are collapsed, so parent_index names the nearest kept ancestor. Its element_index values are the same as in the full tree. When title or window_id names one of several windows under one AT-SPI application root (Chromium puts every browser window under one), the tree covers that window plus the app's popups and dialogs, and drops its other named windows; message says so. It also reports tree_scoped (false when no app target narrowed the AT-SPI tree, with a warning in message) and accessibility_tree_truncated (true when the node, depth, read, or time budget stopped traversal with unread elements left). When a result would pass 32,000 bytes, the tree comes back as its leading nodes plus accessibility_tree_spill (path, node_count, bytes, inline_node_count). path is a private JSON file holding the whole tree with the same element_index values, in $XDG_RUNTIME_DIR/computer-use-linux/trees when that runtime directory is private, otherwise under ~/.cache (directories 0700, file 0600). Search the file instead of requesting the tree again; hosts that cannot read files page through the same tree with get_tree_page. accessibility_tree_partial is true whenever the result holds only part of the tree, also when the file could not be written and accessibility_tree_spill is absent; get_tree_page still pages the cached tree then. The file lasts until the next snapshot or until the server exits; after a crash it is swept at the next start or after an hour.

An app_id may be a full desktop ID or its final dot-separated segment; matching is case-insensitive, ambiguous aliases are rejected, and an unresolved explicit app_id returns an empty scoped tree rather than the desktop.

set_value on editable text reads the full contents back after dispatch. verified: true means an exact match; mismatches and readback failures return ok: false without replaying the mutation. Password fields return verified: false because masked content cannot prove the write. Re-observe after any mismatch; the contents may have changed.

On X11, text input sends LF and CRLF line endings as Return, with one newline per CRLF pair.

On GNOME, a read-only keymap preflight rejects the whole string before input if a character is absent or requires a modifier level Mutter cannot synthesize. The background reader cannot establish the active layout group, so every configured group must support the text. This can reject text that works in one of several groups. Then the text goes into the focused editable field of the verified target window through AT-SPI EditableText: it is inserted at the caret, replaces a selection, and counts as typed (ok: true) only when the field reads it back with the rest of its text unchanged (in a field over 4096 characters, the 32 on each side of the insert). The field must be in the AT-SPI window that matches the target and that window must be active, so a field left focused in another window of the app is not used. A password field, focus outside an editable field, and text with a newline, tab or other control character keep the refusal; send keys with press_key, or fill the field with set_value. The check parses the keymap in pure Rust, with no system XKB library, and stops after a two-second keymap read deadline. It does not cover held modifiers or a keymap changed concurrently with typing.

Background keyboard delivery

type_text and press_key take delivery: "background" to reach a target without moving the user's keyboard focus (#480). The target picks the route. Naming an element or a browser_tab selects background delivery on its own, and delivery: "focus" with one is refused. The result's background field says what happened: {"requested": true, "used": true, "route": "..."} when a background route delivered it.

When no route serves the target because the desktop or app lacks one (below, "no route"), the call is not blocked. The first such call in a server session sends nothing and returns a notice: ok: false without isError, background: {"requested": true, "used": false, "delivered": false, "reason": "...", "retry_to_continue": true}, and a message with the reason (and the setting that would open a route, where there is one), that normal input moves the user's keyboard focus and pointer, and that agent-workspace-linux gives the agent its own session. Repeating the call sends it through normal focused input, as without delivery, and so does every later call with no route, with only background: {"requested": true, "used": false} in the result. For an element, focused input first gives the element keyboard focus with AT-SPI GrabFocus and then types into its window (the target fields, or the snapshot's window); for a browser_tab, it targets the one window whose title contains the tab's name (with window fields, that window must show it). With Hyprland background mode on, normal input to a window is the same sendkeystate route, so a call with no route there stays an error. A wrong, ambiguous or stale target (an unmatched or ambiguous element, tab, tty or window, a replaced snapshot, a terminal whose pty belongs to another devpts instance, a point outside the target window or screen), the X server's Ctrl+Alt+F-key and Ctrl+Alt+BackSpace chords on the agent seat, and a failure after input started stay errors.

  • Element (AT-SPI). Pass element_index with snapshot_id, element_identifier, or role/name/states, plus the app target to check the snapshot against, as for set_value. type_text inserts through EditableText at the element's caret, or at its end when the caret is not in it, and succeeds only when the field reads the text back with the rest unchanged. A selection is left alone and the caret is not moved. A line feed or tab goes in only on a multi-line element; other control characters have no route. A password field takes the text but cannot be read back, and the result says so, as with set_value. press_key runs the AT-SPI action the key means: Enter or space on a button or menu item, space on a check box, radio button or toggle, Enter on a link, and Enter on a single-line field that has an activate action. Other keys and chords with modifiers have no route there.
  • Browser tab (DevTools). Start Chrome, Chromium or an Electron app yourself with --remote-debugging-port and its own --user-data-dir, and set COMPUTER_USE_LINUX_DEVTOOLS to the port or to the path of its DevToolsActivePort file. The server connects only to that port on 127.0.0.1, only when its listener belongs to the same user, and never starts or restarts a browser. browser_tab names the tab: a target id, or text in one tab's URL or title. Text goes in with Input.insertText at the tab's focused element, as typing would, and an input or textarea must read it back. Keys go with Input.dispatchKeyEvent. The tab needs a focused field for text. Shortcuts the browser handles outside the page, such as Ctrl+T, do not run this way. A field inside a frame from another origin is refused.
  • Terminal. Pass tty, terminal_pid, terminal_command, terminal_cwd, or a terminal window. The server finds the program on that tty and tries, in order: kitty remote control (the KITTY_LISTEN_ON socket kitty gives its shells; needs allow_remote_control and listen_on in kitty.conf), wezterm cli, tmux (a pane on the tty, or the active pane of a client attached on it), GNU screen (the current window of a client on the tty, when no other client may be attached to its session; a screen window's own tty is refused, since window numbers can be swapped), TIOCSTI where dev.tty.legacy_tiocsti is 1 and the server has CAP_SYS_ADMIN, and the terminal's pty master through pidfd_getfd where ptrace rules allow it. The result names the channel it used. Text reaches kitty, wezterm and tmux on stdin and screen through a private file and its ^_ register, which is cleared after the paste, never as a process argument. A tty taken from a window must have its pty master held by that window's terminal, so a container's pts with the same number is refused. When nothing works, there is no route, and the reason names the terminal found and the setting that would open one. GNOME Terminal, Ptyxis and other VTE terminals and Ghostty have no remote input command, and Konsole's D-Bus route is not supported yet, so a program in them needs tmux or screen. Writing to /dev/pts/N only prints on the screen, so the server never does it.

On Hyprland with COMPUTER_USE_LINUX_HYPRLAND_BACKGROUND=1, a window target with delivery: "background" goes through send_key_state as in background mode, and so does a terminal window that no terminal channel reaches.

  • Whole window (agent seat). A window target that is not an element, a browser tab or a terminal some channel above reaches goes through the agent's own keyboard focus, on desktops that ship one. On X11 the server adds an XInput 2 master pointer and keyboard named computer-use-linux agent <pid>, focuses the target with XISetFocus for that keyboard only, and types through its XTEST device; the user's master keeps its focus and cursor. Keys come from the user's keymap (first two levels), so a character it lacks has no route, and neither does a key or chord another client grabs on the root window (a window manager shortcut such as openbox's Alt+F4), since through the agent seat the grab would act on the user's session. The check takes and drops a passive grab of each key back to back; a key the user presses in that instant goes nowhere. On sway 1.10 and later the server creates an ext-transient-seat-v1 seat, focuses the target on it with zwlr_foreign_toplevel_handle_v1.activate, and types through a virtual keyboard with its own keymap; seat0 keeps its focus and its workspace (a target on a workspace the user is not viewing still gets the keys), and sway removes the seat when the server disconnects. Xwayland windows have no route, because Xwayland feeds every seat into one X keyboard that follows the X focus, and neither do scratchpad windows, because activating one shows it on the user's workspace; if seat0's focus moves anyway, no keys are sent. Alt and Super chords, and chords the sway config binds (its included files too), have no route, because sway runs its bindings for the agent seat too. The agent keymap uses keycodes above any real keyboard's, so bindcode and bindsym --to-code bindings never match an agent key. On Hyprland the route is sendkeystate, as in Hyprland background mode below, without the environment variable. On X11 the master appears on first use and goes away after ten idle minutes or when the server exits. On sway the transient seat lives for one call (each call waits 100 ms after creating it, so clients can bind the new seat before input arrives; a client busy for longer misses the input), so no other program sees it between calls: wtype, for one, binds the last seat it sees, and a password or autotype helper using it would otherwise type into the agent's window. The X11 master's name carries a window owned by the server's X connection, so a master left by a killed server is removed by the next one. When input fails partway, the result says it may have been partly delivered and the seat is rebuilt.

click and scroll take delivery: "background" too, with x and y and a window target: the agent seat's pointer moves and clicks, and the user's pointer stays. x and y are screenshot capture pixels, or with relative: true measured from the window screenshot's crop origin, as in a focused relative click; the server maps them through the target window's bounds and the capture scale, so a client that works in window coordinates does not convert them itself. An element_index, a semantic selector and coordinate_space: "atspi" have no background route. The point must be over that window (on sway, on a visible workspace), or nothing is pressed. On X11 this needs a session with no window manager, because a window manager answers a click from any pointer by focusing that window for the user (openbox did); with one running, background clicks have no route and background keys still work. On sway the click also focuses the window on the agent seat only.

Desktop Agent seat Why
X11 (EWMH window managers) Keys; pointer only without a window manager XInput 2 multi-pointer is part of the X server. Checked with xterm, GTK 3 and Chrome under openbox, and the pointer without a window manager.
sway 1.10+ Keys and pointer ext-transient-seat-v1 plus foreign-toplevel activation on a named seat (sway view.c). GTK 3, GTK 4 and Chromium bind only the seats that exist when they start (gdkdisplay-wayland.c, wayland_seat.cc), so they never see the agent seat and have no route; foot and other clients that bind new seats get the keys. Xwayland windows have no route. Older sway has no transient seats.
Hyprland Keys (sendkeystate, US layout) One seat; sendkeystate is its per-window key dispatcher. No second pointer.
GNOME Pointer through a virtual pen (below); no keys One seat, and Mutter has no per-window input request. A tablet has its own cursor.
KDE Plasma (KWin) None One SeatInterface and no per-window input request. KWin 6.2+ gives a tablet its own cursor too, but maps a tablet with no configured output to the active output, which follows the user's pointer.
COSMIC None cosmic-comp creates one seat and has no transient-seat protocol.
niri None One seat and no transient-seat protocol.
labwc, river-classic, other wlroots compositors None One seat (labwc activates foreign toplevels on it; river-classic lists multiple seats as a TODO).

Where there is no agent seat, a window-targeted background call has no route (the notice, then focused input); element, browser tab and terminal targets still work. For full isolation, with its own keyboard and pointer, run the app in an agent-workspace-linux workspace; the notice points there. doctor lists the routes this machine has in capabilities.background_input (seat when the agent seat is available) and the seat's route, pointer support or the reason it has none in capabilities.background_seat. capabilities.background_pointer shows the GNOME pen route and its limits, or why there is none.

On GNOME Wayland (and KDE Plasma, below), background click, drag and scroll go through a virtual pen and a virtual touchscreen instead of the user's pointer (#480; the idea and the tested approach are @Ondra-Zik's). Mutter gives a tablet tool its own cursor and sends its events through the tablet protocol, not wl_pointer, so the user's mouse stays where it is. Clicks are pen taps (left), the upper barrel button (right) and the lower one (middle); click_count repeats them. GNOME 48 and later default the lower button to a right click and the upper one to a middle click, so before each action the server sets its own pen's button actions to match the buttons it presses, and resets them when the pen goes away. A drag is the pen tip pressed at the start, moved and lifted at the end. The pen leaves proximity after each action: libinput pairs a pen with a touchscreen and ignores that screen's touches while the pen is near, and that screen can be the user's. A scroll is a one-finger touch pan, 60 logical pixels per wheel notch (5 notches per page), split into strokes that stay inside the window and 48 pixels from the monitor's edges, where GNOME Shell starts its edge swipes; the finger rests before it lifts, so the app does not fling further. A window-relative point (relative: true) is mapped to capture pixels first. Before any input, the server checks through the GNOME Shell extension that the point is on the target window, on the workspace the user sees, and that no window stacked above it covers the point; both ends of a drag and every pan stroke must be on the window, and a pan always starts at the point. The results report the route as gnome-pen or gnome-touch. The devices need write access to /dev/uinput, as the uinput pointer does; without it, or without the extension, the call gets the notice and then focused input.

Limits:

  • A pen tap or a touch focuses the window it lands on, as a click does, so the user's typing goes there after it. The result says when the keyboard focus moved.
  • The window check sees windows, not GNOME Shell's own UI. The call is refused while the screen is locked, while no window has focus (the overview may be open), and when the target is not on the workspace of the focused window, but a Shell dialog, notification banner or open menu over the point is not seen.
  • Mutter sends tablet events only to clients that support the tablet protocol (GTK 3 and 4, Qt, Chromium, Firefox and Xwayland do). Other clients never see the pen, and the call cannot tell: re-observe the window. This is also why the pen is not the default route: the uinput pointer reaches every client.
  • A drag stays inside one window. A touch pan scrolls only where the app pans on touch.
  • A rotated or flipped monitor turns a touchscreen's input with it, so the pan's device values undo that monitor's transform (mutter's meta_monitor_manager_get_monitor_matrix). Mutter also turns by a built-in panel's mounting quirk, which DisplayConfig does not report, so on such a panel (some tablets and convertibles) a pan can land off the point.
  • The pen leaves proximity right after each action, so hover effects such as tooltips end with it.
  • Mutter maps an unconfigured tablet across the whole layout, and an unconfigured touchscreen to the builtin panel. When a device maps elsewhere than the point needs, the server writes that device's output setting (org.gnome.desktop.peripherals.tablet or .touchscreen, at the path keyed by the devices' own vendor and product ids, 6375:7065 and 6375:7463), waits for mutter's org.gnome.Mutter.InputMapping to confirm the new mapping, and resets the setting when the device goes away. No other device's setting is touched.
  • The devices appear on first use and go away after ten idle minutes or when the server exits.

On KDE Plasma Wayland with KWin 6.3 or later the same route runs as kwin-pen and kwin-touch. KWin gives a tablet its own cursor from 6.3 (it tracks the tablet cursor itself and moves it whether or not the client under it supports tablets). KWin maps a tablet with no setting to the active output, which follows the user's pointer, and a touchscreen to the internal panel or the first output. So before input the server sets the pen's mapToWorkspace and the touchscreen's outputName (the output under the point) through org.kde.KWin.InputDevice, reads them back, and once the devices are gone removes what KWin wrote for them into kcminputrc (the groups keyed by these devices' vendor, product and name) with kwriteconfig6. The window check goes through KWin scripting: the point must be on the target, on the desktop and activity the user sees, not minimized or hidden, with no window, panel, popup or notification stacked above it. The call is refused while KWin shows the desktop or runs a full-screen effect such as the Overview (org.kde.kwin.Effects.activeEffects), and when another setting for the device moves where input lands (calibration, input or output area, rotation). A scroll reads the output's rotation with kscreen-doctor and undoes KWin's turn of the touchscreen (KWin turns by the rotation and leaves out a flip); without kscreen-doctor, or when its output cannot be read, there is no touch route. There is no route at all when KWin's SyncWithMouse tablet option (kcminputrc [Tablet]) is on, since it moves the user's pointer to where the pen was, when KWin runs with KWIN_WAYLAND_EMULATE_TABLET, which sends pen input over apps without tablet support through the user's pointer, or without kreadconfig6 and kwriteconfig6.

Some clients mishandle a second wl_seat (Zed, zed-industries/zed#66735); that is one more reason the sway seat exists only during a call. A menu the agent opens on sway closes when its call ends, since the seat that opened it goes away. While sway is in a binding mode other than default, background keys have no route, since the mode's bindings would take them.

On-screen indicator

While an agent acts, the server drives computer-use-linux-indicator, a click-through overlay that shows what it is doing: a software cursor tinted per agent that glides to each coordinate click, drag, or scroll target and ripples on click (AT-SPI actions such as perform_action, set_value, and element clicks show in the pill without moving it, since no pointer moves); keycaps for press_key and a typing line for type_text; a glow along every screen edge; and a status pill such as Claude is using your computer · click. Pointer actions wait 350 ms so the cursor lands before the real input. While screenshot or get_app_state captures the screen, the overlay draws nothing, so agents never see it: not their own, not one shown for another agent, and not one that another agent starts mid-capture. This holds with COMPUTER_USE_LINUX_INDICATOR=0 too, which only stops a server from showing its own actions. The capture waits for the compositor only when something was on screen. The agent name comes from the MCP client's clientInfo.

The server starts the indicator on the first action and it exits after ten idle minutes. It stays hidden between bursts of activity. Compositors with wlr-layer-shell use the shared-memory overlay. GNOME uses native Shell actors through the bundled extension. X11 sessions other than GNOME show no indicator. Run setup_window_targeting once, then log out and back in after installing or updating the extension. Both renderers use the same capture lock and acknowledgement protocol. Set COMPUTER_USE_LINUX_INDICATOR=0 to turn it off.

Screenshot processing uses one blocking worker per server. Captures enter one pipeline before reading pixels, so concurrent requests do not queue decoded full-screen images. A source can contain up to 134,217,728 pixels; serial processing bounds decoded-image memory while letting MCP answer other requests during resizing and encoding. Session discovery is reused after a successful probe and refreshed when session variables change. Failed discovery is retried.

Captures require the shared capture lock and, when an overlay is running, its acknowledgement that it has hidden. A missing or invalid acknowledgement, a stalled socket, or a failed lock returns a capture error. Concurrent captures keep separate holds; their acknowledgements are exchanged in order.

MCP safety contract

computer-use-linux is not a read-only data source. It can observe the local desktop and, when a mutating tool is called, can change real application state. The tools/list response includes MCP ToolAnnotations so hosts can surface this distinction before invocation:

Class Tools Contract
Read-only observation doctor, list_apps, list_windows, focused_window, get_app_state, get_tree_page readOnlyHint=true; may reveal app, window, accessibility, and screenshot contents. get_app_state may trigger the desktop screenshot portal prompt. Its screenshot_file_path file output creates a new file and never replaces one.
Local setup mutators setup_accessibility, setup_window_targeting readOnlyHint=false, destructiveHint=false, idempotentHint=true; modifies user desktop configuration by enabling accessibility or installing/enabling the GNOME window-targeting extension.
UI state mutators activate_window, move_window, resize_window, scroll, screenshot readOnlyHint=false, destructiveHint=false; changes focus, geometry, or scroll position in the live desktop, or raises a window to capture it. screenshot_file_path file output creates a new file and never replaces one.
Desktop action mutators click, drag, press_key, type_text, perform_action, set_value, run_batch readOnlyHint=false, destructiveHint=true, openWorldHint=true; can trigger arbitrary actions in whatever local application is targeted.
Conditional notification complete_interaction Absent unless COMPUTER_USE_LINUX_NOTIFY_ON_COMPLETE=1; when enabled, readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true. Sends a desktop notification.
Conditional host-code execution run_shell Absent unless COMPUTER_USE_LINUX_ENABLE_SHELL=1; when enabled, readOnlyHint=false, destructiveHint=true, idempotentHint=false, openWorldHint=true. Runs with the MCP server user's host permissions.
Conditional host-code execution js, js_reset Absent unless COMPUTER_USE_LINUX_ENABLE_REPL=1 or COMPUTER_USE_LINUX_REPL_ONLY=1, and never registered over HTTP. js is destructiveHint=true, openWorldHint=true; js_reset is idempotent. Runs code as the MCP server user.

Annotations are safety hints, not an authorization system. MCP hosts should still ask the user before calls that could submit, delete, send, purchase, overwrite, or otherwise commit state.

run_shell is an explicit trust-boundary opt-in, not a restricted command runner. Enabling it grants an approved MCP call the same file and network authority as the user running the server. The tool clears the ambient environment and inherits only a small desktop/runtime allowlist (PATH, home/user/locale fields, display/session-bus fields); additional variables must be supplied in the visible call payload. Commands use a fixed non-login /bin/sh, an existing canonical working directory, a 30-second default / 120-second hard timeout, process-group cleanup, and stderr audit records keyed by the command SHA-256 rather than command text. Collected streams up to 8 MiB are returned with a 512 KiB per-stream response cap and truncation flag; exceeding 8 MiB on either stream fails the call without partial output. These controls bound accidental leakage and runaway work; they do not make arbitrary shell code safe.

js is host code execution at the same trust level as run_shell. Enabling it lets the model run code as the user running the server. The worker starts with an empty environment, refuses code generation from strings, and passes Node's permission flag when the installed Node supports it. These are defence in depth, not a sandbox: Node's vm module is not a security mechanism. A cancelled or timed-out call kills the worker, and the next call starts a fresh one.

The binary also exposes the same capabilities from the CLI for scripting and debugging:

computer-use-linux mcp                                  # stdio MCP server
computer-use-linux mcp --listen 127.0.0.1:5200         # streamable HTTP MCP; needs COMPUTER_USE_LINUX_MCP_TOKEN
computer-use-linux doctor                               # JSON readiness report
computer-use-linux setup                                # enable AT-SPI
computer-use-linux guard-accessibility                  # explicit foreground GNOME accessibility guard
computer-use-linux setup-window-targeting               # install GNOME Shell extension
computer-use-linux apps
computer-use-linux state [APP_NAME]
computer-use-linux screenshot                           # JSON screenshot summary
computer-use-linux windows

Support matrix

Validated manually on Ubuntu 25.10 (GNOME Shell 50.1, Wayland). niri window listing and exact focus were also validated on Ubuntu 26.10 (development), niri 26.04, with a single 2x output, through both CLI and direct IPC. Other compositor backends are implemented and covered by parser / contract tests, but real desktop behavior still depends on each session exposing its expected control API.

Desktop/session Window backend Notes
GNOME Wayland GNOME Shell extension first, org.gnome.Shell.Introspect fallback Full target. The extension provides exact window activation when GNOME blocks native introspection; Introspect can list windows and verify the current app; activating a window requires the extension.
GNOME X11 org.gnome.Shell.Introspect, then generic X11/EWMH AT-SPI works; keyboard input prefers xdotool/XTEST so the live XKB layout resolves keys correctly. Scroll uses xdotool wheel buttons so GTK 3 does not drop the event after a pointer warp.
KDE Plasma / KWin temporary KWin DBus scripting Lists and focuses windows through Plasma 5 or 6 org.kde.KWin scripting APIs when the session bus exposes them. IDs are derived from the KWin window UUID, stay the same for a window across calls, and fit JavaScript integers.
Hyprland hyprctl clients -j; focus through the Lua hl.dsp.focus dispatcher, then focuswindow Requires hyprctl in the desktop session. With COMPUTER_USE_LINUX_HYPRLAND_BACKGROUND=1, targeted keyboard input uses send_key_state and targeted capture uses grim -T, so neither focuses the window.
niri niri msg with a direct JSON IPC fallback Lists toplevels and focuses exact window IDs. When the host does not pass NIRI_SOCKET, the server reads it from its parent processes or the systemd user environment; without it, discovery requires an unambiguous socket matching WAYLAND_DISPLAY. The fallback works without the niri binary. Missing positions remain null; bounds are omitted if output scaling is unknown or mixed.
Umbriel umbriel windows --json and umbriel msg window-focus Lists toplevels with pids and focuses exact window IDs through the umbriel CLI, which needs UMBRIEL_SOCKET (passed by the host, read from the session's environment, or found as umbriel-$WAYLAND_DISPLAY.sock in XDG_RUNTIME_DIR). IDs are the first 52 bits of Umbriel's window id, so they fit JavaScript integers. Windows on a workspace that is not shown are hidden. Screenshots use dms screenshot all when the DMS shell is installed, so every output is captured; without it the portal captures one output and uinput pointer coordinates are placed inside the whole layout. Bounds are scaled to capture pixels with umbriel outputs --json: always with one enabled output, and with several only while captures cover every output, so they are left out in the portal fallback and with mixed output scales. Validated on Umbriel 0.1.0 with two stacked 2880x1800 outputs at scale 1.8.
i3, Sway i3-msg, or swaymsg when i3 is not installed; on i3, optional xprop for PID hydration Lists and focuses windows over the active i3 or Sway IPC socket. On Sway this covers native Wayland and Xwayland windows, with pids from the tree, and bounds scaled to capture pixels when every output has the same scale (left out with mixed scales). The socket is the first of I3SOCK and SWAYSOCK that names a socket file, then the newest i3 socket, then the newest Sway socket in XDG_RUNTIME_DIR. X11 windows keep their X11 id; a native Wayland window on Sway gets 2^32 plus its container id, so the two never collide.
labwc with Selkies IPC $XDG_RUNTIME_DIR/labwc.sock Requires the Selkies IPC patch; stock labwc has no such socket. Lists windows and focuses unique app-id/title matches through wlr-foreign-toplevel-management. IDs include pid, app id and title, fit JavaScript integers, and change when the title changes. Ambiguous windows are rejected. Bounds are omitted because the IPC does not expose output scaling.
COSMIC Wayland computer-use-linux-cosmic helper Installed automatically by ./install.sh, cargo install, and npm. For custom/manual layouts, put the helper next to the main binary, on PATH, or point COMPUTER_USE_LINUX_COSMIC_HELPER at it. The on-screen indicator was validated here (three outputs, mixed fractional scaling).
Other wlroots compositors (stock labwc, phoc, river-classic) zwlr_foreign_toplevel_manager_v1 on WAYLAND_DISPLAY Lists toplevels with title, app id, and activated/minimized state, and focuses unique app-id/title matches. The protocol reports no pids or bounds. IDs derive from the app id and title, fit JavaScript integers, and change when the title changes; windows sharing both are rejected for exact focus. On Sway it answers only when the i3 backend does not: when neither i3-msg nor swaymsg is installed, the IPC socket cannot be reached, or it lists no windows. Compositors that do not advertise the protocol, such as Cage, are not supported.
Generic X11 / XFCE / other EWMH WMs wmctrl plus xprop Lists, focuses, moves, and resizes windows; keyboard input prefers xdotool/XTEST, and scroll uses xdotool wheel buttons. Window origins are read from the X server, since wmctrl -lG counts the frame offset twice.

If you run on a desktop not covered above, or a covered backend does not come up cleanly, please open an issue with the output of computer-use-linux doctor.

Install

./install.sh, cargo install, the npm wrapper, and the Claude/Codex plugin launcher all install computer-use-linux, computer-use-linux-cosmic (COSMIC Wayland helper), and computer-use-linux-indicator (on-screen activity overlay) together automatically. Only manual prebuilt-binary installs need you to download all three release assets.

Option A: ./install.sh from a clone

Installs system packages on Debian/Ubuntu, Fedora/RHEL-like, Arch-like, or Artix systems; installs Rust if needed; builds all three release binaries (computer-use-linux, computer-use-linux-cosmic, and computer-use-linux-indicator); installs them to ~/.local/bin; configures ydotoold as a systemd user service when available; enables GNOME AT-SPI settings when running under GNOME; and installs the bundled GNOME Shell extension on GNOME Wayland.

git clone https://github.com/agent-sh/computer-use-linux
cd computer-use-linux
./install.sh
# log out and back in if the GNOME extension was newly installed
computer-use-linux doctor | jq .readiness

ydotool is an optional fallback. On X11, the installer includes xdotool as the required keyboard backend. If ydotool is unavailable from the configured repositories, the installer continues, but doctor still requires a keyboard-capable RemoteDesktop portal or wtype (on compatible compositors) on Wayland, or xdotool on X11; direct uinput provides absolute pointer input only. On non-systemd hosts, automatic ydotoold service setup is skipped and the installer prints a command suitable for a per-user supervisor. For an unrecognized distro, pass --package-manager apt|dnf|pacman; --force-unknown-distro auto-selects only when exactly one of those managers is available.

Option B: cargo install (Rust binaries, no system setup)

Installs all three Rust binaries from crates.io. You still handle the system-level pieces yourself: AT-SPI, desktop portals, the optional ydotoold fallback, and the GNOME extension if you need the GNOME Wayland exact-focus backend.

cargo install computer-use-linux
computer-use-linux doctor

For unreleased changes from main, install directly from Git:

cargo install --git https://github.com/agent-sh/computer-use-linux

Then, as needed:

sudo apt install ydotool at-spi2-core         # ydotool 1.0.3+ when using this fallback
sudo apt install wtype                        # optional Unicode typing on wlroots/Hyprland Wayland
systemctl --user enable --now ydotool          # only when doctor selects ydotool (Ubuntu's unit name)
computer-use-linux setup                      # gsettings AT-SPI bridge
computer-use-linux setup-window-targeting     # GNOME Shell extension

Option C: npm wrapper (binary download)

Good for users who already have Node.js and want a no-Rust install. The npm package downloads and verifies the matching computer-use-linux, computer-use-linux-cosmic, and computer-use-linux-indicator binaries during install, or on first launch when npm skipped the install script (npm 12 does for scripts it was not told to allow). The wrapper wires COMPUTER_USE_LINUX_COSMIC_HELPER and COMPUTER_USE_LINUX_INDICATOR_BIN to the bundled helpers automatically.

npm install -g @agent-sh/computer-use-linux
computer-use-linux doctor

You will still need AT-SPI enabled (computer-use-linux setup) and one input backend reported ready by doctor. Start ydotoold only when using the ydotool fallback.

Option D: prebuilt binaries

Linux x86_64 / aarch64 builds are published with each tag. Each binary ships a .sha256 next to it. The -gnu builds need glibc 2.28 or newer; the -musl builds (target=x86_64-unknown-linux-musl) are statically linked for musl distributions such as Alpine.

target=x86_64-unknown-linux-gnu
base=https://github.com/agent-sh/computer-use-linux/releases/latest/download
for binary in computer-use-linux computer-use-linux-cosmic computer-use-linux-indicator; do
  asset="$binary-$target"
  curl -L -O "$base/$asset"
  curl -L -O "$base/$asset.sha256"
  sha256sum -c "$asset.sha256"
  install -D -m 0755 "$asset" "$HOME/.local/bin/$binary"
done

You will still need AT-SPI enabled (computer-use-linux setup) and one input backend reported ready by doctor (start ydotoold only when using the ydotool fallback).

Wire it into your MCP host

The binary speaks MCP over stdio through rmcp 3.5, or over streamable HTTP with mcp --listen (see Generic MCP client). It answers `ini