Skip to main content
Glama
computer
by zznabil

paotui (跑腿, "run legs": what people in Taiwan call an errand runner) is desktop computer use for Claude Code and Antigravity (agy). It runs the agent's errands inside one window at a time and uses real pointer and keyboard input by default. See When paotui interrupts. One dependency-free Node.js MCP server backed by oh-my-pi's prebuilt Rust desktop addon — lists windows, takes screenshots, reads OS accessibility trees, sends input and accesses the clipboard on Windows, macOS and Linux.

Quick start

Claude Code (v2.1.271+, Node.js 18+):

claude plugin marketplace add zznabil/paotui
claude plugin install paotui@paotui

Antigravity CLI (agy 1.5.17+) — same folder, native plugin, no conversion:

agy plugin install https://github.com/zznabil/paotui

Pin a release with agy plugin install https://github.com/zznabil/paotui/tree/v0.4.0. agy also installs a local folder (a clone, or the extracted release zip): agy plugin install ./paotui. It does not install a .zip file directly.

On first use the server downloads @oh-my-pi/pi-natives-<platform>-<arch>@19.3.0 (exact pin, --ignore-scripts, ~130–300 MB unpacked) into the host's plugin data folder. Then just ask:

  • "List my open windows."

  • "Take a screenshot of the Notepad window and tell me what it says."

  • "In the Settings window, turn on Dark mode."

Coming from computer@claude-computer (0.3.x): this is the same plugin under its new name. Install paotui@paotui as above, then claude plugin uninstall computer@claude-computer and claude plugin marketplace remove claude-computer (agy: agy plugin uninstall computer). Old COMPUTER_* variables and an old settings.json still apply until you set new ones. Tool names change from mcp__plugin_computer_computer__* to mcp__plugin_paotui_paotui__* (agy: computer_computer to paotui_paotui): update allow-lists.

Related MCP server: dsh-computer-use

When paotui interrupts

IMPORTANT

Takeover is on by default. paotui can interrupt you and the agent using it.

You (your screen, pointer and keyboard):

  • Takeover: prefer tries real pointer and keyboard input first. If Windows refuses activation before sending input or has no foreground window to restore, it tries the background once. If the app cannot act in the background and Windows refused activation, it retries takeover after 250 ms and 750 ms. fallback tries background input first. Both modes also take over for foreground-only accessibility actions. Takeover brings the target forward and tries to hand focus back. Keys you type meanwhile can land in the wrong window.

  • Front-window calls: desktop and display:* targets drive your real pointer and keyboard. raise_window, open_application with activate or reveal, raise actions and element_focus (off macOS) bring windows forward. On macOS, reading a menu makes its window key.

  • What the app does: a press or keystroke can open dialogs, menus or new windows on your screen, as it would for you. hold_keys and hold_mouse hold input for up to 100 s.

  • Requests to you: the agent may ask you to unlock the screen, close a system picker that holds the foreground, approve OS permissions (macOS Screen Recording and Accessibility, Wayland RemoteDesktop) or approve tool calls.

The agent (its calls fail, stop or wait):

  • Escape: a physical Escape during a takeover stops it, even one you press for your own reasons. The next input call returns UserStopped, and the agent must stop and report.

  • Refusals: with takeover: refuse, calls that need takeover fail. If Windows blocks activation for a foreground-only action, it may need the user to bring the target forward. Locked sessions, UAC prompts and elevated windows block input.

  • Waits and resets: calls run one at a time. The first call waits for the one-time addon download (130–300 MB). A UI Automation call that hangs times out (ax_timeout_ms, 30 s), and the new session drops element refs and screenshot frames, so the agent must read them again.

Screenshot cost

Use text ax_tree or ax_find when accessibility exposes the information you need. For pixel checks, start with detail: "low" and use changes: true after an action. An unchanged frame returns text only. The token estimate beside each image describes that image alone. Actual cost depends on the model and what the host keeps in context.

