How cursortouch/windows-mcp works
Windows-MCP is an MCP server that exposes Windows automation capabilities to AI agents. The main workflow is an agent request entering the server, reaching its registered tools, and using Windows UI automation to inspect state or perform actions. The repository also provides filesystem, shell, process, registry, notification, and browser-DOM capabilities. Sampled source supports the server-to-tool and UI-tree rendering relationships; exact routing from individual tools to services is not shown, so those links are omitted.
Main entry points: desktop/service.py Desktop service · tree/service.py UI tree capture · controls.py UIA controls · __main__.py MCP server
Components 26
MCP server
- MCP server
src/windows_mcp/__main__.py - OAuth support
src/windows_mcp/infrastructure/oauth.py
Agent tools
- Tool registration
src/windows_mcp/tools - UI snapshot tool
src/windows_mcp/tools/snapshot.py - Input tool
src/windows_mcp/tools/input.py - Application tool
src/windows_mcp/tools/app.py - Filesystem tools
src/windows_mcp/tools/filesystem.py - System tools
src/windows_mcp/tools
Desktop automation
- Desktop service
src/windows_mcp/desktop/service.py - Screenshots
src/windows_mcp/desktop/screenshot.py - Flash overlay
src/windows_mcp/desktop/flash_overlay.py - UI tree capture
src/windows_mcp/tree/service.py - Tree rendering
src/windows_mcp/tree/views.py - IAccessible2 fallback
src/windows_mcp/tree/ia2.py - UI event monitor
src/windows_mcp/watchdog/service.py
Windows services
- Filesystem service
src/windows_mcp/filesystem/service.py - PowerShell executor
src/windows_mcp/powershell/service.py - Process service
src/windows_mcp/process/service.py - Registry service
src/windows_mcp/registry/service.py - Notifications
src/windows_mcp/notifications/service.py - Virtual desktops
src/windows_mcp/vdm/core.py
UIA foundation
- UIA controls
src/windows_mcp/uia/controls.py - UIA core
src/windows_mcp/uia/core.py - UIA patterns
src/windows_mcp/uia/patterns.py - UIA types
src/windows_mcp/uia/enums.py
Other components
- AI agent
Connections 19
- AI agent → MCP server: requests tools
- MCP server → Tool registration: registers
src/windows_mcp/__main__.py - MCP server → UI snapshot tool: loads
src/windows_mcp/__main__.py - Desktop service → UI tree capture: uses capture
src/windows_mcp/desktop/service.py - Desktop service → Screenshots: uses
src/windows_mcp/desktop/service.py - Desktop service → Flash overlay: uses
src/windows_mcp/desktop/service.py - Desktop service → PowerShell executor: executes commands
src/windows_mcp/desktop/service.py - Desktop service → Virtual desktops: queries desktops
src/windows_mcp/desktop/service.py - UI tree capture → Tree rendering: builds output
src/windows_mcp/tree/service.py - UI tree capture → IAccessible2 fallback: uses fallback
src/windows_mcp/tree/service.py - UI tree capture → UIA controls: queries controls
src/windows_mcp/tree/service.py - UI tree capture → UIA types: uses identifiers
src/windows_mcp/tree/service.py - UIA controls → UIA core: uses
src/windows_mcp/uia/controls.py - UIA controls → UIA patterns: uses
src/windows_mcp/uia/controls.py - UIA controls → UIA types: uses
src/windows_mcp/uia/controls.py - UI event monitor → UIA core: subscribes through
src/windows_mcp/watchdog/service.py - Filesystem service → Filesystem service
src/windows_mcp/filesystem/service.py - Registry service → PowerShell executor: runs commands
src/windows_mcp/registry/service.py - Notifications → PowerShell executor: runs commands
src/windows_mcp/notifications/service.py