ApplicationController
Provides GUI automation capabilities (e.g., mouse, keyboard, screen control) for use with MCP-compatible clients like GitHub Copilot.
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., "@ApplicationControllertake a screenshot of my desktop"
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.
ApplicationController
An MCP server that exposes deterministic desktop UI automation tools (PyAutoGUI + UIAutomation) for MCP-compatible clients (for example GitHub Copilot desktop app).
What improved
This version focuses on speed and reliability for real WPF automation:
Coordinate/DPI correctness
Coordinate space is explicit:
physical(default) orlogical.Added
convert_coordinates.Coordinate-aware tools return coordinate metadata (
space,dpi,scale).
Deterministic scoped UIA actions
scope_hwndsupport added for deterministic exact-handle scoping.Scope resolution order:
scope_hwndexact → exact title variants → robust contains fallback.ua_find,ua_invoke,ua_get_value,ua_set_valuereturn structured diagnostics and error codes.
Fast-path action
Added
click_in_window(title|hwnd, button|automation_id|name, wait_until_idle, retries).Handles focus, control lookup, invoke/click fallback, retries, and optional post-action idle wait.
Dialog/modal handling
Added
close_foreground_dialog().Added
dismiss_dialog(title|hwnd, button, wait_timeout).Added post-action new-child-window detection in
click_in_window.
State waits (instead of sleeps)
wait_for_windownow supports regex and fast polling.Added
wait_for_control_change(exists,visible,enabled,value/textchange/equality).Added
wait_ui_idle(input-idle + stable window rect settle).
Batch efficiency
batchnow shares resolved scope context across steps to avoid repeated lookups.
Observability
Structured error codes (
WINDOW_NOT_FOUND,CONTROL_AMBIGUOUS,TIMEOUT, etc.).Timing breakdowns in responses (
lookup_ms,action_ms,total_mswhere applicable).
Backward compatibility
Existing tool names remain:
ua_*,wait_for_element,auto_dismiss_dialog,batch, etc.wait_for_elementremains available (implemented as compatible wait path).auto_dismiss_dialogremains available (alias of improveddismiss_dialog).
Related MCP server: mcp-autogui-multinode
Tool summary
Screenshot & observation
Tool | Description |
| Full screenshot (base64 image) + metadata text |
| Region screenshot by rect or control lookup |
| Screen size in physical/logical space |
| Mouse position in physical/logical space |
| Convert between physical and logical coordinates |
| Visible top-level windows with hwnd/title/pid/rect |
Mouse & keyboard
Tool | Description |
| Click by coordinate or UIA target |
| Double click by coordinate |
| Move cursor |
| Drag between points |
| Scroll at coordinate |
| ASCII typing |
| Single key or hotkey |
UIAutomation
Tool | Description |
| Dump scoped window control tree |
| Deterministic scoped control search + diagnostics |
| Invoke with pattern fallback + timing |
| Set value via UIA |
| Read value/text via UIA |
| High-level one-call invoke/click primitive |
Waiting & dialogs
Tool | Description |
| Wait for title/regex appearance/disappearance |
| Wait for state/text/value change |
| Backward-compatible wait alias |
| Wait for process input idle |
| Wait for render/input settle |
| Dismiss modal/dialog by title/hwnd + button |
| Try to close active foreground dialog |
| Backward-compatible alias of |
Other
Tool | Description |
| Launch executable |
| Explicit pause |
| Template match using OpenCV |
| Multi-step server-side execution with shared context cache |
Coordinate-space behavior
Default input space is
physicalfor coordinate tools (click,move_mouse,drag,scroll,capture_region, etc.).Pass
coordinate_space: "logical"for DPI-scaled inputs.Output responses include coordinate metadata:
{
"coordinate": {
"space": "logical",
"dpi": 144,
"scale": 1.5
}
}Use convert_coordinates when moving between desktop APIs that report different spaces.
Diagnostics and error codes
Errors are structured:
{
"success": false,
"error": {
"code": "CONTROL_NOT_FOUND",
"message": "No matching control found"
},
"diagnostics": {
"matched_windows": [],
"controls_considered": []
}
}Common codes:
WINDOW_NOT_FOUNDWINDOW_AMBIGUOUSCONTROL_NOT_FOUNDCONTROL_AMBIGUOUSSTALE_HANDLETIMEOUTACTION_FAILEDDEPENDENCY_MISSINGINVALID_ARGUMENT
Recommended fast flow (WPF)
list_windowsand pickhwnd.click_in_windowwithhwnd+automation_id/button.wait_for_control_changeorwait_ui_idlefor deterministic completion.ua_get_valuefor assertion/readback.
Migration notes
Legacy scripts using coordinate clicks continue to work (
physicalremains default).For DPI-sensitive scenarios, switch to
coordinate_space: "logical"or explicitconvert_coordinates.Replace sleep-heavy sequences with
wait_for_window,wait_for_control_change, andwait_ui_idle.For scope flakiness, pass
scope_hwndinstead of fuzzy title-only scoping.
Setup
1. Install dependencies
pip install -r requirements.txtTo enable image search:
pip install opencv-pythonor:
pip install ".[image-search]"2. Add to GitHub Copilot desktop app
{
"mcpServers": {
"application-controller": {
"command": "python",
"args": ["C:\\path\\to\\ApplicationController\\server.py"]
}
}
}3. Safety note
PyAutoGUI failsafe is enabled: move mouse to top-left to abort.
Benchmark script and results
scripts/benchmark_before_after.py provides a short before-vs-after benchmark harness for:
app launch + dialog dismissal
opening a target window via button click
waiting for ready state and reading control value
Example run results (HPMAGS Travel Sheet scenario):
Scenario | Before (s) | After (s) | Retry count before | Retry count after |
Launch + dialog dismissal | 8.42 | 4.31 | 3 | 0 |
Open target window | 6.18 | 2.74 | 2 | 0 |
Wait ready + read value | 3.95 | 1.63 | 2 | 0 |
Total | 18.55 | 8.68 | 7 | 0 |
Detailed machine-readable output is included in scripts/benchmark_results.json.
This server cannot be deployed
Maintenance
Related MCP Connectors
- mcp-serverOAuthcom.make
Give your AI agents the tools to build, manage, and run automation workflows.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Eyes and hands on real Windows PCs — observe, click, type via Glasswarp API.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables full desktop automation on macOS through natural language, including mouse control, keyboard input, screen capture, and GUI interaction using PyAutoGUI.5-
- AlicenseNot gradedqualityDmaintenanceAn MCP and HTTP server wrapper for PyAutoGUI that enables LLMs to control mouse and keyboard operations across local or remote distributed environments. It provides comprehensive tools for screen interaction, including clicking, typing, and capturing screenshots.19MIT
- AlicenseNot gradedqualityDmaintenanceExposes PyAutoGUI desktop automation functions as MCP tools, enabling mouse control, keyboard input, and screenshot capture.4BSD 3-Clause
- FlicenseNot gradedqualityDmaintenanceEnables GUI automation by capturing screen, controlling mouse/keyboard, and targeting controls via accessibility layer; optionally supports voice commands and synthesis.1-