Skip to main content
Glama
Just1dream

Computer Use MCP

by Just1dream
README.md
# Computer Use MCP

Windows **Computer Use** MCP: local OCR (PP-OCRv4 / RapidOCR) + optional YOLO icon detect + mouse/keyboard.

You do **not** need the full [Enikk](https://github.com/gtt116/enikk) desktop app — only this MCP layer.

**License:** [PolyForm Noncommercial 1.0.0](./LICENSE) — free for non-commercial use; **commercial use requires a paid license** ([COMMERCIAL.md](./COMMERCIAL.md)).  
Third-party / Enikk MIT notes: [NOTICE](./NOTICE).

> Platform: **Windows 10/11** only. Requires [uv](https://docs.astral.sh/uv/) (`uvx`).

## Install with uvx (from GitHub)

```powershell
uvx --from git+https://github.com/Just1dream/computer-use-mcp computer-use-mcp-auto
```

### Cursor / Claude `mcp.json`

```json
{
  "mcpServers": {
    "computer-use": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Just1dream/computer-use-mcp",
        "computer-use-mcp-auto"
      ]
    }
  }
}
```

First run downloads Python dependencies into an isolated uv environment (needs network). Later runs use the cache.

### Optional env

| Variable | Meaning |
|----------|---------|
| `COMPUTER_USE_WEIGHTS` | Folder with `rapidocr/` and `icon_detect/model.onnx` |
| `COMPUTER_USE_HOME` | Portable install root (set by `run-mcp.cmd`) |
| `COMPUTER_USE_SKIP_BOOTSTRAP=1` | Skip copy/download of weights on start |
| `COMPUTER_USE_SCREENSHOT_DIR` | Where PNGs are saved |
| `COMPUTER_USE_MAX_DIM` | Max screenshot side (default 1366) |

Weights are **not** in this repo (large). Place them under `%LOCALAPPDATA%\ComputerUseMCP-Auto\weights` or set `COMPUTER_USE_WEIGHTS`. OCR may fall back to RapidOCR defaults if models are missing; icon YOLO needs `icon_detect/model.onnx`.

## Portable zip (offline-friendly)

On a Windows machine with the repo:

```powershell
.\pack-zip.ps1                 # slim
.\pack-zip.ps1 -IncludeWeights # embed models if available locally
```

Recipients: unzip → `.\install-to-cursor.ps1` → restart Cursor. See [FOR_RECIPIENTS.md](./FOR_RECIPIENTS.md).

## Tools

| Tool | Description |
|------|-------------|
| `list_windows` / `find_window` / `focus_window` | Window discovery |
| `screenshot` / `parse_ui` | Capture + local OCR/icons (`[0,1000]` coords) |
| `click_normalized` / `type_text` / `hotkey` / `press_key` / `scroll_normalized` | Input |
| `weights_info` / `bootstrap_weights` | Model path / ensure weights |

Typical loop: `list_windows` → `parse_ui` / `screenshot` → `click_normalized`.

## Security

This MCP can **see the screen and control mouse/keyboard**. Only enable for trusted users/hosts.

## License

- **Default:** PolyForm Noncommercial 1.0.0 — non-commercial free; commercial use needs a separate license (`COMMERCIAL.md`).
- **Upstream:** Enikk MIT portions and third-party packages — see `NOTICE`.

Commercial inquiries: edit the email in `COMMERCIAL.md` (placeholder `YOUR_EMAIL@example.com`).