MCP Windows Desktop Automation
Provides Windows desktop automation capabilities by wrapping the AutoIt library, enabling control of mouse operations, keyboard input, window management, UI controls, processes, and system operations on Windows systems.
Implemented with strict TypeScript typing throughout, allowing type-safe development and usage of the MCP server for Windows desktop automation tasks.
Click on "Deploy 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., "@MCP Windows Desktop Automation open 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.
MCP Windows Desktop Automation
A trusted-owner MCP server for an interactive Windows x64 desktop. Version 2 retains the original 50 AutoIt tools and seven prompts, adds actual PNG screenshots, and supports MCP 2026-07-28 through SDK 2.0.0. Explicit compatibility serves legacy 2025-11-25 clients.
Run
Requires Node.js 22 or newer. Install this repository or its reviewed release artifact, then run the installed command:
npm ci
npm run build
node dist/index.js --transport=stdio
# After installing the package:
mcp-windows-desktop-automation --transport=stdioStdio stdout contains only MCP JSON messages. Diagnostics, including verbose operation names, go to stderr without argument values. Closing stdin closes the server and its native helper.
Native operations require Windows x64 and the logged-in user's interactive desktop. Enumeration and protocol handling also run on Linux, where native calls return an explicit platform error. ARM64, services in session 0, headless Windows sessions, other users' sessions, and elevated windows beyond the server's privileges are not supported. No provider account or model is involved.
Related MCP server: Bridge MCP
Transports and ownership
Stdio is the default. For HTTP, set:
MCP_AUTH_TOKEN: a random owner bearer token of at least 32 characters.MCP_FILE_ROOTS: a JSON array of existing local directories, for example["C:\\Users\\me\\Documents"].Optional
MCP_ALLOWED_HOSTS: comma-separated exact Host values, including port when used.Optional
MCP_ALLOWED_ORIGINS: comma-separated exact origins.
Then launch mcp-windows-desktop-automation --transport=streamable-http --port=3000. The endpoint is http://127.0.0.1:3000/mcp; --host=ADDRESS explicitly changes the loopback default. Authorization is required for every endpoint request. Host and Origin are checked exactly; forwarded headers are not trusted, and permissive CORS is not enabled. Use a trusted TLS reverse proxy for remote deployment.
This is one owner per process, with one shared desktop, clipboard, native options, and serial command queue. Every client holding that token has the same broad OS permissions, including process launch, credentials passed to runAs, and shutdown. Deploy a separate Windows account/session/process for separate owners. File roots constrain the file resource only; automation tools are not an OS sandbox. This private bearer deployment does not implement OAuth or claim multi-tenant authorization.
HTTP supports current Streamable HTTP and deliberate stateless legacy requests. Current clients must send the standard matching MCP protocol, method, and name headers. There is no historical SSE session endpoint. The previous --transport=websocket branch was a nonfunctional placeholder; it now fails with a migration message instead of claiming WebSocket support.
Retained tools and prompts
Group | Tools |
Mouse | mouseMove, mouseClick, mouseClickDrag, mouseDown, mouseUp, mouseGetPos, mouseGetCursor, mouseWheel |
Keyboard and clipboard | send, clipGet, clipPut, autoItSetOption, opt, toolTip |
Windows | winActivate, winActivateByHandle, winActive, winClose, winExists, winGetHandle, winGetPos, winGetText, winGetTitle, winMove, winSetState, winWait, winWaitActive, winWaitClose |
Controls | controlClick, controlClickByHandle, controlCommand, controlGetText, controlSetText, controlSend, controlFocus, controlGetHandle, controlGetPos, controlMove, controlShow, controlHide |
Processes | run, runWait, runAs, runAsWait, processExists, processClose, processSetPriority, processWait, processWaitClose, shutdown |
Screenshot | takeScreenshot |
Prompts: findWindow, windowInfo, fillForm, submitForm, automateTask, monitorWindow, takeScreenshot.
The existing AutoIt argument conventions remain. Strings and integers now have explicit limits. Wait timeouts are seconds, default 10 and range 1–25; the old process-timeout description incorrectly said milliseconds. Click counts are capped at 100. Text getters use a fixed UTF-16 buffer (default/max 65,536 code units); an undersized buffer reports an error instead of silently truncating or allocating indefinitely.
Actual screenshots and file resources
takeScreenshot returns MCP image/png content:
{ "target": "fullscreen" }: visible pixels across the virtual desktop.{ "target": "window", "windowTitle": "..." }: AutoIt window selection with Win32 PrintWindow.{ "target": "region", "x": 20, "y": 20, "width": 100, "height": 80 }: a rectangle wholly inside the virtual desktop.
Resources expose screenshot://desktop and screenshot://window/{percent-encoded-title}. These replace the old text-only screenshot placeholder. Capture uses the bundled static Windows PowerShell script; request data enters through JSON stdin. No capture is saved to disk. PNGs are limited to 32 million pixels and 8 MiB, with a 15-second helper deadline. PrintWindow support varies by application; protected, minimized, or hardware-rendered windows may reject capture or produce blank pixels. Capture does not activate a window.
file:/// URIs read local files or directory listings inside canonical configured roots. Stdio defaults roots to its working directory; HTTP requires explicit roots. Files must be regular and at most 1 MiB and return base64 binary resource content; directories return up to 1,000 names. Network-host file URIs and symlink escapes are rejected. This intentionally replaces the original unbounded file access.
Cancellation and shutdown
One owned native helper isolates the AutoIt DLL from the MCP event loop. At most 16 tool/resource jobs are queued; each desktop request has a 30-second total deadline. Native options persist until the helper stops. Cancellation, timeout, or a native crash interrupts that helper; a subsequent request starts a fresh one with default options. Interrupted mutations are never replayed. Already-applied desktop changes are not undone, and applications intentionally started through run/runAs are not killed automatically.
Cancellation works on the active stdio request, including numeric request ID 0. For stateless legacy HTTP, closing the active response cancels that request; a separate legacy cancellation notification cannot address another request. Stopping the server prevents worker restart and closes transport connections.
Development and evidence
npm run check
npm run test:package
npm audit --omit=dev --audit-level=highCI runs Node 22 and 24 on Linux and Windows. Windows jobs require actual AutoIt calls against a uniquely owned WinForms fixture, Unicode control and clipboard round-trips, bounded text, screenshot pixel checks, cancellation, and helper cleanup. Linux jobs explicitly skip only that platform-specific native fixture. Both platforms test actual modern and legacy wire messages, private HTTP boundaries, concurrent overlapping client IDs, file-root escapes, installed package executables, clean stdout, and EOF.
No test invokes shutdown, runAs, or arbitrary applications. The native fixture restores clipboard text and closes only its owned window. Windows desktop behavior is verified in a disposable runner; compatibility with every third-party desktop application still depends on that application's controls and privileges.
The SDK migration follows the official v2 guide and 2026 protocol guide. Native automation uses node-autoit-koffi, with bounded calls to the bundled AutoIt DLL. Screenshots follow Microsoft's PrintWindow and CopyFromScreen APIs.
Available Tools
51 toolsautoItSetOptionCDestructive
Windows AutoIt autoItSetOption. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: value (required), option (required).
clipGetCRead-onlyIdempotent
Windows AutoIt clipGet. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: bufSize.
clipPutCDestructive
Windows AutoIt clipPut. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: text (required).
controlClickCDestructive
Windows AutoIt controlClick. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), control (required), x, y, +3 more.
controlClickByHandleCDestructive
Windows AutoIt controlClickByHandle. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: windowHandle (required), controlHandle (required), x, y, +2 more.
controlCommandCDestructive
Windows AutoIt controlCommand. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), command (required), control (required), text, +2 more.
controlFocusCDestructive
Windows AutoIt controlFocus. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), control (required), text.
controlGetHandleCRead-onlyIdempotent
Windows AutoIt controlGetHandle. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: control (required), windowHandle (required).
controlGetPosCRead-onlyIdempotent
Windows AutoIt controlGetPos. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), control (required), text.
controlGetTextCRead-onlyIdempotent
Windows AutoIt controlGetText. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), control (required), text, bufSize.
controlHideCDestructive
Windows AutoIt controlHide. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), control (required), text.
controlMoveCDestructive
Windows AutoIt controlMove. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: x (required), y (required), title (required), control (required), +3 more.
controlSendCDestructive
Windows AutoIt controlSend. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), control (required), sendText (required), mode, +1 more.
controlSetTextBDestructive
Windows AutoIt controlSetText. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), control (required), controlText (required), text.
controlShowCDestructive
Windows AutoIt controlShow. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), control (required), text.
mouseClickCDestructive
Windows AutoIt mouseClick. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: x, y, speed, button, +1 more.
mouseClickDragCDestructive
Windows AutoIt mouseClickDrag. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +2 more.
mouseDownCDestructive
Windows AutoIt mouseDown. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: button.
mouseGetCursorCRead-onlyIdempotent
Windows AutoIt mouseGetCursor. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: no named parameters.
mouseGetPosCRead-onlyIdempotent
Windows AutoIt mouseGetPos. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: no named parameters.
mouseMoveADestructive
Windows AutoIt mouseMove. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: x (required), y (required), speed.
mouseUpCDestructive
Windows AutoIt mouseUp. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: button.
mouseWheelCDestructive
Windows AutoIt mouseWheel. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: clicks (required), direction (required).
optCDestructive
Windows AutoIt opt. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: value (required), option (required).
processCloseCDestructive
Windows AutoIt processClose. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: process (required).
processExistsCRead-onlyIdempotent
Windows AutoIt processExists. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: process (required).
processSetPriorityCDestructive
Windows AutoIt processSetPriority. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: process (required), priority (required).
processWaitCRead-onlyIdempotent
Windows AutoIt processWait. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: process (required), timeout.
processWaitCloseCRead-onlyIdempotent
Windows AutoIt processWaitClose. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: process (required), timeout.
runBDestructive
Windows AutoIt run. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: program (required), showFlag, workingDir.
runAsCDestructive
Windows AutoIt runAs. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: user (required), domain (required), program (required), password (required), +3 more.
runAsWaitCDestructive
Windows AutoIt runAsWait. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: user (required), domain (required), program (required), password (required), +3 more.
runWaitCDestructive
Windows AutoIt runWait. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: program (required), showFlag, workingDir.
sendBDestructive
Windows AutoIt send. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: text (required), mode.
shutdownBDestructive
Windows AutoIt shutdown. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: flags (required).
takeScreenshotCRead-onlyIdempotent
Windows AutoIt takeScreenshot. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: x, y, width, height, +2 more.
toolTipBDestructive
Windows AutoIt toolTip. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: text (required), x, y.
winActivateCDestructive
Windows AutoIt winActivate. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), text.
winActivateByHandleCDestructive
Windows AutoIt winActivateByHandle. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: handle (required).
winActiveCRead-onlyIdempotent
Windows AutoIt winActive. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: text (required), title (required).
winCloseCDestructive
Windows AutoIt winClose. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), text.
winExistsCRead-onlyIdempotent
Windows AutoIt winExists. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), text.
winGetHandleCRead-onlyIdempotent
Windows AutoIt winGetHandle. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), text.
winGetPosCRead-onlyIdempotent
Windows AutoIt winGetPos. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), text.
winGetTextCRead-onlyIdempotent
Windows AutoIt winGetText. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), text, bufSize.
winGetTitleCRead-onlyIdempotent
Windows AutoIt winGetTitle. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), text, bufSize.
winMoveCDestructive
Windows AutoIt winMove. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: x (required), y (required), title (required), text, +2 more.
winSetStateCDestructive
Windows AutoIt winSetState. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: flags (required), title (required), text.
winWaitCRead-onlyIdempotent
Windows AutoIt winWait. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), text, timeout.
winWaitActiveCRead-onlyIdempotent
Windows AutoIt winWaitActive. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), text, timeout.
winWaitCloseCRead-onlyIdempotent
Windows AutoIt winWaitClose. Requires a trusted owner and an interactive Windows x64 desktop.
Inputs: title (required), text, timeout.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 51 tools
Most tools map to distinct AutoIt functions, but autoItSetOption and opt appear to overlap, and boilerplate descriptions offer no differentiation between similar operations like run/runWait/runAs/runAsWait or processWait/processWaitClose. An agent must rely on AutoIt domain knowledge to select correctly.
All tools use lowerCamelCase, and most follow a noun+verb pattern (e.g., mouseGetPos, winActivate, controlClick). Minor deviations exist such as takeScreenshot (verb+noun) and bare verbs (send, run, shutdown), but casing is consistent throughout.
With 51 tools, the surface is far beyond the typical 3-15 well-scoped range and approaches the rubric's extreme mismatch threshold. Many wrappers are granular (mouseDown/mouseUp, winWait variants, processWait variants), forcing agents to sort through a large set for basic automation.
Core areas like mouse, keyboard, window, control, process, run, clipboard, and screenshot are covered, enabling many direct automation workflows. However, discovery/enumeration tools (e.g., listing windows, processes, or controls) and pixel/image search are absent, leaving notable dead ends when target identifiers are unknown.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA lean local Windows automation server providing tools for mouse and keyboard control, screenshot capture, and process management. It enables programmatic interaction with the Windows desktop environment through the Model Context Protocol.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that gives any AI full control over a Windows PC, enabling application control, mouse/keyboard automation, screen capture, browser automation, and more.67 PyPI6MIT
- FlicenseNot gradedqualityDmaintenanceWindows GUI automation MCP server for Claude Code, enabling deterministic desktop app control via 32 tools including window management, input, pixel search, and file verification, leveraging the AutoIt backend.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that gives AI assistants full control over native Windows applications — launch, inspect, click, type, screenshot, and test any WinUI3, WPF, WinForms, UWP, or Win32 app.103 npm45MIT