MCPInstall

open-computer-use-automation

AI-powered computer automation using MCP to control desktop apps, click elements, and interact with the UI on macOS, Linux, and Windows

Installs
270
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/reason-machines/codex-skills --skill open-computer-use-automation
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads open-computer-use-automation automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

open-computer-use-automation

Skill by ara.so — Codex Skills collection.

Overview

open-computer-use is an open-source Computer Use service wrapped as MCP (Model Context Protocol). It enables AI agents to interact with desktop applications through accessibility APIs on macOS, Linux, and Windows. Inspired by OpenAI's Codex Computer Use, it provides non-intrusive automation using native accessibility features.

The project exposes tools to:

  • List running applications
  • Get application UI state and elements
  • Click elements, buttons, and UI components
  • Type text and press keys
  • Take screenshots
  • Manage app focus and windows

Installation

Global Installation

npm i -g open-computer-use

macOS Permissions

On first run, grant Accessibility and Screen Recording permissions:

open-computer-use

Follow the system prompts to enable permissions in System Settings.

MCP Integration

Install into your AI agent:

# Codex
open-computer-use install-codex-mcp

# Claude Code
open-computer-use install-claude-mcp

# Gemini CLI (project scope)
open-computer-use install-gemini-mcp

# Gemini CLI (user scope)
open-computer-use install-gemini-mcp --scope user

# opencode
open-computer-use install-opencode-mcp

Manual MCP Configuration

Add to your MCP client config (e.g., ~/.codex/config.toml, ~/.claude.json):

{
  "mcpServers": {
    "open-computer-use": {
      "command": "open-computer-use",
      "args": ["mcp"]
    }
  }
}

Skill Installation

# Install for Codex
npx skills add iFurySt/open-codex-computer-use -g -a codex --skill open-computer-use -y

# Install for Claude Code
npx skills add iFurySt/open-codex-computer-use -g -a claude-code --skill open-computer-use -y

# Update existing skill
npx skills update open-computer-use -g -y

# List installed skills
npx skills ls -g -a codex | rg 'open-computer-use'

Core Commands

CLI Usage

# Check permissions and system readiness
open-computer-use doctor

# Call a single tool (returns MCP JSON)
open-computer-use call list_apps

# Call with arguments
open-computer-use call get_app_state --args '{"app":"TextEdit"}'

# Run a sequence of operations (maintains element_index state)
open-computer-use call --calls '[
  {"tool":"get_app_state","args":{"app":"TextEdit"}},
  {"tool":"press_key","args":{"app":"TextEdit","key":"Return"}}
]'

# Run sequence from file with custom sleep between operations
open-computer-use call --calls-file sequence.json --sleep 0.5

# Show help
open-computer-use -h

Codex Plugin Installation

For Codex App (macOS):

open-computer-use install-codex-plugin

MCP Tools Reference

list_apps

List all running applications.

Arguments: None

Returns: Array of app names

{
  "apps": ["Safari", "TextEdit", "Terminal"]
}

get_app_state

Get the UI element tree for an application.

Arguments:

  • app (string, required): Application name
  • include_screenshot (boolean, optional): Include base64 screenshot

Returns: UI hierarchy with element metadata

{
  "app": "TextEdit",
  "elements": [
    {
      "element_index": 0,
      "role": "AXWindow",
      "title": "Untitled",
      "children": [...]
    }
  ],
  "screenshot": "data:image/png;base64,..."
}

click_element

Click a UI element by index.

Arguments:

  • app (string, required): Application name
  • element_index (number, required): Element index from get_app_state
  • click_type (string, optional): "single" (default) or "double"

Returns: Success confirmation

{
  "success": true,
  "element_index": 5
}

type_text

Type text into the focused field.

Arguments:

  • app (string, required): Application name
  • text (string, required): Text to type

Returns: Success confirmation

press_key

Press a keyboard key or key combination.

