
winsight-mcp
io.github.hegdeadithyak/winsight-mcp
Operate Windows apps through compact UI Automation element lists instead of screenshots.
Documentation
Winsight
A local MCP server for Windows desktop automation through compact text observations.
Winsight is a local Model Context Protocol (MCP) server. It lets an AI agent inspect and operate Windows apps through Windows UI Automation, the accessibility interface used by screen readers. Instead of identifying every button from an image, the agent receives controls it can address directly:
w1 "Calculator" CalculatorApp.exe
e1 button "Clear"
e2 button "Seven"
e3 text "Display is 0"
After an action, Winsight returns changed elements. For longer tasks, the agent can submit several steps in one call and check the resulting UI state. Screenshots and OCR are available when an app's accessibility tree is insufficient.
Installation
You need Windows 10/11, Python 3.10+ and an MCP client that can launch a local process. Use a normal signed-in desktop account.
git clone https://github.com/hegdeadithyak/winsight-mcp.git
cd winsight-mcp
py -3 scripts/setup_agent.py --client codex
The setup command installs into an isolated environment, runs machine checks and prints configuration for your client. It does not edit client settings. Merge the printed configuration, restart the MCP connection and give your agent AGENTS.md and the skill.
Substitute claude-code, claude-desktop, cursor, vscode or json for codex as needed. Installation and troubleshooting.
Try this first:
Use Winsight to list my open windows and inspect Calculator. Describe its controls without clicking or typing.
How it works
list_windowsidentifies an app window.snapshotreturns visible controls, stable element ids and state flags.runexecutes a flow using selectors such asbutton "Save".expectchecks the resulting visible state; the reply reports completion, changes and failures.
{
"window": "Calculator",
"steps": [
{"click": "button \"Clear\""},
{"click": "button \"Three\""},
{"click": "button \"Plus\""},
{"click": "button \"Seven\""},
{"click": "button \"Equals\"", "expect": "text \"Display is 10\""}
]
}
Labels depend on the app version and language. Inspect the actual controls before choosing selectors. Usage guide.
Features
- Contextual targets: scope a selector within a named document or container.
- Stale-element recovery: check identity and ancestor context before reusing a target.
- Verified outcomes: distinguish input delivery from an observed result.
- Timeout isolation: quarantine unfinished worker calls and block later input dispatch after cancellation.
- Compact observations: deduplicate runtime identities, return changes and batch workflows to reduce repeated context.
Architecture and failure handling explains the tradeoffs. These mechanisms reduce risk; they do not make arbitrary app actions transactional.
Design
Winsight acts on what an app is rather than what it looks like, and counts a result only when it can confirm it. When something fails, the fix is a rule for every situation with the same cause, not a special case for one app. The system design guide explains the architecture, how observation, identity, actions and checks work, and the failures that shaped it.
Evidence and limitations
Published evidence includes a GPT Calculator pilot, ten complex multi-app tasks, an earlier ten-task Claude session, engine CPU profiles and token-size measurements. Results include failures and tasks where screenshots were faster. Permissions, versions and timing methods differ between studies; actual billed token usage was unavailable. See the task tables, token measurements and limitations.
UI Automation coverage varies. Canvas apps, games and remote desktops may need screenshots. Physical input may require foreground focus. A signed-in interactive desktop is required. Elevation and some protected windows impose additional restrictions. An already dispatched action cannot be recalled when a timeout occurs.
Privacy and control
The server runs locally, but observations returned to your AI client can be sent to that client's model provider. Treat desktop text as sensitive. Debug traces and learned workflow examples may retain app content locally. Debugging cannot expose a model's private reasoning. Review logs before sharing. Privacy guide.
Contribute
Report a reproducible issue using scratch data, improve client setup, or add regression coverage for an accessibility failure. Contributing includes development commands and reporting guidance.
Documentation
| Guide | Contents |
|---|---|
| Installation | Requirements, client configuration, updates and troubleshooting |
| Agent instructions | Setup and operating conventions for AI agents |
| Usage | Observations, selectors, workflows and recovery |
| System design | The problem, architecture, observation, actions and checks, learning, safety, and design rules |
| Architecture | Target identity, caching, execution and timeout handling |
| Privacy | Data flow, local traces and tool approvals |
| Benchmarks | Complex tasks, pilots, token measurements and limitations |
Source: hegdeadithyak/winsight. Licensed under MIT.
https://github.com/hegdeadithyak/winsight-mcp/releases/download/v0.2.1/winsight-mcp-0.2.1.mcpb# mcpb: https://github.com/hegdeadithyak/winsight-mcp/releases/download/v0.2.1/winsight-mcp-0.2.1.mcpb