Skip to main content
Glama
linux-computer-use-skill

linux-computer-use-skill

by wimi321

Install From ClawHub

Published on ClawHub as computer-use-linux.

clawhub install computer-use-linux

Related MCP server: desk-mcp

Positioning

This repository is:

  • a top-level skill

  • a standalone Linux desktop-control runtime

  • a computer-use MCP server for agent ecosystems

It is packaged skill-first instead of depending on any local Claude install.

Why This Exists

The requirement is stricter than "wrap an existing install":

  • no dependency on a local Claude app

  • no private .node binaries

  • no extracted hidden assets

  • install the skill, build the server, and use it

This project follows that rule on Linux.

What You Get

  • top-level Linux computer-use skill

  • standalone MCP server for screenshots, mouse, keyboard, app launch, window/display mapping, and clipboard

  • public dependency chain only: Node.js + Python + pyautogui + mss + Pillow + psutil + python-xlib

  • first-run runtime bootstrap: the server creates its own virtualenv and installs dependencies automatically

  • bundled skill install that copies the full project into ~/.codex/skills/computer-use-linux/project

  • extracted TypeScript tool layer wired to a Linux-native Python backend

Status

Implemented in this repository:

  • Linux Python helper and runtime bootstrap

  • display enumeration and screenshot pipeline

  • mouse, keyboard, drag, scroll, and clipboard primitives

  • frontmost app, app-under-point, running app, installed app, and window-display lookup paths

  • Linux-first skill packaging and bundled project payload

  • TypeScript build passing

Still recommended before production use:

  • validate on a real Linux host

  • test multiple desktop environments and monitor layouts

  • test focus, clipboard, and permission edge cases

This session did not have a live Linux machine attached, so runtime behavior on Linux has been implemented and built, but not end-to-end verified on a real Linux desktop.

What Was Fixed In 0.1.1

Version 0.1.1 fixes a Linux packaging regression in the shared system-key blocklist and platform typing. The migrated shared files had been edited into an invalid copied branch, which meant Linux builds were not using a clearly defined Linux shortcut denylist.

This release restores explicit Linux handling for system-level shortcut checks and syncs the fix into both the source tree and the bundled skill payload.

Important Scope

Current desktop-control support is aimed at X11 sessions.

Notable implications:

  • X11 desktop sessions are the primary target

  • Wayland may block or limit screenshots, focus inspection, clipboard access, and synthetic input depending on compositor policy

  • distro / desktop-environment differences can affect behavior

Architecture

flowchart LR
    A[Agent / MCP Client] --> B[linux-computer-use-skill]
    B --> C[Extracted TypeScript MCP tools]
    B --> D[Standalone Python bridge]
    D --> E[pyautogui]
    D --> F[mss + Pillow]
    D --> G[psutil + python-xlib]
    E --> H[Mouse / Keyboard]
    F --> I[Screenshots]
    G --> J[Apps / Windows / Displays / Clipboard]

Install

1. Clone and install Node deps

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

2. Start the server

node dist/cli.js

On first launch, the project will automatically:

  • create .runtime/venv

  • bootstrap pip if needed

  • install the Python runtime dependencies from runtime/requirements.txt

MCP Configuration

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

See examples/mcp-config.json.

Skill Install

This repo ships a top-level skill at skill/computer-use-linux.

Option A: Install from ClawHub

clawhub install computer-use-linux
bash skill/computer-use-linux/scripts/install.sh

After installation, the bundled project lives at:

~/.codex/skills/computer-use-linux/project

If CODEX_HOME is set, use that location instead.

Validation Matrix

Validated in this session:

  • npm run check

  • npm run build

  • Python syntax compile check for runtime/linux_helper.py

  • bundled skill source integrity checks

  • bundled project version sync checks

  • review of Linux-specific runtime paths for X11 display discovery, screenshots, clipboard, frontmost app, app enumeration, and window/display lookup

Not yet validated in this session:

  • real Linux GUI control

  • live screenshot capture on Linux

  • foreground-window enforcement against real Linux apps

  • Wayland behavior under different compositors

  • mixed desktop-environment and multi-monitor edge cases

Runtime Notes

Permissions