Each image has a short Caption: line in a text block. Full screenshot and observe IDs increment per target for the life of the server process. A usable replacement points to an earlier full frame in the same native session with supersedes: f1. Zoom and changes captions can carry a base ID for the full frame they refer to. The host controls compaction and can keep the caption after dropping superseded pixels. Use retained captions to resume inspection. Before acting on a UI whose image was dropped, take a fresh screenshot or read the current accessibility tree.

  • Claude Code. Use a focused /compact or Compact Instructions in CLAUDE.md to ask for the latest relevant captions and UI state in the summary. Claude Code context management

  • Codex CLI. Ask for a short text checkpoint with relevant target and frame IDs before running /compact. Codex CLI commands

  • oh-my-pi. With snapcompact, discarded history is serialized and can be rendered to PNGs as part of the archive. Record important UI details in text before compaction and check your compaction.methodOrder if you prefer a text summary. oh-my-pi compaction

  • Hermes Agent. Use /compress with a focus on the latest relevant captions and the UI state needed to resume. Hermes CLI

  • OpenCode 2. Keep key UI findings in a text checkpoint before compaction. If the retained recent history is too large, review compaction.keep.tokens, which controls its approximate size. OpenCode compaction

How it works

Safety boundary

WARNING

Screen content (window text, web pages, documents, notifications) isuntrusted data and never authorises an action. The agent must confirm with you before sending, buying, deleting, or changing settings. Use a separate account or VM for risky work.


Kind

Tools

Inspect (12 read-only)

capabilities, list_displays, list_windows (wait polls up to 10 s for a window that is still opening), list_applications, screenshot (zoom or changes), observe (screenshot + tree), ax_tree, ax_find, ax_element, ax_element_at, ax_focused, clipboard_read

Act on elements (7)

element_press (default press, any named AX action, optional menu path), element_set_value, element_focus, element_click, element_type, element_press_keys, element_select_text

Native input (8)

click, move_mouse, drag, scroll, type_text, press_keys, hold_keys (keys held 0–100 s, then released), hold_mouse (button held 0–100 s, then released)

Other actions (6)

menu_items (not read-only: makes window key on macOS), menu_select, raise_window, open_application, clipboard_write, reset_session

  • Targets: a window id from list_windows, "desktop", or "display:<id>", "display:active", "display:all".

  • Verify changes with screenshot { target, changes: true } after a full screenshot of that target. It returns only the changed crop with its x,y offset, or no image if unchanged. A missing baseline, different size or scale, or large change returns a new full screenshot.

  • Image cost appears with each image as an area-based Claude-style estimate (width × height / 750). Actual billing varies by model. For a smaller verification frame, use detail: "low" on screenshot or observe. It bounds the image to 1024×576 and preserves its aspect ratio. Follow a low-detail full frame with changes: true to reuse its size. Use detail: "full" to restore normal bounds.

  • Coordinates: pointer x,y are pixels in the latest full screenshot of the same target. Zoom (region) never changes that frame. AX bounds and ax_element_at use global desktop coordinates. To click in window-local coordinates, pass frame: "window" with pixels from the window's top-left corner (an ax_find bound minus the window's x,y). This preserves the current capture bounds and changes: true baseline. If a frame is needed, the server uses the last requested bounds or the defaults.

  • Small conveniences: a target may be written window:<id>; raise_window takes target as well as id; type_text presses Tab for \t and Enter for \n; ax_find lists exact title/value matches first, and exact: true keeps only those.

Every tool carries MCP annotations: 12 inspection tools set readOnlyHint: true, 19 other tools set readOnlyHint: false (input/mutation tools also set destructiveHint: true).

Claude Code — In plan mode, read-only tools run without prompting (tested with Claude Code 2.1.332). To auto-allow the 12 inspection tools in default mode while keeping prompts for input, add to ~/.claude/settings.json or .claude/settings.json:

{
  "permissions": {
    "allow": [
      "mcp__plugin_paotui_paotui__capabilities",
      "mcp__plugin_paotui_paotui__list_displays",
      "mcp__plugin_paotui_paotui__list_windows",
      "mcp__plugin_paotui_paotui__list_applications",
      "mcp__plugin_paotui_paotui__screenshot",
      "mcp__plugin_paotui_paotui__observe",
      "mcp__plugin_paotui_paotui__ax_tree",
      "mcp__plugin_paotui_paotui__ax_find",
      "mcp__plugin_paotui_paotui__ax_element",
      "mcp__plugin_paotui_paotui__ax_element_at",
      "mcp__plugin_paotui_paotui__ax_focused",
      "mcp__plugin_paotui_paotui__clipboard_read"
    ]
  }
}

