Skip to main content
Glama
kh-computer-use

kh-computer-use

by kh3ldoun

KH Computer Use

Original MIT-licensed Windows desktop MCP server and portable agent skill. Designed for Codex, Claude Desktop, Claude Code, Cursor, and other local MCP clients. Not affiliated with OpenAI; contains no code copied from the proprietary Computer Use plugin.

Install

Requires Windows 10/11, an unlocked interactive desktop, Node.js 20+, and Windows PowerShell 5.1. Extract or clone this project to a permanent folder, then run npm ci there. Use the absolute path to server.mjs in the configurations below.

Claude Desktop and Cursor

Merge this entry into mcpServers in Claude Desktop's %APPDATA%/Claude/claude_desktop_config.json or Cursor's %USERPROFILE%/.cursor/mcp.json. Replace the example path.

{
  "mcpServers": {
    "kh-computer-use": {
      "command": "node",
      "args": ["C:/path/to/kh-computer-use/server.mjs"],
      "env": { "KH_COMPUTER_USE_ALLOW_INPUT": "1" }
    }
  }
}

Codex

codex mcp add kh-computer-use --env KH_COMPUTER_USE_ALLOW_INPUT=1 -- node C:/path/to/kh-computer-use/server.mjs

Claude Code

claude mcp add --transport stdio --env KH_COMPUTER_USE_ALLOW_INPUT=1 kh-computer-use -- node C:/path/to/kh-computer-use/server.mjs

Restart the client after configuration. Confirm that six tools appear. Omit the environment variable or set it to 0 to allow only screenshots and window discovery. Copy skills/kh-computer-use into a client's supported skill directory, or provide its SKILL.md as agent instructions. Other AI applications need an MCP client that supports local stdio servers and image tool results.

Related MCP server: Windows Computer Bridge MCP

Tools

Tool

Purpose

list_windows

Visible titled windows and handles

screenshot

PNG of the visible virtual desktop and pixel bounds

focus_window

Restore and focus an existing window

click

Single left/right click at absolute desktop coordinates

type_text

Literal Unicode text with Windows SendInput

press_key

Named key or a supported shortcut

Input tools are disabled by default. Enabling input permits changes in foreground applications. There is no remote listener or arbitrary shell execution tool. Data from tools is passed as base64 JSON, not interpolated script. Screen content is returned to the connected AI client. The server does not save screenshots. Use one controlling agent at a time: separate client processes share the same physical desktop. Windows may reject input to elevated apps. Locked sessions, secure desktops, and occluded-window capture are unsupported. No UI accessibility tree, scrolling, dragging, or browser DOM tools are included in this first release.

Verification

Run npm test. The integration test checks a real MCP handshake, tool discovery, native window listing, a PNG screenshot, schema rejection, and the default input gate. It does not send mouse or keyboard input. Live operation in each supported AI application requires a separate acceptance check.

Share and publish

The source is MIT licensed. Share the ZIP or upload this folder to your GitHub repository, excluding node_modules. Recipients run npm ci and configure their own local client. A cloud-hosted AI cannot control this desktop unless it has an appropriate local MCP bridge; this package does not create that bridge.

Reference documentation:

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI models to control a local Windows desktop by moving the cursor, clicking, scrolling, typing Unicode text, sending key chords, and capturing screenshots. Runs natively on Windows with minimal latency and no heavy dependencies such as Python, PyAutoGUI, or Docker.
      151 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI clients to inspect and control allowlisted Windows applications using screenshots, mouse actions, Unicode keyboard input, UI Automation, and an Esc/F12 emergency stop.
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables an AI assistant to see and control your local desktop on Windows and Linux by capturing screenshots, clicking, scrolling, pressing hotkeys, typing text, and reading or writing the clipboard. Actions can be batched into a single call that ends with a fresh screenshot.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to see and operate Windows applications through MCP, including windows, screenshots, mouse, keyboard, scrolling, UI Automation, clipboard, and freehand or geometric drawing. Supports supervised creative workflows with native Win32 input, screenshots, allow-listed apps, and an idle safety guard.
      MIT