Open Computer Use

Local MCP server that reads and operates desktop app windows on macOS, Linux and Windows

By Leo (individual) Swift Local · stdio Browser automationProductivity

76 popularity score ★ 2.9k ↓ 13k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

FirstTerminal
npm i -g open-computer-use
Claude CodeTerminal
claude mcp add open-computer-use -- open-computer-use mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "open-computer-use": {
      "command": "open-computer-use",
      "args": [
        "mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "open-computer-use": {
      "command": "open-computer-use",
      "args": [
        "mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "open-computer-use": {
      "type": "stdio",
      "command": "open-computer-use",
      "args": [
        "mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.open-computer-use]
command = "open-computer-use"
args = ["mcp"]
Gemini CLITerminal
gemini mcp add --scope user open-computer-use open-computer-use -- mcp

Settings 7

OPEN_COMPUTER_USE_ALLOW_GLOBAL_POINTER_FALLBACKS Optional: Set to 1 to allow clicks, drags and keys through the real system pointer and keyboard path; may move the pointer and change focus. For click_method global, window drags.
OPEN_COMPUTER_USE_CONFIG_FILE Optional: Absolute path of the config file to use instead of ~/.config/ocu/config.json.
OPEN_COMPUTER_USE_VIRTUAL_DISPLAY_ENABLED Optional: true lets get_app_state park windows on a hidden virtual display (macOS); adds a monitor to the layout. Default false.
Set together: screenshots
OPEN_COMPUTER_USE_IMAGE_FORMAT Optional: Screenshot format: png, jpg or webp (macOS). Default png.
OPEN_COMPUTER_USE_IMAGE_MAX_DIMENSION Optional: Longest screenshot edge in pixels, 1 to 16384 (macOS). Default 1280.
OPEN_COMPUTER_USE_IMAGE_JPEG_QUALITY Optional: JPG quality from 0 to 1 (macOS). Default 0.8.
OPEN_COMPUTER_USE_IMAGE_CAPTURE_TIMEOUT Optional: Fallback capture timeout in seconds (macOS). Default 5.

What it does

Open Computer Use is an independent, open-source take on the Computer Use feature in OpenAI's Codex. It runs on your own machine as a stdio MCP server and lets an assistant see and drive ordinary desktop applications through the operating system's accessibility layer, so it works from element trees instead of watching the whole screen.

A session usually starts by listing running apps and then fetching one app's state: its accessibility tree with numbered elements, visible text and a screenshot. From there the assistant clicks, scrolls, drags, types, presses keys or sets a control's value, pointing at elements by the index from the latest state. On macOS two more tools appear. query finds controls by text or role without a screenshot or the full tree, and select_text selects a run of text in a field or puts the cursor next to it. That makes 11 tools on a Mac and 9 on Windows and Linux.

One npm package carries native runtimes for macOS (Accessibility APIs), Windows (UI Automation) and Linux (AT-SPI2), plus a CLI called open-computer-use or ocu. Besides serving MCP, the CLI can call single tools or a sequence of them, check permissions with doctor, and write its own entry into the config files of Codex, Claude Code, Gemini CLI and opencode. Screenshot format, size and timeout live in a global file, ~/.config/ocu/config.json, edited by hand or with ocu config, and environment variables win over it. The code also honours XDG_CONFIG_HOME and an OPEN_COMPUTER_USE_CONFIG_FILE override, which must be an absolute path. An optional macOS mode called Locked Use lets a task go on while the Mac is locked: it unlocks the screen behind full-screen shields and locks it again when the task ends or someone touches the mouse or keyboard.

What it needs

RuntimeNode.js 18+
Runs onmacOS, Windows, Linux
Also
  • A logged-in graphical desktop session
  • macOS 14.0 or later on a Mac, with Accessibility and Screen Recording granted
  • AT-SPI2 accessibility services on Linux

Install it globally with npm i -g open-computer-use, then on macOS run open-computer-use once to grant Accessibility and Screen Recording. Windows and Linux skip that step. Prebuilt runtimes cover x64 and arm64 on all three systems.

Limits

  • Not covered Acts on the logged-in desktop session only. On Windows a detached SSH or service context can start but may not see windows.
  • Platform query and select_text exist on macOS only, and the screenshot and virtual display settings apply to macOS.
  • Platform On Linux under Wayland, screenshots and coordinate input depend on the compositor and are best effort.
  • Platform Some click and key methods return unsupported errors on Windows or Linux, and an unsupported method does not fall back to auto.
  • Limit macOS drags are posted to the app by default and cannot move windows or drag files unless OPEN_COMPUTER_USE_ALLOW_GLOBAL_POINTER_FALLBACKS=1 is set.
  • Size cap State snapshots default to 1200 tree nodes, 64 levels and 500 characters of text, raised per call with max_tree_nodes, max_tree_depth and text_limit.
  • Size cap query visits 500 nodes by default, at most 5000, and its element indexes expire after 120 seconds.
  • Limit Screenshots are scaled to a 1280 pixel long edge by default (image.maxLongEdgePixels).

It acts on the logged-in desktop session only; on Windows a detached SSH or service context can start but may not see windows. On Linux under Wayland, screenshots and coordinate input depend on the compositor and are best-effort. The query tool and screenshot settings are macOS-only, and some click and key methods return unsupported errors on Windows or Linux. By default macOS drags are posted to the app and cannot move windows or drag files unless a global pointer fallback is switched on. State snapshots are capped at 1200 tree nodes, 64 levels and 500 characters of text unless raised per call.

Who it suits

Suits developers who want an assistant in Codex, Claude Code, Gemini CLI or another stdio MCP client to operate native desktop apps on their own computer, on any of the three main desktop systems, without a hosted service or API key. It works through accessibility trees, so it fits apps that expose them well and is weaker on canvas-heavy or poorly labelled interfaces. Because it controls the real session with full input rights, it is a poor fit for unattended servers or shared machines; for web-only tasks, the same author points to a separate browser-focused project, open-browser-use.

Tools 11

3 only read, 8 change things. A ? marks an optional parameter.

list_apps
Lists the applications currently available to control
get_app_state
Returns an app window's accessibility tree, text and screenshot, with element indexesapp: stringinclude_ax?: booleaninclude_screenshot?: booleantext_limit?: anymax_tree_nodes?: integermax_tree_depth?: integerwindow_placement?: enum
click changes
Clicks an element by index or at screen coordinatesapp: stringelement_index?: stringx?: numbery?: numberclick_count?: integermouse_button?: stringclick_method?: string
perform_secondary_action changes
Runs a named accessibility action on an element, such as opening a menuapp: stringelement_index: stringaction: string
scroll changes
Scrolls an element in a given directionapp: stringelement_index: stringdirection: stringpages?: number
drag changes
Drags from one point to another in an app windowapp: stringfrom_x: numberfrom_y: numberto_x: numberto_y: number
type_text changes
Types text into the focused field of an appapp: stringtext: stringkey_method?: string
press_key changes
Sends a key or key combination to an appapp: stringkey: stringkey_method?: string
set_value changes
Sets the value of an editable control directlyapp: stringelement_index: stringvalue: string
query
macOS only: finds controls by text or role without a screenshot or full treeapp: stringtext?: stringrole?: stringexact?: booleanlimit?: integermax_nodes?: integerwindow_id?: integer
select_text changes
macOS only: selects given text in a field or puts the cursor before or after itapp: stringelement_index: stringtext: stringprefix?: stringsuffix?: stringselection?: enum

Similar servers