Linux desktop control can still be limited by:

  • Wayland compositor restrictions

  • sandboxed app isolation

  • session / remote desktop boundaries

  • desktop-environment specific focus and clipboard behavior

Screenshot Filtering

This standalone runtime reports screenshotFiltering: none.

That means screenshot filtering is not compositor-native; gating still happens at the MCP layer.

Platform Scope

This repository is intentionally Linux-only.

Covered capabilities:

  • screenshots

  • mouse control

  • keyboard input

  • frontmost app inspection

  • installed / running app discovery

  • window-to-display mapping

  • clipboard access

  • app launch

Example Commands

npm run build
node dist/cli.js
node --input-type=module -e "import { callPythonHelper } from './dist/computer-use/pythonBridge.js'; console.log(await callPythonHelper('list_displays', {}));"

Repository Layout

src/
  computer-use/
    executor.ts
    hostAdapter.ts
    pythonBridge.ts
  vendor/computer-use-mcp/
runtime/
  linux_helper.py
  requirements.txt
skill/
  computer-use-linux/
examples/
assets/

Environment Flags

  • CLAUDE_COMPUTER_USE_DEBUG=1

  • CLAUDE_COMPUTER_USE_COORDINATE_MODE=pixels

  • CLAUDE_COMPUTER_USE_CLIPBOARD_PASTE=1

  • CLAUDE_COMPUTER_USE_MOUSE_ANIMATION=1

  • CLAUDE_COMPUTER_USE_HIDE_BEFORE_ACTION=0

Roadmap

  • validate and harden on real Linux hardware

  • improve app identity and icon extraction on Linux

  • add automated Linux integration tests

  • document Wayland-specific limitations and alternatives

License

MIT

Credits

This project preserves and adapts reusable TypeScript computer-use logic recovered from the Claude Code workflow, then replaces the missing private runtime with a fully standalone public Linux implementation.

Available Tools

24 tools
computer_batchA

Execute a sequence of actions in ONE tool call. Each individual tool call requires a model→API round trip (seconds); batching a predictable sequence eliminates all but one. Use this whenever you can predict the outcome of several actions ahead — e.g. click a field, type into it, press Return. Actions execute sequentially and stop on the first error. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. The frontmost check runs before EACH action inside the batch — if an action opens a non-allowed app, the next action's gate fires and the batch stops there. Mid-batch screenshot actions are allowed for inspection but coordinates in subsequent clicks always refer to the PRE-BATCH full-screen screenshot.

Inputs: actions (required).

cursor_positionA

Get the current mouse cursor position. Returns image-pixel coordinates relative to the most recent screenshot, or logical points if no screenshot has been taken.

Inputs: no named parameters.

double_clickA

Double-click at the given coordinates. Selects a word in most text editors. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.

Inputs: coordinate (required), text.

hold_keyA

Press and hold a key or key combination for the specified duration, then release. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. System-level combos require the systemKeyCombos grant.

Inputs: text (required), duration (required).

keyA

Press a key or key combination (e.g. "return", "escape", "cmd+a", "ctrl+shift+tab"). The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. System-level combos (quit app, switch app, lock screen) require the systemKeyCombos grant — without it they return an error. All other combos work.

Inputs: text (required), repeat.

left_clickA

Left-click at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.

Inputs: coordinate (required), text.

left_click_dragB

Press, move to target, and release. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.

Inputs: coordinate (required), start_coordinate.

left_mouse_downA

Press the left mouse button at the current cursor position and leave it held. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Use mouse_move first to position the cursor. Call left_mouse_up to release. Errors if the button is already held.

Inputs: no named parameters.

left_mouse_upA

Release the left mouse button at the current cursor position. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Pairs with left_mouse_down. Safe to call even if the button is not currently held.

Inputs: no named parameters.

list_granted_applicationsA

List the applications currently in the session allowlist, plus the active grant flags and coordinate mode. No side effects.

Inputs: no named parameters.

middle_clickA

Middle-click (scroll-wheel click) at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.

Inputs: coordinate (required), text.

mouse_moveA

Move the mouse cursor without clicking. Useful for triggering hover states. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.

Inputs: coordinate (required).

open_applicationA

Bring an application to the front, launching it if necessary. The target application must already be in the session allowlist — call request_access first.

