uiautomation-mcp
基于 UI Automation API 的 MCP Server,用于检查和自动化 Windows 桌面 UI 元素。
为 AI 助手提供探索 UI 控件树、检查元素属性、执行操作(点击、输入、切换等)以及生成可直接使用的 Python 自动化脚本的能力。
安装
pip install uiautomation-mcp
或使用 uv:
uv pip install uiautomation-mcp
使用方式
命令行启动
uiautomation-mcp
通过 stdio 启动 MCP Server。
MCP 客户端配置
添加到 MCP 客户端配置文件(如 .kiro/settings/mcp.json):
{
"mcpServers": {
"uiautomation": {
"command": "uiautomation-mcp",
"disabled": false,
"autoApprove": []
}
}
}
也可以通过 uvx 直接运行(无需预装):
{
"mcpServers": {
"uiautomation": {
"command": "uvx",
"args": ["uiautomation-mcp"],
"disabled": false,
"autoApprove": []
}
}
}
工具列表
| 工具 | 说明 |
|---|---|
list_windows |
列出桌面上所有可见的顶层窗口 |
inspect_element_tree |
从指定元素开始探索 UI 控件树 |
get_element_detail |
获取元素的完整详情,包括自动化模式和定位策略 |
inspect_at_point |
检查屏幕坐标处的 UI 元素 |
find_elements |
按名称、类型、AutomationId 或类名搜索元素 |
capture_screenshot |
截取窗口或桌面的屏幕截图 |
activate_window |
将窗口激活并置于前台 |
perform_action |
对元素执行操作(点击、输入、切换、展开等) |
generate_script_snippet |
生成可直接复制使用的 Python 自动化代码 |
典型工作流
list_windows— 找到目标应用窗口activate_window— 将窗口置于前台inspect_element_tree— 探索 UI 结构find_elements/get_element_detail— 定位具体控件perform_action— 与元素交互generate_script_snippet— 获取可复用的自动化代码
系统要求
- Windows 操作系统
- Python >= 3.12
许可证
MIT
Metadata
Release files for uiautomation-mcp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uiautomation_mcp-0.1.2.tar.gz | 73.0 kB | Without provenance | Details for uiautomation_mcp-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uiautomation_mcp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for uiautomation_mcp-0.1.2-py3-none-any.whl |
Total release size: 83.5 kB
Release files / uiautomation_mcp-0.1.2.tar.gz
| Download URL | uiautomation_mcp-0.1.2.tar.gz |
|---|---|
| Size | 73.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41e26db65e1d2f319b68e10e9284ca463e6f016d96c3434a667069342f2b689d
|
|
BLAKE2b-256 checksum How to use checksums |
21872b935c4fe8909483c3c90aa4159959e2c2f44301fcbeee117def3cdf1512
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / uiautomation_mcp-0.1.2-py3-none-any.whl
| Download URL | uiautomation_mcp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17e53b55061a2a9f3840dd55cbe36381ab3ac651458855d49b4131ee2f777f2c
|
|
BLAKE2b-256 checksum How to use checksums |
3b585c7337fb852af2de6ff15b0bd7fe9dc4879d9b2d0bd7b2d7f286d871053c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for uiautomation-mcp 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.