Antigravity (agy) — agy ignores readOnlyHint and names the server paotui_paotui. Add to ~/.gemini/antigravity-cli/settings.json (or pass via agy --settings '<json>'):

{
  "permissions": {
    "allow": [
      "mcp(paotui_paotui/capabilities)",
      "mcp(paotui_paotui/list_displays)",
      "mcp(paotui_paotui/list_windows)",
      "mcp(paotui_paotui/list_applications)",
      "mcp(paotui_paotui/screenshot)",
      "mcp(paotui_paotui/observe)",
      "mcp(paotui_paotui/ax_tree)",
      "mcp(paotui_paotui/ax_find)",
      "mcp(paotui_paotui/ax_element)",
      "mcp(paotui_paotui/ax_element_at)",
      "mcp(paotui_paotui/ax_focused)",
      "mcp(paotui_paotui/clipboard_read)"
    ]
  }
}

Leave out clipboard_read and screenshot if you want a prompt before reading potentially private data. Do not use --dangerously-skip-permissions for real work.

  • Claude Code: run /plugin configure paotui@paotui or /config. To update: claude plugin marketplace update paotui, then claude plugin update paotui@paotui, then restart Claude Code. Try a local clone for one session with claude --plugin-dir /path/to/paotui.

  • Antigravity (agy): put settings.json in PLUGIN_DATA (e.g. ~/.gemini/antigravity-cli/plugin_data/paotui/settings.json), which survives updates:

{ "takeover": "refuse", "max_width": 1366, "max_height": 768 }

