nut-js-mcp-server — README.md
❯cat README.md
# nut-js MCP
An MCP server wrapping @nut-tree-fork/nut-js for full desktop automation. Exposes tools for mouse control, keyboard input, screen capture, clipboard management, and YAML-based scenario execution to any MCP-compatible AI client.
❯cat nut-js-mcp-server/ARCHITECTURE.md
## How It Works
The MCP server wraps nut-js, a cross-platform native automation library. Each MCP tool call maps directly to a nut-js action. Screen capture returns base64 PNG. For complex workflows, YAML scenario files describe multi-step sequences that the server executes atomically.
MCP Client (Claude) ──stdio──▶ nut-js MCP Server
└── @nut-tree-fork/nut-js
└── libnut (native bindings)
└── OS accessibility APIs
└── Screen capture (OS API)❯nut-js-mcp-server --demo
## Screenshots
nut-js-mcp — mouse + keyboard
❯ mouse_move x=640 y=400 ✓ Mouse at (640, 400) ❯ mouse_click button=LEFT ✓ Left click at (640, 400) ❯ keyboard_type text=Hello, world! ✓ Typed 13 characters ❯ keyboard_press_key keys=[LeftControl, S] ✓ Key combo: Ctrl+S
nut-js-mcp — screen capture
❯ screen_capture fileName=desktop ✓ Saved: desktop.png (2560×1600) ❯ screen_capture_region x=100 y=50 width=800 height=600 ✓ Saved: region.png (800×600) ❯ clipboard_get ✓ Clipboard: "Hello, world!" ❯ screen_color_at x=640 y=400 ✓ RGBA: (30, 30, 30, 255) → #1e1e1e
❯grep -n "## Features" nut-js-mcp-server/README.md
## Features
- +Mouse control (move, click, drag, scroll)
- +Keyboard input and shortcuts
- +Screen capture and region capture
- +Clipboard read/write
- +YAML scenario execution
❯nut-js-mcp-server --compare
## vs. The Field
| Feature | nut-js MCP | PyAutoGUI | xdotool (Linux) |
|---|---|---|---|
| MCP protocol native | ✓ | ✗ | ✗ |
| Cross-platform | ✓ | ✓ | ✗ |
| Screen capture | ✓ | ✓ | ✗ |
| YAML scenario files | ✓ | ✗ | ✗ |
| Claude Code integration | ✓ | ✗ | ✗ |
❯cd nut-js-mcp-server && cat INSTALL.md
## Installation
1
Install
The pre-compiled bundle ships with native bindings included.
npx -y @web4w3/install nut-js
2
Grant macOS permissions
System Settings → Privacy & Security → Accessibility → add your terminal. Also add Screen Recording permission.
⚠ Without these permissions, nut-js commands will silently fail on macOS.
3
Add to Claude config
{
"mcpServers": {
"nut-js": {
"command": "npx",
"args": ["-y", "@web4w3/install", "nut-js"]
}
}
}❯cat nut-js-mcp-server/package.json | jq '.dependencies | keys'
## Tech Stack
Node.jsTypeScriptnut-jsMCP SDK