Arguments:

  • app (string, required): Application name
  • key (string, required): Key name (e.g., "Return", "Tab", "Command+S")

Supported keys: Return, Tab, Space, Delete, Escape, Arrow keys, Command+[key], etc.

take_screenshot

Capture the current screen.

Arguments:

  • app (string, optional): Application name to focus

Returns: Base64-encoded PNG

activate_app

Bring an application to the foreground.

Arguments:

  • app (string, required): Application name

Usage Patterns

Basic App Interaction

// From an MCP client or AI agent

// 1. List running apps
const apps = await call_tool("list_apps");

// 2. Get app UI state
const state = await call_tool("get_app_state", {
  app: "TextEdit",
  include_screenshot: true
});

// 3. Find and click a button
// (element_index 3 might be a "Save" button from state.elements)
await call_tool("click_element", {
  app: "TextEdit",
  element_index: 3
});

// 4. Type text
await call_tool("type_text", {
  app: "TextEdit",
  text: "Hello, world!"
});

// 5. Save with keyboard shortcut
await call_tool("press_key", {
  app: "TextEdit",
  key: "Command+S"
});

Sequence Execution

Create a JSON sequence file automation.json:

[
  {
    "tool": "activate_app",
    "args": {"app": "TextEdit"}
  },
  {
    "tool": "get_app_state",
    "args": {"app": "TextEdit"}
  },
  {
    "tool": "type_text",
    "args": {
      "app": "TextEdit",
      "text": "This is automated text."
    }
  },
  {
    "tool": "press_key",
    "args": {
      "app": "TextEdit",
      "key": "Return"
    }
  },
  {
    "tool": "take_screenshot",
    "args": {"app": "TextEdit"}
  }
]

Run it:

open-computer-use call --calls-file automation.json --sleep 1

Finding Elements

When you call get_app_state, inspect the returned elements to find the one you need:

{
  "elements": [
    {
      "element_index": 0,
      "role": "AXWindow",
      "title": "Document",
      "children": [
        {
          "element_index": 1,
          "role": "AXButton",
          "title": "Close",
          "enabled": true
        },
        {
          "element_index": 2,
          "role": "AXTextArea",
          "value": "Current text content"
        }
      ]
    }
  ]
}

Use element_index from this tree when calling click_element.

Cross-Platform Considerations

  • macOS: Requires Accessibility and Screen Recording permissions
  • Linux: Uses AT-SPI (accessibility toolkit)
  • Windows: Uses UI Automation API

All platforms use the same MCP interface, but element roles and properties may differ slightly.

Configuration

Environment Variables

No environment variables required for basic operation. Permissions are handled at the OS level.

Custom Sleep Between Operations

Default sleep is 1 second. Customize with --sleep:

open-computer-use call --calls-file seq.json --sleep 0.5

MCP Server Args

When configuring MCP manually, you can pass custom args:

{
  "mcpServers": {
    "open-computer-use": {
      "command": "open-computer-use",
      "args": ["mcp"],
      "env": {}
    }
  }
}

Troubleshooting

Permission Denied (macOS)

Symptom: Cannot access UI elements or take screenshots.

Solution:

  1. Run open-computer-use doctor to check permissions
  2. Grant Accessibility permission in System Settings → Privacy & Security
  3. Grant Screen Recording permission
  4. Restart the terminal or agent

App Not Found

Symptom: list_apps doesn't show the target application.

Solution:

  • Ensure the app is running
  • Check exact app name (case-sensitive): open-computer-use call list_apps
  • Some apps use different process names (e.g., "Google Chrome" vs "Chrome")

Element Index Invalid

Symptom: click_element fails with invalid index.

Solution:

  • Refresh app state with get_app_state before clicking
  • Element indices can change when UI updates
  • Use sequences to maintain state across operations

MCP Server Not Starting

Symptom: Agent can't connect to open-computer-use.

Solution:

# Verify installation
which open-computer-use

