win-dialog-mcp
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., "@win-dialog-mcpSave the open Save As dialog to D:\reports\summary.pdf"
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.
win-dialog-agent
EN: Semantic Windows dialog automation for AI agents — OpenAI Agents SDK function tools + MCP stdio server.
中文: 面向 AI Agent 的语义级 Windows 对话框操作模块(Agents SDK 工具 + MCP stdio 服务)。
Agent says “save to D:\out.txt” — not click (1024, 768).
Agent 说的是意图,不是坐标。
OS | Windows 10 / 11 (x64) |
Python | ≥ 3.10 |
License | MIT |
Dialog class | Fast path for |
Features / 功能
P0 semantic tools: wait / list / describe / read / click / set text / Save As / Open / MessageBox
语义工具:等待、列举、描述、读文本、点按钮、填文本、另存为、打开、消息框Bilingual buttons:
保存≈Save(&S)via community-editablealiases.py
中英文按钮别名,欢迎 PR 扩充P1 UIA fallback for non-standard dialogs (with warning logs)
非标准对话框走通用 UIA,并打告警日志Dual expose:
@function_tool(Agents SDK) + MCP stdio (win-dialog-mcp)
一份实现,两种暴露
Related MCP server: Windows-MCP
Install / 安装
# from this directory / 在本目录
pip install -e ".[dev]"
# or with uv
uv pip install -e ".[dev]"Copy env template:
copy .env.example .envQuick start — Agents SDK / 快速开始
from agents import Agent, Runner
from win_dialog_agent.tools import ALL_TOOLS
agent = Agent(
name="DialogOperator",
instructions=(
"You operate Windows dialogs via tools. "
"Prefer dialog_handle_save_as / dialog_handle_open_file / "
"dialog_handle_messagebox for standard #32770 dialogs."
),
tools=ALL_TOOLS,
)
# async example
# result = await Runner.run(agent, "Save the current Save As dialog to D:\\out.txt")Core library API (no LLM required):
from win_dialog_agent import dialogs
info = dialogs.dialog_wait_for(timeout=10)
dialogs.dialog_handle_save_as(info.handle_id, r"D:\out.txt")MCP server / MCP 服务
Run locally
win-dialog-mcp
# or
python -m win_dialog_agent.serverMCP client config (Cursor / Claude Desktop)
{
"mcpServers": {
"win-dialog-agent": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/tigersaint88-app/win-dialog-agent",
"win-dialog-mcp"
]
}
}
}After PyPI publish you can simplify to uvx win-dialog-agent.
Cursor Marketplace / Agent Plugin
This repo includes:
.cursor-plugin/plugin.json— Cursor Plugin manifestplugin.json— Agent Plugins (open standard) manifestmcp.json— MCP server entry for marketplace installskills/windows-dialog-ops/— agent skill for dialog workflows
Submit / update listing: cursor.com/marketplace/publish
Community directory: cursor.directory
Local plugin test (optional): copy this repo into ~/.cursor/plugins/local/win-dialog-agent, then Reload Window.
Inspector self-test
npx @modelcontextprotocol/inspector win-dialog-mcpCall dialog_list from the Inspector Tools tab.
Catalog targets
Suitable for listing on mcp.so, Smithery, Glama, and Windows 11 native MCP registry (follow Microsoft registration docs).
Tool reference / 工具一览
Discovery (P0)
Tool | Args | Description |
|
| Wait for dialog → |
| — | List top-level |
|
| Control tree summary for the LLM |
Semantic actions (P0)
Tool | Args | Description |
|
| Read static / message text |
|
| Click by zh/en label |
|
| Fill edit (refuses password) |
|
| Fill → Save → overwrite Yes |
|
| Fill → Open |
|
|
|
UIA fallback (P1)
Tool | Args | Description |
|
| Find controls |
|
| Click by id |
|
| Set text by id |
|
| Compact control tree JSON |
Architecture / 架构
dialog_wait_for / dialog_list
│
▼
class == #32770 ──yes──▶ semantic fast path (dialogs.py)
│
no
▼
UIA fallback (uia_fallback.py) + warning logFind-window and do-action are separated for mockable unit tests.
找窗口与做动作分离,便于单测 mock。Timeouts / retries come from env (
WIN_DIALOG_*), never hard-coded at call sites.
超时与重试全部走配置。Logs store text hashes / digests, not full dialog bodies or file contents.
日志只记摘要,不落用户正文。
Safety notes / 安全与限制
Elevation: If the target dialog runs as Administrator, this process must too. Tools return a clear error instead of failing silently.
目标以管理员运行时,本进程也需管理员;错误信息明确,不静默失败。UAC secure desktop: Not reachable via UIA — returns unsupported.
安全桌面上的对话框不可自动化。32/64-bit: Match Python bitness to the target process when possible.
尽量与目标进程位数一致。Password fields:
dialog_set_textrefuses password controls.
密码框拒绝写入。P0 has no coordinate clicks:
dialogs.pymust not containclick_input/move_mouse.
P0 层禁止坐标点击。
Development / 开发
pip install -e ".[dev]"
pytest
pytest -m integration # real desktop scenarios
ruff check src testsAcceptance scenarios (manual) / 验收场景
Notepad → Ctrl+S →
dialog_wait_for→dialog_handle_save_as→ file on diskMessageBox →
dialog_read_text→dialog_handle_messagebox("yes")Open dialog →
dialog_handle_open_fileRepeat on Chinese Windows (aliases
保存/确定)Custom WPF dialog →
uia_*+ warning logMCP Inspector lists tools and calls
dialog_listrg "click_input|move_mouse" src/win_dialog_agent/dialogs.py→ zero hits
Contributing aliases / 贡献别名
The highest-leverage contribution is expanding button labels insrc/win_dialog_agent/aliases.py.
See CONTRIBUTING.md.
License
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Eyes and hands on real Windows PCs — observe, click, type via Glasswarp API.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
1Control real Android and iOS devices with LLM agents — tap, swipe, type, automate flows.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with Windows operating systems through native UI automation, file navigation, application control, and system commands. Provides seamless integration between LLMs and Windows environments for tasks like clicking, typing, launching apps, and capturing desktop state.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with the Windows operating system, performing tasks such as file navigation, application control, UI interaction, and QA testing.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control and interact with the Windows operating system, including file navigation, application control, UI automation, and QA testing.MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to automate Windows desktop via human-like mouse and keyboard input and UI Automation, with post-action verification for reliable control of programs, UI elements, windows, and files.3MIT