Inputs: app (required).

read_clipboardA

Read the current clipboard contents as text. Requires the clipboardRead grant.

Inputs: no named parameters.

request_accessA

Request user permission to control a set of applications for this session. Must be called before any other tool in this server. The user sees a single dialog listing all requested apps and either allows the whole set or denies it. Call this again mid-session to add more apps; previously granted apps remain granted. Returns the granted apps, denied apps, and screenshot filtering capability.

Inputs: apps (required), reason (required), clipboardRead, clipboardWrite, +1 more.

right_clickA

Right-click at the given coordinates. Opens a context menu in most applications. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.

Inputs: coordinate (required), text.

screenshotA

Take a screenshot of the primary display. On this platform, screenshots are NOT filtered — all open windows are visible. Input actions targeting apps not in the session allowlist are rejected. Returns an error if the allowlist is empty. The returned image is what subsequent click coordinates are relative to.

Inputs: save_to_disk.

scrollA

Scroll at the given coordinates. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.

Inputs: coordinate (required), scroll_amount (required), scroll_direction (required).

switch_displayA

Switch which monitor subsequent screenshots capture. Use this when the application you need is on a different monitor than the one shown. The screenshot tool tells you which monitor it captured and lists other attached monitors by name — pass one of those names here. After switching, call screenshot to see the new monitor. Pass "auto" to return to automatic monitor selection.

Inputs: display (required).

triple_clickA

Triple-click at the given coordinates. Selects a line in most text editors. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing.

Inputs: coordinate (required), text.

typeA

Type text into whatever currently has keyboard focus. The frontmost application must be in the session allowlist at the time of this call, or this tool returns an error and does nothing. Newlines are supported. For keyboard shortcuts use key instead.

Inputs: text (required).

waitA

Wait for a specified duration.

Inputs: duration (required).

write_clipboardA

Write text to the clipboard. Requires the clipboardWrite grant.

Inputs: text (required).

zoomA

Take a higher-resolution screenshot of a specific region of the last full-screen screenshot. Use this liberally to inspect small text, button labels, or fine UI details that are hard to read in the downsampled full-screen image. IMPORTANT: Coordinates in subsequent click calls always refer to the full-screen screenshot, never the zoomed image. This tool is read-only for inspecting detail.

Inputs: region (required), save_to_disk.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 24 tools

    Disambiguation5/5

    Each tool targets a distinct action or resource: click variants (left/double/triple/right/middle), mouse primitives (down/up/move/drag), keyboard (type/key/hold_key), and permission tools (request_access/open_application/list_granted_applications) are all clearly separable. Overlaps that could confuse are explicitly differentiated in the descriptions (e.g. screenshot vs zoom, type vs key).

    Naming Consistency4/5

    Naming is uniformly snake_case and mostly follows verb_noun (left_click, mouse_move, request_access, read_clipboard). Minor deviations like the bare-verb tools (type, key, scroll, wait, zoom) and the noun-style computer_batch break the pattern slightly but remain readable and unambiguous.

    Tool Count4/5

    24 tools is on the heavy side, but this is an inherently low-level input/observation domain where each primitive (each click type, down/up pairing, clipboard, display switching) earns its place. computer_batch also mitigates round-trip overhead, so the surface is defensible rather than bloated.

    Completeness5/5

    The set covers the full computer-use lifecycle: permission gating, launching apps, multi-monitor capture, zoom inspection, all mouse and keyboard primitives including drag and hold, clipboard read/write, waiting, and cursor reporting. No obvious operational gaps for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server that provides computer control capabilities including mouse movements, keyboard actions, screenshot capture with OCR, and window management through a unified API.
      727 PyPI
      174
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A desktop automation MCP server that enables AI agents to interact with Linux environments through screenshots, window inspection, and input simulation. It provides tools for mouse control, keyboard input, and screen capture using xdotool and XDG Desktop Portals.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for computer automation that provides tools for screenshots, mouse actions, keyboard input, and drag-and-drop functionality. It supports cross-platform desktop interaction for both Linux (X11) and Windows environments.
      2,318 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A standalone MCP server for Windows desktop control, enabling screenshots, mouse and keyboard input, app launch, window/display management, and clipboard access via natural language.
      3
      MIT