# Test manual MCP mode
open-computer-use mcp

# Reinstall globally
npm i -g open-computer-use

# Check agent config file syntax
cat ~/.codex/config.toml  # or relevant config

Linux: AT-SPI Not Available

Symptom: Tools fail on Linux with accessibility errors.

Solution:

# Install AT-SPI dependencies (Ubuntu/Debian)
sudo apt-get install at-spi2-core

# Enable accessibility
gsettings set org.gnome.desktop.interface toolkit-accessibility true

Advanced Usage

Programmatic Integration (TypeScript)

If building a custom MCP client or agent:

import { exec } from 'child_process';
import { promisify } from 'util';

const execAsync = promisify(exec);

async function automateApp(appName: string) {
  // Get app state
  const { stdout } = await execAsync(
    `open-computer-use call get_app_state --args '{"app":"${appName}"}'`
  );
  
  const state = JSON.parse(stdout);
  
  // Find button with specific title
  const button = state.elements
    .flatMap(e => e.children || [])
    .find(e => e.role === 'AXButton' && e.title === 'Submit');
  
  if (button) {
    // Click it
    await execAsync(
      `open-computer-use call click_element --args '{"app":"${appName}","element_index":${button.element_index}}'`
    );
  }
}

await automateApp('Safari');

Custom Skill Integration

When writing agent prompts or skills that use open-computer-use:

To interact with desktop apps:
1. Always list apps first to verify the target is running
2. Get app state to find element indices
3. Use element_index from state when clicking
4. Add small delays between operations (1s default)
5. Take screenshots to verify results

Example workflow:
- list_apps → verify "Safari" is running
- get_app_state(app="Safari") → find address bar element_index
- click_element(element_index=X) → focus address bar
- type_text(text="https://example.com") → enter URL
- press_key(key="Return") → navigate

Related Tools

  • Cursor Motion: Separate macOS app for smooth cursor animations (download from releases page)
  • open-browser-use: Companion project for browser-specific automation

Resources

FAQ

What does the open-computer-use-automation skill do?

AI-powered computer automation using MCP to control desktop apps, click elements, and interact with the UI on macOS, Linux, and Windows

How do I install open-computer-use-automation?

Run npx skills add https://github.com/reason-machines/codex-skills --skill open-computer-use-automation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/open-computer-use-automation/ (personal) or .claude/skills/open-computer-use-automation/ (project).

Which AI agents can use open-computer-use-automation?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is open-computer-use-automation safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains open-computer-use-automation?

It is published by reason-machines in reason-machines/codex-skills. It has 270 recorded installs.

More from reason-machines/codex-skills

View all →

academic-research-skills-codex

reason-machines/codex-skills

Open the skill to read its SKILL.md instructions.

codexplusplus-launcher

reason-machines/codex-skills

Enhanced launcher for Codex App that unlocks plugins, enables session deletion, exports conversations, and syncs provider sessions via CDP injection

Security286 installs

codex-plugin-claude-code

reason-machines/codex-skills

Open the skill to read its SKILL.md instructions.

273 installs

awesome-codex-subagents

reason-machines/codex-skills

A curated collection of 136+ specialized Codex subagents for development tasks across 10 categories

AI & Agents273 installs

oh-my-codex-workflow

reason-machines/codex-skills

Expert in Oh My Codex (OMX) - workflow layer for OpenAI Codex CLI with agents, skills, and team coordination

codexbar-menubar-ai-usage-tracker

reason-machines/codex-skills

Monitor AI coding assistant usage limits and token resets in the macOS menu bar with CodexBar

271 installs

Popular productivity & automation skills

View category →

agent-browser

vercel-labs/agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

OfficialProductivity & Automation1.3M installs

lark-doc

open.feishu.cn

飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。

lark-base

open.feishu.cn

飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。

lark-drive

open.feishu.cn

飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。

lark-shared

open.feishu.cn

Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.

lark-im

open.feishu.cn

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。