open-computer-use
Desktop app control over MCP on macOS, Linux and Windows through each system's accessibility APIs
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
Opens the app, which asks before it adds the server.
npm i -g open-computer-useclaude mcp add open-computer-use -- open-computer-use mcp{
"mcpServers": {
"open-computer-use": {
"command": "open-computer-use",
"args": [
"mcp"
]
}
}
}{
"mcpServers": {
"open-computer-use": {
"command": "open-computer-use",
"args": [
"mcp"
]
}
}
}{
"servers": {
"open-computer-use": {
"type": "stdio",
"command": "open-computer-use",
"args": [
"mcp"
]
}
}
}[mcp_servers.open-computer-use]
command = "open-computer-use"
args = ["mcp"]gemini mcp add --scope user open-computer-use open-computer-use -- mcpOPEN_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. |
|---|---|
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. |
| Set together: screenshots | |
OPEN_COMPUTER_USE_IMAGE_FORMAT |
Optional: Screenshot format: png, jpg or webp (macOS). |
OPEN_COMPUTER_USE_IMAGE_MAX_DIMENSION |
Optional: Longest screenshot edge in pixels, 1 to 16384 (macOS). |
OPEN_COMPUTER_USE_IMAGE_JPEG_QUALITY |
Optional: JPG quality from 0 to 1 (macOS). |
OPEN_COMPUTER_USE_IMAGE_CAPTURE_TIMEOUT |
Optional: Fallback capture timeout in seconds (macOS). |
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.
| Runtime | Node.js 18+ |
|---|---|
| Runs on | macOS, Windows, Linux |
| Also |
|
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.
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.
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.
3 only read, 8 change things. A ? marks an optional parameter.
list_appsget_app_stateapp: stringinclude_ax?: booleaninclude_screenshot?: booleantext_limit?: anymax_tree_nodes?: integermax_tree_depth?: integerwindow_placement?: enumclick changesapp: stringelement_index?: stringx?: numbery?: numberclick_count?: integermouse_button?: stringclick_method?: stringperform_secondary_action changesapp: stringelement_index: stringaction: stringscroll changesapp: stringelement_index: stringdirection: stringpages?: numberdrag changesapp: stringfrom_x: numberfrom_y: numberto_x: numberto_y: numbertype_text changesapp: stringtext: stringkey_method?: stringpress_key changesapp: stringkey: stringkey_method?: stringset_value changesapp: stringelement_index: stringvalue: stringqueryapp: stringtext?: stringrole?: stringexact?: booleanlimit?: integermax_nodes?: integerwindow_id?: integerselect_text changesapp: stringelement_index: stringtext: stringprefix?: stringsuffix?: stringselection?: enum