autoit-mcp

autoit-mcp

Windows 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.

Category
访问服务器

README

autoit-mcp (portable)

Windows GUI-automation MCP server for Claude Code — drive any desktop app deterministically (launch, wait for windows, click controls/menus/coords, type keys, read text, search pixels) and prove results on disk (a saved/exported file appearing = proof), instead of relying on screenshots.

Backed by the official AutoItX3 DLL (via PyAutoIt, loaded directly — no COM registration). A bundled copy of full AutoIt v3 also enables the .au3 escape hatch (UDFs, _ScreenCapture, registry, complex macros) and Aut2Exe compile. 32 tools, all prefixed au_.


What's in this folder

autoit-mcp/
  server.py            the MCP server (single file)
  requirements.txt     mcp + PyAutoIt
  install.ps1          one-shot setup (venv + deps + skill + .mcp.json snippet)
  autoit3/             bundled full AutoIt (AutoIt3_x64.exe, AutoItX, Aut2Exe, Include)
  skill/autoit-gui/    bundled Claude Code SKILL (standalone run+verify+screenshot)
  README.md            this file
  .gitignore
  (.venv/  logs/  mcp.snippet.json   created by install.ps1 at runtime)

~12 MB. Self-contained except for Python (see prerequisites).

The bundled skill (autoit-gui)

This package ships its own Claude Code skill so a fresh machine is fully self-sufficient — it does NOT rely on the run / verify / screen-capture skills (which won't exist there). The skill teaches the model to launch an app, drive menus/controls, take a screenshot via the bundled _ScreenCapture UDF, and prove a save/export by checking the file on disk. install.ps1 copies it to %USERPROFILE%\.claude\skills\autoit-gui\ automatically; restart Claude Code to load it. (To install manually, copy skill\autoit-gui\ there yourself.)

Prerequisites on the new machine

  • Windows (uses Win32 + AutoItX).
  • Python 3.9+ on PATH (python.org — tick Add Python to PATH). That's the only thing not bundled.
  • Claude Code (the host that loads MCP servers).

Install (3 steps)

  1. Copy this whole autoit-mcp/ folder anywhere on the new machine (e.g. C:\tools\autoit-mcp).
  2. Open PowerShell in the folder and run:
    powershell -ExecutionPolicy Bypass -File .\install.ps1
    
    It creates a local .venv, installs deps, smoke-tests (TOOLS 32), and writes mcp.snippet.json with the correct absolute paths for this machine.
  3. Merge that snippet into your project's .mcp.json (under mcpServers), e.g.:
    {
      "mcpServers": {
        "autoit": {
          "command": "C:\\tools\\autoit-mcp\\.venv\\Scripts\\python.exe",
          "args": ["C:\\tools\\autoit-mcp\\server.py"]
        }
      }
    }
    
    Then restart Claude Code and approve the autoit server in /mcp.

No global install, no admin rights, no AutoItX COM registration needed.

Verify it loaded

In Claude Code after restart, the autoit server should expose 32 au_* tools. Quick check from the model: call au_autoit_info → should report run_au3_available: true and point at …\autoit3\AutoIt3_x64.exe (bundled).


Tools (32, prefix au_)

Group Tools
Process au_run, au_process_close, au_process_exists, au_process_wait_close
Window au_win_wait, au_win_exists, au_win_activate, au_win_get_pos, au_win_get_text, au_win_get_state, au_win_set_state, au_win_close, au_list_windows
Input au_send(keys, raw), au_mouse_click(x,y,…), au_mouse_move(x,y)
Menu/Control au_win_menu_select, au_control_click, au_control_send, au_control_set_text, au_control_get_text, au_statusbar_get_text, au_set_option
Clipboard au_clip_get, au_clip_put
Pixels (chromeless UIs) au_pixel_get_color, au_pixel_search
Disk proof au_file_exists, au_wait_file
Full AutoIt au_run_au3(script,timeout), au_compile_au3(script_path,out_exe), au_autoit_info()

Defaults: DPI-aware (coords = physical pixels), WinTitleMatchMode=2 (window title matched as a substring anywhere). Every tool returns structured JSON ({ok:true,…} / {ok:false,error}) and never crashes the call. Calls are logged to logs/YYYY-MM-DD.log.

Design choices (vs. a generic "generate .au3" MCP)

  • Direct AutoItX DLL calls, not COM Dispatch("AutoItX3.Control") (COM needs regsvr32; the DLL doesn't).
  • No temp .au3 for ordinary actions — direct calls are faster + sturdier. .au3 is the escape hatch only (au_run_au3), for what AutoItX lacks.

Gotchas learned on real targets

  • au_win_menu_select only works on native Win32/MFC menus. Many modern apps (Qt / WPF / Electron / CEF) use owner-drawn menus that WinMenuSelectItem can't see → it no-ops. For those use accelerators: au_send("{ALTDOWN}{ALTUP}") then "f" then "a" = Save As. Keep au_win_menu_select for classic Win32 apps.
  • CEF/Qt welcome/home screens have no native controls and reflow on resize → coordinate clicks are fragile. Prefer launching with a document argument, or use au_pixel_search to find a button.
  • The Win11 file dialog ignores classic Edit1/Button1; instead activate it, au_send("^a"), au_send(path, raw=True), au_send("{ENTER}").
  • Prove success with au_wait_file(out_path) rather than a screenshot.

Full AutoIt notes

  • The bundled autoit3/ makes au_run_au3 + au_compile_au3 work out of the box. The server auto-detects it (no env var needed); you can override with AUTOIT3_EXE or AUTOIT3_DIR.
  • ImageSearch is a 3rd-party UDF (not part of standard AutoIt). To enable it, drop ImageSearch.au3 + its DLL into autoit3/Include/, then call it via au_run_au3.
  • If you'd rather not bundle AutoIt, delete autoit3/: the 31 DLL-based tools still work; only au_run_au3/au_compile_au3 become unavailable.

Uninstall

Delete the folder. (Nothing is written outside it; no registry, no PATH changes.) Remove the autoit block from your .mcp.json.

Troubleshooting

  • Python 3 not found during install → install Python, reopen PowerShell, retry.
  • Server doesn't appear in /mcp → ensure the .mcp.json paths match the snippet exactly (absolute, double backslashes) and that you restarted Claude Code.
  • au_run_au3 returns "AutoIt3.exe not found" → keep autoit3/ next to server.py, or set AUTOIT3_EXE to a full AutoIt3_x64.exe.
  • Coordinates land in the wrong place → the host app may be per-monitor DPI scaled; the server is system-DPI-aware. Use au_win_get_pos to anchor clicks relative to the window, or use au_pixel_search.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选