MCP Hub
Back to servers

macos-computer-use-skill

Standalone MCP server that gives AI agents full GUI control over macOS — screenshots, mouse, keyboard, apps, clipboard, and multi-display. Zero private dependencies.

GitHub
Stars
13
Forks
8
Updated
Apr 19, 2026
Validated
Apr 25, 2026

简体中文 · 日本語

macOS Computer-Use Skill

macOS Computer-Use Skill

Standalone MCP server that gives AI agents full GUI control over macOS — screenshots, mouse, keyboard, apps, clipboard, and multi-display — with zero private dependencies.


version license platform node python MCP

Quick Start · Tools · MCP Config · ClawHub


Features

FeatureDescription
VisionScreenshot & DisplayCapture any display, enumerate monitors, zoom into regions
InputMouse & KeyboardClick, drag, scroll, type, key combos, hold keys — with IME-safe clipboard routing
AppsApplication ControlLaunch apps, detect frontmost app, list installed/running apps, tiered permission model
ClipboardRead & WriteFull clipboard access for paste-based workflows
BatchAction BatchingChain multiple actions in a single MCP call for speed
RuntimeZero-Config BootstrapAuto-creates Python virtualenv and installs dependencies on first run
PortableSkill PackagingShips as a standalone skill — install once, works without the source repo
PublicNo Private DependenciesBuilt entirely on public packages: Node.js, Python, pyautogui, mss, Pillow, pyobjc

Quick Start

1. Clone & build

git clone https://github.com/wimi321/macos-computer-use-skill.git
cd macos-computer-use-skill
npm install && npm run build

2. Run the MCP server

node dist/cli.js

On first launch the server automatically creates a Python virtualenv in .runtime/venv and installs all runtime dependencies. No Claude desktop app, no private native modules.

3. Or install from ClawHub

clawhub install computer-use-macos

[!NOTE] macOS requires Accessibility and Screen Recording permissions for the host process. The server checks both on startup and reports status through MCP.

Architecture

flowchart LR
    A[AI Agent / MCP Client] --> B[MCP Server<br/>TypeScript + stdio]
    B --> C[Tool Layer<br/>28 MCP tools]
    B --> D[Python Bridge<br/>auto-bootstrapped venv]
    D --> E[pyautogui]
    D --> F[mss + Pillow]
    D --> G[pyobjc<br/>Cocoa + Quartz]
    E --> H[Mouse / Keyboard]
    F --> I[Screenshots]
    G --> J[Apps / Displays<br/>Clipboard / Windows]

Available Tools

Vision & Display

ToolDescription
screenshotCapture the current display as a JPEG image
zoomCrop and zoom into a region of the last screenshot
switch_displaySwitch the active capture target to a different monitor

Input

ToolDescription
left_clickLeft-click at a coordinate
double_clickDouble-click at a coordinate
triple_clickTriple-click (select paragraph/line)
right_clickRight-click (context menu)
middle_clickMiddle-click
left_click_dragClick-and-drag between two points
left_mouse_downPress and hold the left mouse button
left_mouse_upRelease the left mouse button
mouse_moveMove the cursor without clicking
scrollScroll in any direction at a coordinate
typeType text (clipboard-routed on macOS to avoid IME corruption)
keyPress a key combo (e.g. cmd+c, ctrl+shift+t)
hold_keyHold a key for a duration
cursor_positionGet the current cursor coordinates

Application & System

ToolDescription
open_applicationLaunch a macOS application by name
request_accessRequest access to interact with an application
list_granted_applicationsList apps the current session has permission to control
read_clipboardRead the system clipboard
write_clipboardWrite to the system clipboard
waitPause for a specified duration

Batch & Teach Mode

ToolDescription
computer_batchExecute multiple actions in a single call
request_teach_accessRequest elevated access for teaching workflows
teach_stepSingle-step action in teach mode
teach_batchBatch actions in teach mode

MCP Configuration

Add to your MCP client config:

{
  "mcpServers": {
    "computer-use": {
      "command": "node",
      "args": ["/absolute/path/to/macos-computer-use-skill/dist/cli.js"],
      "env": {
        "CLAUDE_COMPUTER_USE_DEBUG": "0",
        "CLAUDE_COMPUTER_USE_COORDINATE_MODE": "pixels"
      }
    }
  }
}

See examples/mcp-config.json for a ready-to-use template.

Skill Install

This project ships as a self-contained skill at skill/computer-use-macos.

From ClawHub:

clawhub install computer-use-macos

From the repo:

bash skill/computer-use-macos/scripts/install.sh

The installer copies the full project to ~/.codex/skills/computer-use-macos/project — the skill keeps working even if the original clone is removed.

Environment Variables

VariableDefaultDescription
CLAUDE_COMPUTER_USE_DEBUG0Enable verbose debug logging
CLAUDE_COMPUTER_USE_COORDINATE_MODEpixelsCoordinate mode: pixels or normalized_0_100
CLAUDE_COMPUTER_USE_CLIPBOARD_PASTE1Prefer clipboard-based typing (IME-safe)
CLAUDE_COMPUTER_USE_MOUSE_ANIMATION0Animate mouse movement
CLAUDE_COMPUTER_USE_HIDE_BEFORE_ACTION0Hide overlay windows before actions

Requirements

RequirementVersion
macOS12+ (Monterey or later)
Node.js20+
Python3.10+ (ships with macOS or via Homebrew)
PermissionsAccessibility + Screen Recording

Python dependencies (pyautogui, mss, Pillow, pyobjc) are installed automatically into an isolated virtualenv on first run.

Repository Layout

macos-computer-use-skill/
├── src/
│   ├── cli.ts                    # Entry point
│   ├── server.ts                 # MCP server setup
│   ├── session.ts                # Session context factory
│   ├── computer-use/
│   │   ├── executor.ts           # macOS executor (bridges to Python)
│   │   ├── pythonBridge.ts       # Venv bootstrap + Python IPC
│   │   ├── hostAdapter.ts        # Host adapter factory
│   │   └── ...
│   └── vendor/computer-use-mcp/
│       ├── mcpServer.ts          # MCP server factory
│       ├── toolCalls.ts          # Tool dispatch logic
│       ├── tools.ts              # MCP tool schemas
│       └── ...
├── runtime/
│   ├── mac_helper.py             # Python runtime (pyautogui + pyobjc)
│   └── requirements.txt
├── skill/
│   └── computer-use-macos/       # Portable skill package
├── examples/
│   ├── mcp-config.json
│   └── env.sh.example
├── assets/
│   └── hero.svg
├── package.json
└── tsconfig.json

Roadmap

  • App icon extraction without private APIs
  • Stronger nested helper-app filtering
  • Automated MCP integration test suite
  • Pre-built release artifacts for easier distribution

Contributing

Contributions are welcome. See CONTRIBUTING.md for guidelines.

License

MIT

Acknowledgments

This project extracts and adapts reusable TypeScript computer-use logic from the Claude Code workflow, replacing the private native runtime with a fully standalone, publicly installable macOS implementation. Built on top of the Model Context Protocol.

Reviews

No reviews yet

Sign in to write a review