To update in agy, close running agy sessions first on Windows (so the open server doesn't block renaming the folder), then re-run agy plugin install. Remove with agy plugin uninstall paotui.

Setting

Default

Effect

takeover

prefer

prefer: send real input first where supported; try background input if Windows refuses activation or has no foreground window to restore. fallback: try background input first, then take over if the background route is unavailable. Both take over when an accessibility action requires the foreground. refuse: never take over; refuses takeover: true, desktop/display input, raise_window, raise AX actions, open_application with activate/reveal, off-macOS element_focus, and (macOS) menu-opening calls. On tools with a takeover option, false requests background-only input for window targets. Desktop/display targets still send real input.

max_width / max_height

1366 / 768

Maximum screenshot dimensions sent to the agent; input coordinates follow the delivered image.

image_max_edge

0 (off)

Env PAOTUI_IMAGE_MAX_EDGE. Caps either side of a delivered image, including explicit screenshot dimensions. AX pages reflow to fit, or return text when the cap is too small.

call_timeout_ms

120000

Env: PAOTUI_CALL_TIMEOUT_MS. Cancels calls past deadline (Timeout).

install_timeout_ms

600000

Env: PAOTUI_INSTALL_TIMEOUT_MS. Kills hung first-run npm install.

Precedence: environment variable (PAOTUI_*, else the pre-0.4 COMPUTER_*) → settings.json in plugin data dir (CLAUDE_PLUGIN_DATA, PLUGIN_DATA, or ~/.cache/paotui; while that has none, the one under the old plugin id) → default. Call capabilities to inspect the active host, data folder, settings, and sources.

  • Windows: Chromium (including Brave and WebView2), Electron, XAML/WinUI hosts (e.g. modern Notepad) and terminal hosts can ignore posted input. Use takeover for these apps. Chromium and WebView2 can also require the foreground for accessibility actions; prefer and fallback bring the target forward and retry when the addon confirms it sent nothing. Takeover needs a foreground window to hand focus back to and can fail when Windows blocks activation (ForegroundLockTimeout). A refusal identifies the foreground holder when available. An element_press or menu_select that opens a modal dialog returns once the dialog appears and names it (Win32 Invoke would block until the dialog closes). A keystroke that opens a dialog of the target app counts as sent, and the reply names the dialog. element_set_value falls back to clicking the field, select-all and typed keystrokes on classic Win32 edit and combo boxes that ignore the accessibility write. Some apps (Excel's fill handle, many canvases) ignore background drags: verify the drag, then rerun once with takeover: true if nothing changed. Native limits the server cannot fix are listed in docs/upstream-notes.md. Elevated/UAC/locked screens block input. list_windows returns [] when no top-level window is open and prefers exact app names over substrings.

  • macOS: grant Screen Recording and Accessibility to the terminal/IDE running Claude Code or agy, then restart it. element_select_text, open_application with app/reveal, and window return on open are macOS-only.

  • Linux: X11 requires RandR/XTEST and AT-SPI. Wayland lacks per-window background input and raise_window, needs the ScreenCast portal + libpipewire-0.3, and requests RemoteDesktop permission. The new takeover default has only been tested live on Windows, not macOS or Linux.

  • Session &amp; scope: one tool call runs at a time; element refs and screenshot frames live per server process (reset_session or restart drops them); graceful close runs on host disconnect / SIGINT / SIGTERM.

  • Intentionally omitted from omp: task-scoped control.acquire, the computer.run JS runner, the computer.display setting (pick a display:<id> target per call instead) and macOS bringToCurrentSpace.

  • Why reuse the omp addon: omp's desktop backend is a large Rust codebase (Win32/macOS/X11/Wayland capture, input, UIA/AX/AT-SPI) shipped prebuilt for 6 platforms under MIT (@oh-my-pi/pi-natives 19.3.0). server/native.mjs loads the .node binary directly in plain Node.js without Bun, while server/mcp.mjs answers initialize immediately even during first-run download.

  • Credits: Native backend, tool design, input policy, and safety guidance from oh-my-pi by Can Bölük, Mario Zechner and Stencil Labs, Inc. (MIT — see NOTICE). omp's computer use began in commit b9504f65e7 ("feat: add native Codex computer use", 2026-07-23) and became a general tool in 681d7daf65 (2026-07-24).

  • License: MIT — see LICENSE.

  • Updating the addon: the pin is exact and updated by hand. node scripts/check-addon-drift.mjs lists every place that names it and compares with npm; a weekly workflow opens an issue on drift. To bump: change all of those places to the new version, run npm test and node test/live-hold.mjs, then release.

Antigravity desktop and agy share the root plugin.json. Claude Code reads .claude-plugin/plugin.json. Keep both manifest versions in sync with package.json.

npm install                    # optional: install platform addon into ./node_modules
npm test                       # protocol, annotation, config, refuse and timeout tests
claude plugin validate .
agy plugin validate . --strict
node test/live-notepad.mjs     # Windows: scratch Notepad round-trip
node test/live-agy.mjs         # Windows + agy: agy drives a scratch Notepad round-trip
node test/live-hold.mjs        # Windows: hold_keys, hold_mouse and list_windows wait on a scratch WinForms window (works while the screen is locked)
node scripts/check-addon-drift.mjs   # pinned addon vs npm latest (--offline: local pins only)
node scripts/make-art.mjs      # regenerate assets/icon.png and assets/banner.png

Available Tools

33 tools
ax_elementInspect elementA
Read-onlyIdempotent

Read one element by ref: role, title, value (full), bounds, actions; optionally its attributes, children and parent.

Inputs: ref (required), parent, children, attributes.

ax_element_atElement at pointA
Read-onlyIdempotent

Accessibility hit-test at GLOBAL logical desktop coordinates (as in ax_find bounds / list_windows, not screenshot pixels).

Inputs: x (required), y (required), target.

ax_findFind elementsA
Read-onlyIdempotent

Query a window's AX tree by role/title/value; returns element records with refs and global desktop bounds. title and value match substrings (case-insensitive); exact matches come first, and exact: true returns only those.

Inputs: target (required), role, exact, limit, +3 more.

ax_focusedFocused elementB
Read-onlyIdempotent

The element holding keyboard focus, or null.

Inputs: no named parameters.

ax_treeAccessibility treeA
Read-onlyIdempotent

OS accessibility tree of a window. Default format is text, one node per line: - role "label" [ref=eN]: "value" plus states. With format: "frames", returns up to 12 PNG pages with per-page captions and token estimates, refs first, and non-ASCII shown as \u{…} escapes. If frames are not cheaper, returns text. Confirm exact refs using ax_find. Refs stay valid across reads until the element's role/label changes; a ref missing from the last two reads throws StaleRef (re-read, never guess).

Inputs: target (required), all, format, maxDepth, +1 more.

capabilitiesComputer capabilitiesB
Read-onlyIdempotent

Backend, permissions, display count, lock state, takeover setting, and running server and tool schema versions.

Inputs: no named parameters.

clickClickB
Destructive

Click at screenshot pixels in a target window. Takeover brings the window forward and sends real pointer input.

Inputs: x (required), y (required), target (required), menu, +5 more.

clipboard_readRead clipboardA
Read-onlyIdempotent

Read clipboard text; with image: true, the clipboard image as PNG with a caption and estimated token cost.

Inputs: image.

clipboard_writeWrite clipboardB
Destructive

Replace the clipboard with text.

Inputs: text (required).

dragDragA
Destructive

Drag along a path of screenshot pixels, optionally holding keys/modifiers. A background drag reaches apps that read posted mouse messages; apps that read the real pointer (Excel's fill handle, many canvases) ignore it, so check the result and rerun once with takeover: true when nothing changed.

Inputs: path (required), target (required), keys, frame, +3 more.

element_clickClick elementA
Destructive

Click an element by ref (no screenshot needed). On Windows, Chromium content such as WebView2 needs takeover and a pointer point that hits the element. Gecko supports background clicks at a point verified against the element. Other covered controls can use an accessibility press for a plain left click.

Inputs: ref (required), menu, count, button, +2 more.

element_focusFocus elementB
Destructive

Give an element keyboard focus. Off macOS this can bring its window forward.

Inputs: ref (required).

element_pressPress elementA
Destructive

Perform an accessibility action on an element: default "press"; others from ax_element actions (e.g. "showMenu", "increment"). With menu, choose that item path in the menu the action opens. When a Windows control requires the foreground, the server takes over if its setting allows.

Inputs: ref (required), menu, action.

element_press_keysPress keys in elementB
Destructive

Press a key chord in an element once it holds keyboard focus.

Inputs: ref (required), keys (required), takeover.

element_select_textSelect text in elementB
Destructive

Select text inside an element's value (or place a caret) without focus change or keystrokes; returns the selection read back. macOS backend.

Inputs: ref (required), text (required), prefix, select, +1 more.

element_set_valueSet element valueA
Destructive

Set an element's value through accessibility (text fields, sliders, pickers) without keystrokes. On Windows, the server takes over for a foreground-only write when permitted. If a classic Win32 edit or combo box ignores the accessibility write, it selects and types the value, then reads it back.

Inputs: ref (required), value (required).

element_typeType into elementA
Destructive

Type text into an element: native text fields take it by AX insertion, others as keystrokes once focused. "\t" is not turned into a Tab key press here; to move to the next field use type_text or press_keys "tab".

Inputs: ref (required), text (required), takeover.

hold_keysHold keysA
Destructive

Hold keys down for a duration in seconds (0-100), then release them all before the call returns (also on error). For a single chord use press_keys; this is for gestures that need a key held while time passes.

Inputs: keys (required), target (required), duration (required), takeover.

hold_mouseHold mouse buttonA
Destructive

Press and hold a mouse button at screenshot pixels for a duration in seconds (0-100), optionally with keys held, then release before the call returns (also on error).

Inputs: x (required), y (required), target (required), duration (required), +4 more.

list_applicationsList applicationsA
Read-onlyIdempotent

Installed/running applications with ids usable by open_application. Pass query (name substring) to find one app: an unfiltered list has hundreds of entries and is cut at limit.

Inputs: limit, query, runningOnly.

list_displaysList displaysB
Read-onlyIdempotent

Monitors with global logical geometry and pixel size.

Inputs: no named parameters.

list_windowsList windowsA
Read-onlyIdempotent

Capturable top-level windows: {id, app, title, pid, x, y, width, height, focused}. app prefers exact app names (case-insensitive) and falls back to substrings, as in omp; title is a case-insensitive substring. A failed title filter does not prove a window is absent. wait (0-10000 ms) polls every 100 ms and returns as soon as one window matches, to catch a window that is still opening; with no match by then the list is empty.

Inputs: app, wait, limit, title.

move_mouseMove pointerB
Destructive

Move the pointer to screenshot pixels in a target (background moves give no hover).

Inputs: x (required), y (required), target (required), frame, +1 more.

observeScreenshot + accessibility treeA
Read-onlyIdempotent

Screenshot and AX tree of one target in one call. The full image includes a caption with its frame id and any superseded frame, plus an estimated token cost. Use detail: low for a smaller screenshot.

Inputs: target (required), all, detail, maxDepth, +3 more.

open_applicationOpen applicationA
Destructive

Launch an application by id/path/unique name from list_applications (behind the user's app unless activate). On macOS it also opens a file, folder or URL (in its default app, or app), or with reveal shows it selected in Finder, and returns the window; other platforms throw Unsupported for URLs, app and reveal.

Inputs: id (required), app, reveal, activate.

press_keysPress keysC
Destructive

Press a key chord in the target window.

Inputs: keys (required), target (required), takeover.

raise_windowRaise windowB
Destructive

Bring a window to the front and give it the user's keyboard. Use when the window itself needs to be raised; prefer and fallback already take over for foreground-only actions when permitted.

Inputs: id, target.

reset_sessionReset sessionA
Idempotent

Close the native desktop session: drops screenshot frames and element refs. The next call opens a new one. It runs at once, even while another call is stuck, and cancels that call.

Inputs: no named parameters.

screenshotScreenshotA
Read-onlyIdempotent

Capture a window or display as PNG with a text caption and estimated image token cost. Full captures have frame ids and identify superseded frames. Use detail: low for cheaper verification. Pointer x,y for input tools are pixels of the latest FULL screenshot of the same target. With region, returns a zoomed detail view. Use changes: true to verify against the last full screenshot of this target. It returns a crop with its position, or no image if unchanged. Zoom and delta crops preserve the full input frame. A missing baseline, changed size or scale, or large change returns a new full screenshot.

Inputs: target (required), detail, region, changes, +2 more.

scrollScrollB
Destructive

Scroll at screenshot pixels. Positive dy scrolls down, positive dx right (wheel detents).

Inputs: x (required), y (required), target (required), dx, +3 more.

type_textType textA
Destructive

Type text into the target window's focused control. "\n" presses Enter and "\t" presses Tab (e.g. "Item\tPrice\n" fills two cells and moves down). To type into a known field prefer element_type or element_set_value.

Inputs: text (required), target (required), takeover.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 33 tools

    Disambiguation3/5

    The set has several overlapping pairs: screenshot/observe/ax_tree, click/element_click, type_text/element_type/element_set_value, and press_keys/element_press_keys/hold_keys. The detailed descriptions do explain when to prefer each, but an agent still faces real selection ambiguity across these input paths.

    Naming Consistency4/5

    Nearly all names are snake_case with recognizable domain prefixes (ax_*, element_*, list_*, clipboard_*, menu_*). A few bare verbs and noun-only names (click, drag, observe, capabilities) deviate slightly but remain readable and predictable.

    Tool Count2/5

    At 33 tools the surface is heavy for desktop automation, and several could be consolidated (element vs coordinate input variants, multiple key/mouse hold tools). While the domain is broad, the count exceeds what an agent can keep cleanly separated.

    Completeness4/5

    Core desktop workflows are covered: discovery, screenshots, AX inspection, pointer/keyboard input, clipboard, menus, windows, and app launching. Minor gaps exist around window management (move/resize/close) and clipboard image writing, but workarounds are plausible.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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.
      1
      MIT
    • A
      license
      C
      quality
      C
      maintenance
      Enables 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.
      30
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables an agent to observe and operate desktop apps and browsers through an accessibility-tree-first view, with clicking, typing, scrolling, dragging and waiting tools. Screenshot handling, coordinate mapping and fail-closed safety rules (risk confirmation, deny-listed apps, stale-observation refusal) are enforced inside the server.
      9
      Apache 2.0