UIAutomation MCP Server
Enables UI automation of Electron-based Windows applications through Windows UI Automation, including finding controls, clicking, entering text, reading properties, taking screenshots, and invoking patterns; Chrome/Electron apps may require the --force-renderer-accessibility launch flag.
Enables UI automation of Firefox windows and controls on Windows via Windows UI Automation, including control lookup, clicking, keyboard/text input, property and text retrieval, and screenshots.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
UIAutomation MCP Server
基于 Python-UIAutomation-for-Windows 的 MCP (Model Context Protocol) 服务器
特别感谢 yinkaisheng 开发的优秀 UI 自动化库,本项目是其 MCP 封装实现。
简介
UIAutomation MCP Server 让 AI 助手(如 Claude、ChatGPT)能够通过 MCP 协议直接操作 Windows UI 控件,实现:
自动化桌面应用程序操作
控件信息查询与截图
键盘鼠标模拟
窗口管理
支持的应用类型:Win32、MFC、WPF、Windows Forms、Modern UI (UWP)、Qt、Firefox、Chrome、Electron 等。
Related MCP server: UIAutomationMcp
安装
pip install -e . # 或 uv sync
pip install comtypes overlay-arrows-and-more
overlay-arrows-and-more只有ui_highlight高亮工具需要;未安装时该工具会返回DEPENDENCY_MISSING,其余工具不受影响。
配置
在 Claude Desktop / Claude Code / Cursor / Kiro 等 MCP 客户端的配置文件中添加:
{
"mcpServers": {
"uiautomation": {
"command": "uiautomation-mcp",
"type": "stdio"
}
}
}也可以不安装、直接用源码运行:
{
"mcpServers": {
"uiautomation": {
"command": "uv",
"args": [
"--directory",
"D:\\path\\to\\Python-UIAutomation-for-Windows",
"run",
"main.py"
],
"type": "stdio"
}
}
}可用工具
控件查找 (6)
工具 | 描述 |
| 查找顶层窗口 |
| 查找子控件 |
| 获取子控件列表 |
| 获取当前焦点控件 |
| 获取前台窗口 |
| 获取屏幕坐标处的控件 |
交互操作 (5)
工具 | 描述 |
| 点击控件 (支持左键/右键/双击) |
| 发送键盘输入 |
| 设置文本值 |
| 关闭窗口 (需确认) |
| 移动/调整窗口 |
信息查询 (6)
工具 | 描述 |
| 获取控件属性 |
| 获取文本内容 |
| 获取边界矩形 |
| 控件/窗口截图 |
| 检查控件是否存在 |
| 等待条件满足 |
Pattern 操作 (6)
工具 | 描述 |
| 调用按钮 (InvokePattern) |
| 切换状态 (TogglePattern) |
| 展开/折叠 (ExpandCollapsePattern) |
| 选择项 (SelectionItemPattern) |
| 滚动控件 (ScrollPattern) |
| 终止进程 (需确认) |
辅助工具 (5)
工具 | 描述 |
| 获取剪贴板内容 |
| 设置剪贴板内容 |
| 列出运行中的进程 |
| 显示/最小化所有窗口 |
| 获取屏幕尺寸 |
高亮与拾取 (3)
工具 | 描述 |
| 在控件周围绘制高亮边框 (需 overlay-arrows-and-more) |
| 启动交互式拾取器 (鼠标指向控件 → 点「完成」) |
| 读取拾取结果 (searchDepth / codeSuggestion) |
环境变量
变量 | 默认值 | 描述 |
|
| 日志级别 (DEBUG/INFO/WARNING/ERROR) |
|
| 默认操作超时秒数 |
|
| 是否检查管理员权限 |
|
| 危险操作确认机制 |
安全机制
以下操作需要用户确认才会执行:
ui_close_window- 关闭窗口ui_terminate_process- 终止进程
可通过设置 UIAUTOMATION_CONFIRMATION_ENABLED=false 禁用确认机制(不推荐)。
使用示例
配置完成后,你可以对 AI 助手说:
请帮我打开记事本,输入 "Hello World",然后保存到桌面截图当前活动窗口并保存列出所有打开的 Chrome 标签页系统要求
操作系统: Windows 7 SP1 或更高版本
Python: 3.10 或更高版本
权限: 建议以管理员权限运行以获得最佳兼容性
注意事项
管理员权限: 要自动化以管理员权限运行的应用,MCP 服务器也需要管理员权限
Chrome/Electron: 需要添加
--force-renderer-accessibility启动参数UWP 应用: 部分现代应用可能有访问限制
致谢
License
Apache License 2.0
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote desktop MCP: let AI see, click, type and run terminal commands on your own Windows or Mac.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI clients to automate Windows desktop applications through window manipulation, image recognition, OCR, keyboard/mouse simulation, and memory operations via the MCP protocol.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Windows UI Automation through MCP, allowing agents to inspect, search, navigate, and interact with desktop UI elements via the UIAutomation framework. Supports actions such as focus, invoke, set-value, toggle, and event waiting, with CLI and VS Code extension variants.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to inspect and operate Windows applications through structured UI Automation maps, humanized mouse and keyboard input, and on-demand screenshots or OCR via MCP. It supports locating elements by role, name, or query; clicking, typing, scrolling, window management, event watching, and chained multi-step actions without relying on image analysis.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-capable AI agents to control Windows desktops through UI Automation element trees, native screenshots, app launching, batched action sequences, smart waits, and safety gates using normalized coordinates.MIT