1. Conduid
  2. Security
  3. Pywinauto MCP
MCP server · Security

Pywinauto MCP

MCP 2.12 Server for Windows Automation

66Good

Scored 8 hours ago · breakdown

About Pywinauto MCP

Pywinauto MCP is an MCP server published by sandraschi in the Security category: mCP 2.12 Server for Windows Automation. Conduid read 86 tools from its source: add_face, analyze_winapp, approve_automation, automation_assert, automation_dialog, automation_elements and 80 more. No package is published for it, so it installs from a source checkout.

The repository has 61 stars and 17 forks, is licensed MIT, and its last commit was on 1 Dec 2026. The latest release is v0.8.0 (10 Oct 2026): Assfix 2026-10-10: POST /api/v1/shutdown, /capabilities, /skills, /llm/discover, /llm/onboarding, /llm/chat/stream; S110/S112/E722 un-ignored and fixed (55 sites log ins… It follows v0.7.1 (17 Aug 2026), and the 4 most recent releases go back to v0.6.0 (15 Jun 2026). It passes 2 of the 3 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include security, automation, face-recognition and windows.

Install

From source
git clone https://github.com/sandraschi/pywinauto-mcp

Tools (86)

add_faceAdd a new face to the recognition system.
ParameterTypeDescription
image_path *stringPath to the image file containing the face
name *stringName of the person
analyze_winappCrawl a Windows app and produce UI element map + screenshot portfolio.
ParameterTypeDescription
header_rowbooleanextract_table treats the first row as headers -> records.
max_depthintegerMax UI tree depth for crawl (default 5).
min_colsintegerextract_table drops rows with fewer cells (default 1).
operationstringWhich analysis operation to perform.
output_dirstringDirectory for screenshot files + markdown report. Defaults to ./winapp_analysis/
row_tolerance_pxintegerextract_table vertical banding tolerance (default 8).
scroll_amountintegerWheel units per crawl_scroll page, negative = down (default -10).
scroll_pagesintegerMax extra scroll pages for crawl_scroll (default 3).
statesarrayState names for portfolio mode.
window_handleintegerTarget HWND (optional if window_title is set).
window_titlestringFind window by title substring.
approve_automationApprove UI automation actions for a specified duration to prevent repetitive prompts.
ParameterTypeDescription
duration_minutesnumberNumber of minutes to allow automated actions (default 5.0).
automation_assertUI verification for computer-use automation - stability polling, image diff, template/OCR asserts. WHAT IT DOES: Polls screenshots until the UI stabilizes, compares before/after images, and asserts expected visual or text state. Use after keyboard shortcuts or clicks to confirm the action succeeded before continuing. WHEN TO USE: - wait_stable: after navigation shortcuts (F-keys, Ctrl+N) - wait for rendering to finish - assert_changed: confirm a step produced a visible UI change - assert_unchanged: confirm a no-op or focus-only action did not alter the canvas - diff: get changed_pct and a heatmap PNG for failure logs - assert_template: check a dialog or button icon is visible (OpenCV template match) - assert_text: OCR a region and check for expected dialog title or label - hash / hash_region: fingerprint a screen region (dhash tolerates GPU rendering noise) RECOVERY: If wait_stable times out, increase timeout_s or narrow region_* to the editor panel only. If assert_changed fails with low changed_pct, the shortcut may not have reached the focused window. ## Return Format {"status": "success" | "error", "message": str, "data": {"changed_pct": float, ...}, "recovery_tip": str | null} ## Examples - automation_assert(request={"operation": "wait_stable", "timeout_s": 10}) -> {"status": "success", ...} - automation_assert(request={"operation": "assert_text", "expected_text": "Save", "region_left": 0, "region_top": 0, "region_right": 800, "region_bottom": 600}) -> {"status": "success", ...}
ParameterTypeDescription
request *any
automation_dialogWindows file dialog helpers - set path field and confirm. WHAT IT DOES: Fills Save/Open/Export dialog path fields using clipboard paste (default) or typed entry, then confirms with Enter. Prefer this over manual ctrl+a + type sequences. WHEN TO USE: - submit_path: full flow after a Save As / Open / Export shortcut opened a dialog - set_path: only fill the path field (confirm separately) - confirm: press Enter after path is already set RECOVERY: Ensure the target dialog field is focused (Tab into it if needed). Call automation_windows(focus) on the parent app first. For long paths, keep use_clipboard=true. ## Return Format {"status": "success" | "error", "message": str, "data": {...}, "recovery_tip": str | null} ## Examples - automation_dialog(request={"operation": "set_path", "path": "C:/Exports/report.pdf"}) -> {"status": "success", ...} - automation_dialog(request={"operation": "confirm"}) -> {"status": "success", "message": "Dialog confirmed.", ...}
ParameterTypeDescription
request *any
automation_elementsComprehensive UI element interaction and inspection system. WHAT IT DOES: This tool provides granular control over individual UI elements (buttons, text fields, lists, etc.) within a target window. It handles complex selection logic based on Control IDs, Automation IDs, titles, or relative coordinates, and executes actions like clicking, typing, and visibility verification. WHEN TO USE: - Use 'list' to browse the element tree of a window to find interactable controls. - Use 'click' or 'double_click' to trigger UI actions on specific buttons or items. - Use 'set_text' to fill out forms, enter search queries, or update field values. - Use 'wait' or 'exists' when automating dynamic UIs where elements take time to load. - Use 'info' to audit a control's properties (enabled state, read-only status, etc.). RECOVERY AND TROUBLESHOOTING: - 'ElementNotFoundError': The selection criteria (control_id, title) may be incorrect or the element might be nested deeper than expected. Use 'list' with a higher 'max_depth' to verify the exact hierarchy. - 'ElementNotVisible': The element exists but is hidden or scrolled out of view. Try 'activate' on the parent window first, or use mouse tools to scroll. - Ambiguous targets: If multiple elements match your criteria, PyWinAuto might fail. Be as specific as possible by combining 'control_type' and 'title'. RETURNS: A ToolResult object containing standardized outcome, message, and element data. ## Return Format {"status": "success" | "error", "message": str, "data": {...}, "recovery_tip": str | null} ## Examples - automation_elements(request={"window_handle": 123456, "operation": "list"}) -> {"status": "success", "message": "Listed 40 elements.", ...} - automation_elements(request={"window_handle": 123456, "operation": "click", "title": "Save"}) -> {"status": "success", ...}
ParameterTypeDescription
request *any
automation_faceIndustrialized local face recognition and biometric enrollment tool. WHAT IT DOES: This tool provides local-only biometric capabilities for registering and recognizing individuals via facial encodings. It can enroll new faces from static images, match unknown faces against a local encrypted database, and capture live frames from primary or secondary UVC webcams. WHEN TO USE: - Use 'add' to enroll a person into the system (e.g., for personalized automation triggers). - Use 'recognize' to identify individuals present in a provided image file. - Use 'capture' to engage a local camera (laptop built-in or USB webcam) for real-time identification. - Use 'presence' for human-presence detection (notebook scenario): captures, recognizes, and folds the result into an armed state machine (present / away-short inside grace / away-long past lock timeout). Coffee runs do nothing; going home recommends locking. - Use 'test' for a dry presence check that never locks. - Use 'arm' / 'disarm' / 'set_timeouts' / 'presence_status' to manage the monitor without a camera. Timeouts: grace_s (default 300), lock_timeout_s (default 900), auto_lock (default off). - Use 'enroll' to capture from the camera and register in one call (name + camera_index only, no image file needed). - Use 'list' or 'delete' for managing the local biometric database. SAFETY AND PRIVACY: This tool operates entirely locally and requires explicit opt-in via 'windows_computer_use_mcp_ENABLE_FACE=1'. It does not transmit biometric data to remote servers. If recognition fails, ensure adequate lighting and centered positioning of the target face. RECOVERY: If 'capture' fails to open the camera, verify the 'camera_index' (0 is usually the default) and ensure no other application is currently locking the device. ## Return Format {"status": "success" | "error", "message": str, "data": {...}, "recovery_tip": str | null} ## Examples - automation_face(request={"operation": "presence_status"}) -> {"status": "success", "data": {"state": "present", ...}} - automation_face(request={"operation": "list"}) -> {"status": "success", "data": {"faces": [...]}, ...}
ParameterTypeDescription
request *any
automation_keyboardComprehensive keyboard input and sequence simulation system. WHAT IT DOES: This tool provides a unified interface for simulating keyboard input. It supports sequential typing ('type'), single key presses ('press'), complex multi-key combinations ('hotkey'), and modifier-key holding ('hold'). WHEN TO USE: - Use 'type' to enter text into boxes, editors, or command lines. - Use 'background_type' with a window_handle to type without focus changes (PostMessage WM_CHAR; rich/IME input may need 'type' or element set_text). - Use 'background_key' with a window_handle for enter/tab/escape/arrows/F-keys without focus changes. - Use 'press' for navigation keys (tab, enter, arrows, escape). - Use 'hotkey' for application shortcuts (ctrl+c, alt+f4, win+r). - Use 'hold' when you need to sustain a state (like Shift or Ctrl) while performing other UI actions. RECOVERY AND TROUBLESHOOTING: - If typing appears missing, the window might have lost focus. Use 'automation_windows' with 'focus' before sending keyboard input. - For special keys like 'enter' or 'tab', ensure you are using the correct string identifier (pyautogui standard). RETURNS: A ToolResult object containing standardized outcome, message, and focus metadata. ## Return Format {"status": "success" | "error", "message": str, "data": {...}, "recovery_tip": str | null} ## Examples - automation_keyboard(request={"operation": "type", "text": "hello"}) -> {"status": "success", ...} - automation_keyboard(request={"operation": "hotkey", "keys": ["ctrl", "s"]}) -> {"status": "success", ...}
ParameterTypeDescription
request *any
automation_macroRecord, replay, and verify UI automation macros. WHAT IT DOES: Captures every tool call during a recording session into a replayable JSONL file. Replay executes the same sequence. Replay-with-verify checks each step's outcome against the recorded result (hash-based screenshot comparison when available). OPERATIONS: - record: Start recording. Every subsequent tool call is captured until 'stop'. - stop: Stop recording and save the macro to a named file. - replay: Execute a saved macro step by step. - replay_with_verify: Replay and verify each step matches the recorded outcome. - list: List saved macros with metadata. ## Return Format {"status": "success" | "error", "message": str, "data": {...}, "recovery_tip": str | null} ## Examples - automation_macro(operation="record", name="login-flow") -> {"status": "success", ...} - automation_macro(operation="replay", name="login-flow") -> {"status": "success", ...}
ParameterTypeDescription
namestring
operation *string
record_videoboolean
stepsarray
automation_missionAutonomous multi-step orchestration and complex mission management tool. WHAT IT DOES: This tool elevates automation from individual clicks to high-level objectives. Give it a natural-language goal - it decomposes into steps, executes each with retry + verification, and returns pass/fail with evidence. WHEN TO USE: - Use 'run' to execute a full autonomous mission from a goal. - Use 'plan' to preview the step decomposition without executing. - Use 'status' to track progress of a running mission. - Use 'cancel' to stop a running mission. RECOVERY: If a step fails, the mission continues with remaining steps (non-fatal). Missions run a session preflight first (blocked when the session is locked or a UAC prompt is up - approve on the console and re-run), pause for UAC mid-run, and honor WINDOWS_COMPUTER_USE_MCP_ALLOWED_APPS when set. Use 'status' with the mission_id to review step-level results. RETURNS: A ToolResult object with mission progress, step results, and next steps. ## Return Format {"status": "success" | "error", "message": str, "data": {"mission_id": str, ...}, "recovery_tip": str | null} ## Examples - automation_mission(request={"operation": "plan", "goal": "open Notepad and type hello"}) -> {"status": "success", ...} - automation_mission(request={"operation": "run", "goal": "open Notepad and type hello"}) -> {"status": "success", ...}
ParameterTypeDescription
request *any
automation_mouseComprehensive mouse control and cursor simulation system. WHAT IT DOES: Moves, clicks, drags, and scrolls using **Win32** ``SetCursorPos`` / ``mouse_event`` (DPI-aware), not PyAutoGUI alone - reliable move/click/drag on scaled monitors. WHEN TO USE: - Use 'position' to get current screen coordinates before planning a movement. - Use 'click' or 'double_click' for rapid UI interaction. - Use 'background_click' with a window_handle to click without moving the cursor or stealing focus (PostMessage; some controls ignore it - fall back to 'click'). - Use 'move_relative' to nudge the cursor from its current spot. - Use 'scroll' to browse lists or web pages. - Use 'telemetry' to visually debug coordinates on the user's screen. RECOVERY AND TROUBLESHOOTING: - FailSafe: Moving the cursor to the **upper-left** corner aborts (same idea as PyAutoGUI). Disabled when windows_computer_use_mcp_BYPASS_HITL=1. - If coordinates seem 'off', confirm single-monitor expectations or use 'position' first. RETURNS: A ToolResult object containing standardized outcome, message, and movement data. ## Return Format {"status": "success" | "error" | "blocked", "message": str, "data": {...}, "recovery_tip": str | null} ## Examples - automation_mouse(request={"operation": "position"}) -> {"status": "success", "data": {"x": 960, "y": 540, ...}} - automation_mouse(request={"operation": "click", "x": 960, "y": 540}) -> {"status": "success", ...}
ParameterTypeDescription
request *any
automation_safetyInspect or reset server-side safety limits (rate, kill switch, dry-run). Not a substitute for HITL.
ParameterTypeDescription
operationstring
automation_shortcutSemantic application shortcuts - send by action name, not raw key codes. WHAT IT DOES: Maps app-specific action names (e.g. vroidstudio/export_vrm → F8) to keyboard sequences, optionally focuses the target HWND (win32 backend), and waits for UI stability after send. WHEN TO USE: - send: execute a named shortcut (prefer over raw automation_keyboard hotkey) - list: enumerate shortcuts for an app - describe: metadata for one action SUPPORTED APPS: vroidstudio (alias vroid, vroid_studio) RECOVERY: Call automation_windows(focus) first. Set windows_computer_use_mcp_KEYBOARD=win32 for HWND-targeted send. ## Return Format {"status": "success" | "error", "message": str, "data": {...}, "recovery_tip": str | null} ## Examples - automation_shortcut(request={"operation": "list", "app": "vroidstudio"}) -> {"status": "success", "data": {"shortcuts": [...]}} - automation_shortcut(request={"operation": "send", "app": "vroidstudio", "action": "export_vrm"}) -> {"status": "success", ...}
ParameterTypeDescription
request *any
automation_smartIntent-based discovery and interaction across all windows. OPERATIONS: - discover: Scan all visible windows and return a structured inventory of running apps and their controls. Optional query filters by app name or window title. - list_apps: Quick list of identified running applications with window handles. - list_controls: List controls for a specific window handle. - click: Find an element by description (e.g. 'the Save button') across all windows using element scanning. Fallback to OCR when UIA fails. ## Return Format {"status": "success" | "error", "message": str, "data": {"apps": [...]}, "recovery_tip": str | null} ## Examples - automation_smart(operation="list_apps") -> {"status": "success", "message": "5 running apps detected.", ...} - automation_smart(operation="click", description="the Save button") -> {"status": "success", ...}
ParameterTypeDescription
buttonstring
descriptionstring
operation *string
querystring
window_handleinteger
automation_systemIndustrialized Windows system utility and synchronization tool. WHAT IT DOES: This tool provides low-level system utilities including application launching, process monitoring, clipboard manipulation, and advanced synchronization primitives (e.g., waiting for windows to appear). It acts as the 'glue' for complex automation sequences. WHEN TO USE: - Use 'status' for real-time health checks of the MCP server. - Use 'info' to collect detailed host telemetry (CPU, RAM, GPU). - Use 'preflight' before a mission: session liveness + UAC + disk/RAM in one call. - Use 'detect_uac' when steps fail oddly - a UAC prompt or locked session explains it. - Use 'wait' or 'wait_for_window' to synchronize automation steps with OS state. - Use 'clipboard_get/set' for data transfer between the agent and local applications. - Use 'processes' and 'start_app' for lifecycle management of Windows software. RECOVERY: If 'wait_for_window' times out, verify the 'title' exists or increase 'timeout'. If 'clipboard' operations fail, ensure the 'pyperclip' dependancy is installed and no other app is locking the clipboard. ## Return Format {"status": "success" | "error", "message": str, "data": {...}, "recovery_tip": str | null} ## Examples - automation_system(request={"operation": "status"}) -> {"status": "success", "message": "System status OK.", ...} - automation_system(request={"operation": "wait", "seconds": 2}) -> {"status": "success", "message": "Waited for 2 seconds.", ...}
ParameterTypeDescription
request *any
automation_taskClosed-loop task runner - the MVP computer use assistant. WHAT IT DOES: Executes a list of steps (shortcut, dialog, wait_stable, assert_file, focus, screenshot, click, preflight) with automatic retry, refocus recovery, and per-step evidence (screenshot paths). WHEN TO USE: - Prefer over manual tool chaining for multi-step GUI workflows - VRoid export: shortcut steps + dialog + assert_file in one call - Returns evidence trail on failure for host LLM review OPERATIONS: - run: execute steps - status: query task session - cancel: mark task cancelled - list_profiles: app profiles (foreground policy, window title, stable_region) - list_templates: per-app template library manifest (T2.3) See docs/CUA_ASSISTANT_TODO.md and docs/MEMOPS_CUA.md. ## Return Format {"status": "success" | "error", "message": str, "data": {...}, "recovery_tip": str | null} ## Examples - automation_task(request={"operation": "list_profiles"}) -> {"status": "success", "data": {"profiles": [...]}} - automation_task(request={"operation": "run", "app": "notepad.exe", "steps": [...]}) -> {"status": "success", ...}
ParameterTypeDescription
request *any
automation_visualComprehensive computer vision and OCR tool for Windows UI automation. WHAT IT DOES: This tool provides multimodal capabilities for interacting with the desktop when traditional UI element selectors (UIA/MSAA) are insufficient or unavailable (e.g., in remote desktops, games, or legacy apps). It supports pixel-perfect screenshots, Tesseract-based OCR text extraction, OpenCV template matching to find graphical assets, and temporary visual highlighting. WHEN TO USE: - Use 'screenshot' to capture current UI states for verification or documentation. - Use 'extract_text' (OCR) to read text from custom-drawn controls, icons, or web-in-app views. - Use 'find_image' when you have a template image (e.g., a specific button icon) and need to click its center coordinates. - Use 'highlight' to visually confirm the identified target during complex automation sequences. RECOVERY AND AMBIGUITY: If 'find_image' fails to meet the confidence threshold (default 0.8), consider decreasing the 'threshold' parameter or verifying that the template image is not resolution-dependent. If OCR results are noisy, ensure the target region coordinates are precisely bounded or use 'ocr_config' to specify page segmentation modes. ## Return Format {"status": "success" | "error", "message": str, "data": {"screenshot_base64": str, ...}, "recovery_tip": str | null} ## Examples - automation_visual(request={"operation": "screenshot"}) -> {"status": "success", "data": {"screenshot_base64": "..."}} - automation_visual(request={"operation": "extract_text", "region_left": 0, "region_top": 0, "region_right": 800, "region_bottom": 600}) -> {"status": "success", ...}
ParameterTypeDescription
request *any
automation_watchPersistent watcher for event-driven automation triggers. OPERATIONS: - start: Begin monitoring for a condition. Runs in a background thread. Conditions: window_appears, window_closes, text_appears, element_appears. Returns a watcher_id for status/cancel. - status: Check whether a watcher has triggered. - stop: Cancel a running watcher. - list: List all active watchers. ## Return Format {"status": "success" | "error" | "blocked", "message": str, "data": {"watcher_id": str, ...}, "recovery_tip": str | null} ## Examples - automation_watch(operation="start", condition="window_appears", target="Save As") -> {"status": "success", "data": {"watcher_id": "watch_ab12cd34"}} - automation_watch(operation="status", watcher_id="watch_ab12cd34") -> {"status": "success", ...}
ParameterTypeDescription
conditionstring
intervalnumber
operation *string
targetstring
timeoutnumber
watcher_idstring
window_handleinteger
automation_windowsComprehensive Windows window management and lifecycle control system. WHAT IT DOES: This tool provides a unified interface for discovering, locating, and controlling windows on the Windows desktop. It handles window state transitions (maximize, minimize, restore), visibility, and spatial positioning via the unique window handle (HWND). WHEN TO USE: - Use 'list' to discover available windows and their handles when starting a task. - Use 'find' to locate a specific window by its title or class name. - Use 'focus' or 'activate' to bring a window to the foreground before sending input. - Use 'manage' with actions (maximize, close, etc.) to control window lifecycle. - Use 'position' to precisely align windows for multi-window automation scenarios. - Use 'tray_list' to enumerate system-tray icons (tooltip text per icon), then 'tray_click' by index or tooltip substring. Overflow icons need tray_overflow=True with the chevron flyout open. RECOVERY AND TROUBLESHOOTING: - If a 'WindowNotFoundError' occurs, the handle (HWND) may have become stale. Call 'list' to refresh your knowledge of active window handles. - If 'focus' fails, the window might be minimized or blocked. The tool automatically attempts to restore minimized windows before focusing. RETURNS: A ToolResult object containing standardized outcome, message, and window metadata. ## Return Format {"status": "success" | "error", "message": str, "data": {"count": int, "windows": [...]}, "recovery_tip": str | null} ## Examples - automation_windows(request={"operation": "list"}) -> {"status": "success", "message": "Successfully listed 12 visible windows.", ...} - automation_windows(request={"operation": "find", "title": "Notepad", "partial": True}) -> {"status": "success", "data": {"count": 1, ...}}
ParameterTypeDescription
request *any
bring_window_to_foregroundBring a window to the foreground by its title.
ParameterTypeDescription
exact_matchbooleanWhether to match the window title exactly (default: True)
window_title *stringTitle or partial title of the window
capture_and_recognizeCapture an image from the webcam and recognize faces in it.
ParameterTypeDescription
camera_indexintegerIndex of the camera to use (default: 0)
save_pathstringOptional path to save the captured image
click_at_positionClick at specific screen coordinates.
ParameterTypeDescription
buttonstringMouse button to click ("left", "right", "middle")
x *integerX coordinate to click
y *integerY coordinate to click
click_elementClick on a UI element.
ParameterTypeDescription
absolutebooleanWhether the coordinates are screen-absolute (default: window-relative)
buttonstringThe mouse button to use ("left", "right", "middle")
control_idstringThe control ID of the element to click (optional if x and y are provided)
doublebooleanWhether to perform a double-click
window_handle *integerThe handle of the parent window
xintegerX coordinate relative to the window (optional if control_id is provided)
yintegerY coordinate relative to the window (optional if control_id is provided)
close_windowClose a window.
ParameterTypeDescription
handle *integerThe window handle to close
cua_computer_use_screenshotWindow-scoped screenshot for Claude Code computer-use style grounding. Requires window_handle (HWND). Does not activate the window when windows_computer_use_mcp_DISPATCH=background. Wraps automation_visual(screenshot) with return_base64=true. ## Return Format {"status": "success" | "error", "message": str, "data": {"screenshot_base64": str, "compat": str}, "recovery_tip": str | null} ## Examples - cua_computer_use_screenshot(window_handle=123456) -> {"status": "success", "data": {"screenshot_base64": "...", ...}}
ParameterTypeDescription
formatstring
window_handle *integer
delete_faceDelete a known face from the system.
ParameterTypeDescription
name *stringName of the person to delete
double_clickDouble-click on an element or at specific coordinates.
ParameterTypeDescription
elementanyOptional element info dict to click on
xintegerX coordinate (if element not provided)
yintegerY coordinate (if element not provided)
double_click_elementDouble-click on a UI element.
ParameterTypeDescription
buttonstringThe mouse button to use ("left", "right", "middle")
control_idstringThe control ID of the element to click (optional if x and y are provided)
window_handle *integerThe handle of the parent window
xintegerX coordinate relative to the window (optional if control_id is provided)
yintegerY coordinate relative to the window (optional if control_id is provided)
drag_and_dropDrag from source to target element.
ParameterTypeDescription
durationnumberDuration of the drag in seconds (default: 0.5)
source *anySource element info dict with rect/position
target *anyTarget element info dict with rect/position
drag_mouseDrag the mouse from one point to another.
ParameterTypeDescription
buttonstringMouse button to use ("left", "right", "middle")
durationnumberTime in seconds to take for the drag
tweenstringTweening function for the movement
x1 *integerStarting X coordinate
x2 *integerEnding X coordinate
y1 *integerStarting Y coordinate
y2 *integerEnding Y coordinate
element_existsCheck if a UI element exists.
ParameterTypeDescription
app_paramanyOptional Application instance to use for finding the element
selector *anyElement selector (title, class_name, or dict of properties)
timeoutnumberMaximum time to wait for element (default: 5 seconds)
extract_textExtract text from an image or screen region using OCR.
ParameterTypeDescription
configstringTesseract configuration parameters
image_pathstringPath to the image file (if not using window/region)
languagestringLanguage code for OCR (e.g., 'eng', 'fra', 'spa')
regionarrayRegion to capture (left, top, right, bottom)
window_handleintegerHandle of the window to capture (if not using image_path)
find_imageFind a template image within a screenshot or window.
ParameterTypeDescription
regionarrayOptional region (left, top, right, bottom) to search within
template_path *stringPath to the template image to find
thresholdnumberConfidence threshold (0-1) for template matching
window_handleintegerOptional handle of the window to search in (None for entire screen)
find_image_on_screenFind an image on the screen using template matching.
ParameterTypeDescription
confidencenumberConfidence threshold (0-1) for matching (default: 0.8)
grayscalebooleanWhether to convert images to grayscale for matching (faster)
image_path *stringPath to the template image to find
regionobjectOptional dict with 'left', 'top', 'width', 'height' to search within
find_window_by_titleFind window by title text.
ParameterTypeDescription
partialbooleanWhether to do partial match (default: True)
title *stringWindow title to search for
get_active_windowGet the currently active window.
get_all_elementsGet all UI elements in a window.
ParameterTypeDescription
max_depthintegerMaximum depth to traverse the element tree
window_handle *integerThe handle of the parent window
get_all_windowsGet information about all visible windows.
get_cursor_positionGet current mouse cursor position.
get_desktop_stateCaptures the complete hierarchical state of the Windows desktop UI. WHAT IT DOES: This tool traverses the UI tree of all active windows to produce a structured JSON representation of every discoverable element (buttons, panes, edit boxes, etc.). It optionally integrates computer vision (capturing element screenshots) and OCR (reading text from purely graphical controls) to enrich the metadata. WHEN TO USE: - Use this as your 'Primary Discovery' tool when starting a new automation task. - Use it to find stable selectors (Control IDs, Class Names, Names) for 'automation_elements' calls. - Use 'use_vision=True' to get visual snapshots of the elements for multi-modal analysis. - Use capture_mode='ax'|'som'|'vision' (Cua-style); prefer get_window_state for one HWND. RECOVERY: If the UI tree is exceptionally deep, increase 'max_depth' or target a specific window first using 'automation_windows'. If capture is slow, decrease 'max_depth' or disable 'use_ocr'. ## Return Format {"status": "success" | "error", "message": str, "data": {"element_count": int, ...}, "recovery_tip": str | null} ## Examples - get_desktop_state(request={"max_depth": 5}) -> {"status": "success", "message": "Desktop state capture completed: 120 elements found", ...} - get_desktop_state(request={"capture_mode": "ax", "use_ocr": False}) -> {"status": "success", ...}
ParameterTypeDescription
request *any
get_element_infoGet detailed information about a UI element.
ParameterTypeDescription
control_id *stringThe control ID of the element
window_handle *integerThe handle of the parent window
get_element_rectGet the rectangle of a UI element.
ParameterTypeDescription
control_id *stringThe control ID of the element
window_handle *integerThe handle of the parent window
get_element_textGet the text of a UI element.
ParameterTypeDescription
control_id *stringThe control ID of the element
window_handle *integerThe handle of the parent window
get_helpGet comprehensive help and documentation for all available tools.
ParameterTypeDescription
categorystringFilter by tool category (system, windows, elements, mouse, input, visual, face-recognition, desktop_state)
tool_namestringGet detailed help for a specific tool
get_mouse_positionGet the current mouse cursor position.
get_process_listGet a list of running processes.
get_system_clipboardGet current clipboard content.
get_text_under_cursorGet text at the current cursor position using OCR.
ParameterTypeDescription
regionobjectOptional dict with 'width' and 'height' to define a region around the cursor
get_ui_treeGet a hierarchical representation of the UI tree.
ParameterTypeDescription
app_paramanyOptional Application instance to get UI tree from
max_depthintegerMaximum depth to traverse the UI tree (default: 3)
get_window_rectGet the rectangle of a window.
ParameterTypeDescription
handle *integerThe window handle
get_window_stateCapture UI state for one window (Cua Driver-shaped loop). WHAT IT DOES: Returns a snapshot_id, element_index-addressable elements, and optional set-of-mark screenshot for a single HWND. Use before automation_elements(click, snapshot_id=..., element_index=...). capture_mode: - ax: accessibility tree only (no screen grab) - som: tree + annotated screenshot (default) - vision: window image only (no element_index clicks) WHEN TO USE: - Agent drives one app (Excel, Notepad) while the user keeps another app (Cursor) focused. - Prefer this over get_desktop_state for targeted loops. See docs/CUA_PARITY.md and windows_computer_use_mcp_DISPATCH for background vs foreground dispatch. ## Return Format {"status": "success" | "error", "message": str, "data": {"snapshot_id": str, "elements": [...]}, "recovery_tip": str | null} ## Examples - get_window_state(request={"window_handle": 123456, "capture_mode": "som"}) -> {"status": "success", "data": {"snapshot_id": "abc123", ...}} - get_window_state(request={"window_handle": 123456, "capture_mode": "ax"}) -> {"status": "success", ...}
ParameterTypeDescription
request *any
get_window_titleGet the title of a window.
ParameterTypeDescription
handle *integerThe window handle
global_keyloggerSession-wide keyboard event capture (Windows low-level hook via pynput). WHAT IT DOES: Records key press (and optionally key release) events into a bounded in-memory ring buffer. Use 'read' to retrieve the most recent events without stopping the listener. WHEN TO USE: - Debugging shortcut or focus issues during UI automation. - Auditing keystrokes in a controlled, authorized environment only. SECURITY: - Disabled unless the server is started with windows_computer_use_mcp_ENABLE_KEYLOGGER=1. - Starting capture requires the same HITL approval window as other input tools (unless windows_computer_use_mcp_BYPASS_HITL is set). - Do not use for spying; comply with law and policy. OPERATIONS: - 'start' - begin listening (optional max_buffer, include_release). - 'stop' - stop listener; buffer remains until cleared or new start. - 'status' - running flag, buffer fill, limits. - 'read' - return most recent events (limit, flush removes only those events from buffer). - 'clear' - empty buffer without stopping the listener. RETURNS: ToolResult with status, message, and data (events list, counts, etc.). ## Return Format {"status": "success" | "error", "message": str, "data": {"events": [...], ...}, "recovery_tip": str | null} ## Examples - global_keylogger(request={"operation": "status"}) -> {"status": "success", "data": {"running": False, ...}} - global_keylogger(request={"operation": "start"}) -> {"status": "success", ...} (requires HITL approval + ENABLE_KEYLOGGER=1)
ParameterTypeDescription
request *any
health_checkCheck if the PyWinAuto MCP server is running and operational.
highlight_elementHighlight a UI element with a colored rectangle.
ParameterTypeDescription
colorstringHighlight color (name or hex code, e.g., "red" or "#FF0000")
control_id *stringControl ID of the element to highlight
durationnumberDuration to show the highlight in seconds (0 for just save/return)
output_pathstringOptional path to save the highlighted image
thicknessintegerThickness of the highlight border in pixels
window_handle *integerHandle of the window containing the element
hover_elementHover the mouse over a UI element.
ParameterTypeDescription
control_idstringThe control ID of the element to hover over (optional if x and y are provided)
durationnumberDuration of the hover in seconds
window_handle *integerThe handle of the parent window
xintegerX coordinate relative to the window (optional if control_id is provided)
yintegerY coordinate relative to the window (optional if control_id is provided)
hover_mouseMove mouse to coordinates and hover for specified duration.
ParameterTypeDescription
durationnumberHow long to hover in seconds (default: 0.5)
x *integerX coordinate to hover at
y *integerY coordinate to hover at
is_element_enabledCheck if a UI element is enabled.
ParameterTypeDescription
control_id *stringThe control ID of the element
window_handle *integerThe handle of the parent window
is_element_visibleCheck if a UI element is visible.
ParameterTypeDescription
control_id *stringThe control ID of the element
window_handle *integerThe handle of the parent window
list_known_facesList all known faces in the system.
list_windowsList all visible windows on the desktop.
maximize_windowMaximize a window.
ParameterTypeDescription
handle *integerThe window handle to maximize
minimize_windowMinimize a window.
ParameterTypeDescription
handle *integerThe window handle to minimize
mouse_hoverHover over an element.
ParameterTypeDescription
durationnumberTime in seconds to hover (default: 0.5)
element *anyElement info dict with rect/position
mouse_move_relativeMove mouse relative to current position.
ParameterTypeDescription
x *integerPixels to move horizontally (positive = right, negative = left)
y *integerPixels to move vertically (positive = down, negative = up)
mouse_move_to_elementMove mouse to a UI element.
ParameterTypeDescription
element *anyElement info dict with rect/position
xintegerOptional x offset from element's center
yintegerOptional y offset from element's center
mouse_scrollScroll the mouse wheel.
ParameterTypeDescription
amount *integerNumber of 'clicks' to scroll (positive = up, negative = down)
xintegerOptional X coordinate to move to before scrolling
yintegerOptional Y coordinate to move to before scrolling
move_mouseMove mouse to specific coordinates.
ParameterTypeDescription
x *integerX coordinate to move to
y *integerY coordinate to move to
press_hotkeyPress a combination of keys (hotkey/shortcut).
ParameterTypeDescription
intervalnumberDelay between repeated presses in seconds
keys *arrayList of keys to press simultaneously (e.g., ['ctrl', 'c'])
pausenumberPause after pressing in seconds
pressesintegerNumber of times to press the hotkey
press_keyPress a key or combination of keys.
ParameterTypeDescription
intervalnumberDelay between repeated presses in seconds
keys *anyThe key or list of keys to press (e.g., 'a', 'ctrl+c', ['ctrl', 'c'])
pausenumberPause after pressing in seconds
pressesintegerNumber of times to press the key(s)
recognize_faceRecognize faces in an image.
ParameterTypeDescription
image_path *stringPath to the image file
restore_windowRestore a window to its normal state.
ParameterTypeDescription
handle *integerThe window handle to restore
right_clickRight-click on an element or at specific coordinates.
ParameterTypeDescription
elementanyOptional element info dict to click on
xintegerX coordinate (if element not provided)
yintegerY coordinate (if element not provided)
right_click_elementRight-click on a UI element.
ParameterTypeDescription
control_idstringThe control ID of the element to click (optional if x and y are provided)
window_handle *integerThe handle of the parent window
xintegerX coordinate relative to the window (optional if control_id is provided)
yintegerY coordinate relative to the window (optional if control_id is provided)
scroll_mouseScroll mouse wheel at current or specified position.
ParameterTypeDescription
amount *integerScroll amount (positive = up, negative = down)
xintegerOptional X coordinate to scroll at
yintegerOptional Y coordinate to scroll at
send_keysSend special key combinations.
ParameterTypeDescription
keys *stringKey combination (e.g., "ctrl+c", "alt+tab", "enter")
set_element_textSet the text of a UI element.
ParameterTypeDescription
control_id *stringThe control ID of the element
text *stringThe text to set
window_handle *integerThe handle of the parent window
set_system_clipboardSet clipboard content.
ParameterTypeDescription
content *stringText content to copy to clipboard
set_window_foregroundBrings a window to the foreground and activates it.
ParameterTypeDescription
handle *integerThe window handle
set_window_positionSet the position and size of a window.
ParameterTypeDescription
handle *integerThe window handle
height *integerThe height of the window
width *integerThe width of the window
x *integerThe x-coordinate of the top-left corner
y *integerThe y-coordinate of the top-left corner
take_screenshotTake a screenshot of the entire screen or a specific window.
ParameterTypeDescription
formatstringImage format ("png" or "jpg")
regionarrayOptional tuple (left, top, right, bottom) defining the region to capture
return_base64booleanIf True, return the image as a base64-encoded string
window_handleintegerOptional handle of the window to capture (None for entire screen)
type_textType text at current cursor position.
ParameterTypeDescription
text *stringText to type
verify_textVerify that an element contains the expected text.
ParameterTypeDescription
app_paramanyOptional Application instance to use for finding the element
exact_matchbooleanIf True, text must match exactly (default: True)
expected_text *stringText to verify
selector *anyElement selector (title, class_name, or dict of properties)
timeoutnumberMaximum time to wait for element (default: 5 seconds)
waitPause execution for specified seconds.
ParameterTypeDescription
seconds *numberNumber of seconds to wait
wait_for_elementWait for a UI element to appear.
ParameterTypeDescription
app_paramanyOptional Application instance to use for finding the element
selector *anyElement selector (title, class_name, or dict of properties)
timeoutnumberMaximum time to wait in seconds (default: 10)
wait_for_windowWait for a window with the specified title to become active.
ParameterTypeDescription
exact_matchbooleanWhether to match the window title exactly (default: True)
timeoutnumberMaximum time to wait in seconds (default: 10)
title *stringWindow title or partial title to wait for

Security checks

  • ✓README presentThe repository's README runs to about 1.7K words.
  • ✓License declaredThe repository declares the MIT license.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

3 checks have not been run yet.

Releases

v0.8.0v0.8.0 - assfix: shutdown/capabilities/skills/discover/stream + silent-swallow cleanup · 10 Oct 2026Assfix 2026-10-10: POST /api/v1/shutdown, /capabilities, /skills, /llm/discover, /llm/onboarding, /llm/chat/stream; S110/S112/E722 un-ignored and fixed (55 sites log instead of swallow); manifest __dirname; HTTP lifespan fix (verified live…
v0.7.1Windows Computer Use MCP v0.7.1 · 17 Aug 2026Windows Computer Use MCP (pywinauto) - desktop automation via MCP: CUA tools, mission runner, visual automation, NSIS certification smoke tests. v0.7.1 maintenance release.
v0.7.0v0.7.0 — Autonomous Windows Agent (6 phases) · 15 Jun 2026v0.7.0 - Phases 1-6 Complete Windows Computer Use for AI Agents - click, screenshot, type, drag, OCR, and verify native Windows UI via MCP. 22 portmanteau tools. Phase 1: Autonomous Mission Engine automation_mission(run=...) - give it a…
v0.6.0v0.6.0 — Renamed to windows-computer-use-mcp · 15 Jun 2026What's New Repo renamed from pywinauto-mcp to windows-computer-use-mcp. GitHub auto-redirects the old URL. New tools: analyze_winapp (auto-crawl + screenshot + element map), CuaHUD (blinking red overlay with e-stop), crawler webapp page.…

README

The repository's README runs to about 1.7K words. The original in the repository is authoritative.

Read full README
Questions

About Pywinauto MCP

How do I install Pywinauto MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Pywinauto MCP safe to use with an AI agent?

Its trust score is 66 out of 100 (good). It passes 2 of the 3 static checks Conduid ran on the repository; it does not pass Scoped permissions. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Pywinauto MCP still maintained?

Yes — the latest release is v0.8.0 (10 Oct 2026), and the last commit was yesterday. The repository has 61 stars.

What tools does Pywinauto MCP provide?

Conduid read 86 tools from the source: add_face, analyze_winapp, approve_automation, automation_assert, automation_dialog, automation_elements, automation_face, automation_keyboard and 78 more. 77 of them publish their parameters, listed under Tools above.

What license is Pywinauto MCP released under?

The repository declares the MIT license. That applies to the latest release, v0.8.0, as well.