windows-computer-use-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@windows-computer-use-mcpopen Notepad and type 'Hello world'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Windows Computer Use MCP Server
A Model Context Protocol (MCP) server that gives AI agents human-like control over Windows. Combines visual perception (screenshots) with simulated mouse and keyboard input to operate any application exactly the way a person would — no API integration required.
Why This Matters
Works everywhere: Any Windows application — legacy software, virtual machines, restricted platforms — can be automated via visual perception and input simulation, even when no API or webhook exists.
Reduces account ban risk: On heavily regulated platforms, API-based automation is easily detected and flagged. Simulated human operations (real mouse movements, natural typing cadence) are far harder to distinguish from genuine users.
Layered cost efficiency: Use fast structured perception (
perceive,describe_screen) for routine checks (~1k tokens), fall back to full screenshots only when visual confirmation is needed (~5-50k tokens), and call native APIs directly when available for zero-token operations.Multimodal-first design: When paired with a vision-capable model, the AI can literally "see" the screen and reason about visual layouts, icons, images, and UI states — just like a human looking at a monitor.
Project Story
This project was built by someone who doesn't know how to code.
The author is a Genshin Impact player who wanted AI to help with repetitive in-game tasks — farming, map clearing, daily commissions. The goal was simple: let AI see the screen and operate the game just like a human would, reducing the grind without risking account bans from API-based automation.
Built with a $300 GPU and a Local Model
The entire project was developed using Claude Code + a local Gemma 4 26B Q4 quantized model running on a single RTX 5060 Ti 16G — the best hardware the author could access. No cloud compute, no engineering team, no prior programming experience.
The author estimated cloud API costs would be too expensive for the volume of iteration needed, so everything was done locally. The tradeoff: a small local model that frequently made mistakes, wrote broken code, and struggled to maintain context across restarts.
The "AI Error Corrector" Workflow
Despite not understanding code syntax, the author discovered a workflow that made development possible:
Maintain a clear logical chain — know exactly what the project is supposed to do, step by step
When the AI gets stuck — identify where the problem is, even without knowing how to fix it in code
Point the AI at the problem — describe what went wrong and what the expected behavior should be
The AI self-corrects — with clear guidance, even a small model can break out of dead ends
"I don't understand code, but I know my project's logic inside and out. When something breaks, I know exactly where to look. I became an AI error corrector — the AI writes, I review, the AI fixes. That loop works even if you've never written a line of code."
One Month from Zero to Open Source
From the first npm install to this release: about one month. The author learned what Node.js is, what Rust does, how MCP works, and what "compilation" means — all through conversations with Claude Code. Every concept in this project was explained by AI to someone hearing it for the first time.
The author notes that using a cloud model (like the Claude Opus powering this session) would have made development significantly easier — faster iteration, fewer mistakes, better code generation. But the constraint of a small local model forced a deep understanding of the project's logic, which turned out to be the real skill that made this possible.
What's Next
The current version works, but the author's vision goes further: integrating specialized Agents and purpose-built models to handle complex multi-step tasks with better reliability. The end goal is an AI that can truly play games alongside humans — not as a bot, but as a collaborative agent that sees and operates the screen like a person.
Key takeaway: You don't need to be a programmer to build software with AI. You need clear thinking, a logical chain, and the willingness to be the AI's "error corrector."
Table of Contents
Installation
Prerequisites
Requirement | Version | Check |
Windows | 10 or 11 |
|
Node.js | ≥ 20.0.0 |
|
Method 1: Install from npm (Recommended)
npm install -g @betrayzl/windows-computer-use-mcpThis installs a pre-built package — no Rust compiler needed. After installation, configure your MCP client to launch:
node C:\Users\<你的用户名>\AppData\Roaming\npm\node_modules\@betrayzl\windows-computer-use-mcp\bundle\index.jsOr find the exact path with:
npm root -gMethod 2: Download Pre-built Release
Go to Releases
Download the latest
windows-computer-use-mcp-v*.zipExtract anywhere
Double-click
start.bat, or runnode bundle/index.js
No Rust compiler required.
Method 3: Build from Source
Requires Rust stable toolchain in addition to Node.js.
git clone https://github.com/betrayzl/windows-computer-use-mcp.git
cd windows-computer-use-mcp
npm install
node build.jsThe build script performs four stages:
Compile Rust native module —
napi build --platform --releaseinnative/Compile TypeScript —
tsccompilessrc/→dist/Bundle with ncc —
@vercel/nccbundlesdist/index.jsinto a singlebundle/index.jsCopy native binary — The compiled
.nodefile is copied tobundle/win-cu-native.node
A successful build outputs:
✨ Build complete!
📦 Output location: bundle/
👉 You can now configure your MCP client to use: node bundle/index.jsTroubleshooting Build
npm install -g @napi-rs/cliThen run node build.js again.
Ensure you ran node build.js (not just tsc) and the Rust toolchain is installed. The build script compiles native/ from source — the .node file must match your CPU architecture.
# Verify Rust is installed
rustc --version
cargo --versionThis can happen when running in a virtual machine or via RDP without a GPU. Try using describe_screen or perceive instead, which use UI Automation (no GPU required).
The target window may be running as Administrator while the MCP server is not. Run the MCP server with the same privilege level as the target application.
Usage
Configure Your MCP Client
Add to your MCP client configuration (Claude Desktop, OPENCLAW, etc.):
{
"mcpServers": {
"windows-computer-use": {
"command": "node",
"args": ["path/to/windows-computer-use-mcp/bundle/index.js"]
}
}
}You can also run it directly for testing:
node bundle/index.js
# MCP server now listening on stdioQuick Start: A Complete Workflow
Here is a typical session using 4 tools to accomplish a task:
1. perceive({ targetProcess: "notepad" })
→ Check what's on screen, whether notepad is in foreground
→ Returns: elements list, foreground info, occlusion warning
2. focus_app({ processName: "notepad" })
→ Bring notepad to front if it was obscured
3. click({ x: 500, y: 300, processName: "notepad" })
→ Click the text area (processName ensures notepad is frontmost first)
4. type({ text: "Hello from MCP!" })
→ Type text into the focused editor
5. screenshot({})
→ Visually confirm the result (with a vision-capable model)Two Operating Modes
Visual Mode (with vision-capable models)
When your AI model supports image inputs, you get the full "human-like" experience:
Use
screenshotto see the entire screenThe model reasons about what it sees — buttons, text, images, layouts
Use
click,type,dragto interact
Structured Mode (non-vision models)
When your model cannot process images, use the cost-efficient perception tools:
Use
perceive(~1k tokens) to get a structured description of UI elementsUse
describe_screento get a text summary of what's visibleUse
get_ui_elementsfor detailed element trees with coordinates
Preventing Misclicks (Window Occlusion)
The most common failure mode in desktop automation is clicking the wrong window. The server provides three safeguards:
Pass
processNametoclick()— automatically focuses the target window before clickingCheck
perceive()warning field — detects if your target is obscuredCall
focus_app()explicitly — brings any window to the foreground
// Safe click — always lands on the right window
click({ x: 400, y: 200, processName: "chrome" })
// Before desktop operations
show_desktop()
get_desktop_icons() // auto-calls show_desktop internallyFeatures
Visual Perception
Tool | Token Cost | Description |
| ~50k | Full-screen JPEG capture. The AI "sees" the screen — reads text, recognizes icons, understands layouts. Use when visual confirmation is essential. Supports |
| ~5k | Captures a specific screen region by pixel coordinates. Combine with |
| ~1k | [Recommended] Smart screen awareness. Automatically selects the most efficient method — returns structured element data, text description, display info, foreground app, and occlusion warnings. |
| ~1k | Human-readable text description of the current screen: foreground app, display parameters, all visible UI elements with names, types, and positions. |
| ~500 | Raw UI Automation element tree. Lowest-cost perception — returns name, control type, coordinates, enabled/visible state for each element. Filter by process name. |
Mouse Input
Tool | Description |
| Move cursor to (x, y) logical coordinates. DPI-aware across multi-monitor setups. |
| Click at coordinates. Supports left/right/middle buttons, double-click ( |
| Press-and-drag from start to end coordinates. Optional start (uses current position if omitted). |
| Mouse wheel scroll at position (dx/dy for horizontal/vertical). |
Keyboard Input
Tool | Description |
| Send single keys or combinations: |
| Type text with natural cadence into the focused input field. |
| Write text to the system clipboard. |
| Read text from the system clipboard. |
Window & Desktop Management
Tool | Description |
| Bring a window to foreground by process name. Uses a 6-level strategy including UI Automation bypass for elevated windows. |
| Launch an application (by name or path), or activate it if already running. |
| Get the name and process path of the currently active window. |
| Get a window's bounding rectangle (physical pixels). Useful before |
| Temporarily hide specific process windows — for clean screenshots without visual clutter. Returns handles for restoration. |
| Restore windows hidden by |
| Minimize all windows (Win+D). |
| List all desktop icons with names and coordinates. Auto-shows desktop first. |
| Reposition desktop icons by name to specified logical coordinates. Operates directly on the SysListView32 control for instant results. |
System & Utility
Tool | Description |
| Monitor geometry — physical width/height, DPI scale factor. |
| Enumerate all installed Windows applications. |
| Pause execution for a specified duration (seconds). Useful for waiting on UI animations. |
Architecture
AI Agent (MCP Client)
↕ MCP Protocol (JSON-RPC over stdio)
Windows Computer Use MCP Server
├── TypeScript Layer (src/)
│ ├── index.ts — 24 MCP tool definitions & request handlers
│ ├── executor.ts — High-level API, DPI scaling, focus enforcement
│ ├── utils.ts — Multi-monitor logical↔physical coordinate mapping
│ └── types.ts — TypeScript interfaces
│
└── Rust Native Module (native/src/)
├── capture.rs — DXGI hardware-accelerated screen capture (full + region)
├── input.rs — Keyboard/mouse simulation via enigo
├── uia.rs — UI Automation element tree (41 control types, low-cost perception)
├── window.rs — Window management, 6-level focus strategy, desktop icon arrangement
└── apps.rs — Installed application enumerationCoordinate System
All tools accept and return global logical coordinates (DPI-aware):
UI Automation returns physical pixels → automatically converted to logical coordinates
Multi-monitor setups with different DPI scales are handled transparently
You never need to worry about DPI — just use the coordinates from perception tools
Contributing
We welcome contributions! Here's how to get started:
Read CONTRIBUTING.md for development setup and guidelines
Check the issues page for open work
Follow Conventional Commits for commit messages (
feat:,fix:,docs:, etc.)
Development Quick Start
git clone https://github.com/betrayzl/windows-computer-use-mcp.git
cd windows-computer-use-mcp
npm install
node build.js # Full build
node bundle/index.js # Test run
node tests/test_driver.js # Run diagnosticsAdding a New Tool
Add the tool definition to
src/index.tsAdd the handler case in
CallToolRequestSchemaImplement the method in
src/executor.tsAdd Rust implementation in
native/src/if low-level Windows API is neededExport the function from
native/src/lib.rsUpdate this README with the new tool
Security
This server has deep Windows system access (screen capture, keyboard/mouse simulation, process management, cross-process memory). Please review SECURITY.md before use.
Run the server with the lowest privilege level needed for your task
Be cautious when automating sensitive applications (banking, admin consoles)
Review automation scripts before executing them unattended
The server operates entirely locally — no data is sent to external services
License
This project is licensed under the MIT License — see LICENSE for the full text.
Built with NAPI-RS, enigo, and the Model Context Protocol SDK.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/betrayzl/windows-computer-use-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server