desktop-pilot
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
desktop-pilot — eyes and hands for AI on your computer (MCP)
A local MCP server that lets a connected multimodal model see the actual screen through screenshots, zoom, the UI Automation / AT-SPI accessibility tree, and OCR. The model can act using the mouse, keyboard, windows, and applications, and verify the result of each action.
The primary platform is Windows 10/11, fully tested on a real desktop.
Linux (Manjaro/Arch) offers a full X11 implementation and experimental Wayland support (see limitations).
The server uses stdio, with no cloud service or paid APIs. It uses Python 3.11+ and the official MCP SDK v2.
model ──MCP/stdio──► desktop-pilot ──► platform backend ──► OS
│ observations (obs_N) + exact coordinate mapping
│ serialized, cancellable input + tracking of held keys
└─ verification: before/after (pixels, windows, focus, field text via UIA)Capabilities
Group | Tools |
Observation |
|
Synchronization |
|
Mouse |
|
Keyboard |
|
Accessibility |
|
Windows and applications |
|
Other |
|
See the tool reference, coordinate systems, example workflows, and known limitations.
Related MCP server: Open Computer Use
See → act → verify
screenshotreturns an image (MCPImageContent, PNG/JPEG) and metadata. Metadata includesobservation_id, the source screen region, image dimensions, scale, mapping formula, monitor and its DPI, cursor, active window, and windows in the image.The model supplies a point in image pixels and
observation_id, or an elementelement_id. The server maps the point precisely to screen coordinates even if the image is downscaled by a factor of 2.7 (measured error ≤ 1 px on a 4K monitor at 150 % scale).Before acting, the server checks that the same window is under the point and has stayed in place since the observation. If the check fails, it returns
TARGET_CHANGED/TARGET_OCCLUDED/WINDOW_NOT_FOUNDand skips the click.The result reports execution (
executed) and verification (verification) separately:
| Meaning |
| The expected state was confirmed (field text was read, a checkbox was on, a window had focus, or a value was set) |
| An observable change occurred (bounding box of changed pixels, opened or closed windows, or focus change). The model checks whether it matches expectations |
| No visible change occurred. The action may have missed, so take a new observation |
| Verification found a mismatch, such as unexpected text in a field |
| Verification is unavailable (for example, a password field or access denied) / verification is disabled |
Installation
Use uv or standard pip. All dependencies are installed in the project's local .venv.
Windows
cd desktop-pilot-mcp
uv sync --extra ocr # without OCR: uv sync
uv run desktop-pilot diagnosediagnose checks screen capture, the cursor, windows, input availability (UAC or session lock),
UI Automation, OCR, the clipboard, and emergency stop hotkey registration without sending any input.
Manjaro / Arch (X11 recommended)
sudo pacman -S --needed python uv tk xclip at-spi2-core python-gobject tesseract tesseract-data-rus tesseract-data-eng
cd desktop-pilot-mcp
uv venv --python /usr/bin/python --system-site-packages # AT-SPI needs the system 'gi'
uv sync
uv run desktop-pilot diagnoseAlternatively, run scripts/install_manjaro.sh. For Wayland, also run
sudo pacman -S grim ydotool wtype wl-clipboard and systemctl --user enable --now ydotool. On KDE, install kdotool from the AUR. See known limitations for details.
Connect an MCP client
Use <project>/.venv/Scripts/desktop-pilot.exe on Windows or <project>/.venv/bin/desktop-pilot on Linux to start the server.
The stdio transport requires no arguments.
Claude Code (from any terminal):
claude mcp add desktop-pilot -- "C:\tools\desktop-pilot\.venv\Scripts\desktop-pilot.exe"Claude Desktop uses %APPDATA%\Claude\claude_desktop_config.json on Windows or ~/.config/Claude/claude_desktop_config.json on Linux:
{
"mcpServers": {
"desktop-pilot": {
"command": "C:\\tools\\desktop-pilot\\.venv\\Scripts\\desktop-pilot.exe",
"args": [],
"env": { "DESKTOP_PILOT_LOG_LEVEL": "INFO" }
}
}
}See connection examples for Claude Desktop, Claude Code (.mcp.json), Cursor, uv run, and Linux.
On Linux, the server needs the session's DISPLAY / WAYLAND_DISPLAY variables. Start the client from
the graphical session or set those variables in env.
Safety and user control
Emergency stop —
Ctrl+Alt+End(configurable). Immediately interrupts the current action and sequence, releases all keys and buttons, and blocks further input with an audible signal. Observation remains available. Only the user can unblock input by pressing the hotkey again. On Linux,pkill -USR1 -f desktop_pilotalso works. You can assign it to a global shortcut in KDE or GNOME settings. On Wayland, this is the only hotkey option.Mouse takeover. If the user moves the mouse during a multistep action such as text entry, a drag, or a sequence, the action stops with
USER_INTERRUPTED.Client cancellation (MCP
notifications/cancelled, or Stop/Esc in the client) interrupts the action at the next checkpoint and releases all pressed keys.Input release. Shortcuts are sent in one atomic batch. Inputs pressed within an action are released in
finally. Explicit holds (hold_input) appear in every response and are automatically released after 60 s. All inputs are released when the server shuts down (EOF, SIGTERM, Ctrl+C).OS access controls. Elevated windows return
PERMISSION_DENIED(UIPI). The UAC prompt and lock screen returnSECURE_DESKTOP. The server cannot simulate Ctrl+Alt+Del.Client-side confirmations. Potentially destructive actions have their own tools and MCP annotations (
destructiveHintonclick,type_text,press_keys,window_close,launch,clipboard, andrun_sequence, andreadOnlyHinton observation tools). Clients can require confirmation for those actions and allow screenshots without prompting.Untrusted screen data. Server instructions and tool descriptions tell the model to treat text from the screen, UI elements, OCR, and the clipboard as untrusted data.
Privacy. Screenshots, typed text, and clipboard contents stay out of logs and off disk. Logs (stderr) contain only operation and error codes. On Windows, pasted text uses clipboard formats that exclude it from clipboard history (Win+V) and cloud sync. To save screenshots for debugging, explicitly set
DESKTOP_PILOT_DEBUG_SAVE_DIR.
Configuration (environment variables)
Variable | Default | Description |
|
| Emergency stop hotkey ( |
|
| Disable with |
|
| Interrupt the action when the user moves the mouse |
|
| Screenshot size limit for the model |
|
|
|
|
| Before-and-after verification for actions |
|
| How long to wait for the UI to settle after an action |
|
| Automatically release held keys |
|
| Diagnostics (stderr/file only, with no user data) |
| — | Directory for debug screenshots (disabled by default) |
| Auto | Force |
Tests
uv run pytest -q # 81 tests (1 skipped on Windows without python-xlib):
# coordinates, keys, validation, errors, serialization,
# cancellation, emergency stop, the MCP layer, Linux logic
uv run python scripts/e2e_check.py # 18 scenarios on the REAL desktop (≈1 min)e2e_check.py starts the server over stdio as a real MCP client, opens a safe Tk test application
(teststand/stand.py), and uses its JSON event log to verify the results. It checks
click accuracy against the image, button activation, Cyrillic input with line breaks, shortcuts,
holding Shift, clipboard paste and restore, scrolling, dragging, stale observations after moving a
window, cancellation during input, the emergency stop hotkey, closed windows, and timeouts. On Windows,
it also checks Calculator through UI Automation and a native WinForms test application
(teststand/stand_winforms.ps1) that verifies input by reading the field.
Leave the mouse alone while the tests run. See test coverage and limitations.
Project layout
src/desktop_pilot/
server.py MCP tools, schemas, response and error format, run_sequence
desktop.py platform-independent logic: observations, targets, checks, actions
controller.py input serialization, cancellation, emergency stop, tracking of held keys
verify.py before/after verification (pixel diff, windows, focus)
geometry.py rectangles and the exact image ↔ screen mapping
keys.py key names and shortcut parsing
state.py observations and the UI element registry (in memory only)
platform/windows Win32 (SendInput, DWM, GDI/PrintWindow), UI Automation (comtypes), WinRT OCR
platform/linux X11 (XTest, EWMH, XKB), AT-SPI, Wayland (experimental), tesseract
tests/ tests on a fake platform + Linux logic
scripts/ e2e_check.py, install_manjaro.sh
teststand/ safe test applications
examples/ MCP client configurationsTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Let AI see and use your own Windows PC with your permission: screen, apps, mouse and keyboard.
Let your AI see your screen, click, type and run commands on your own Windows, Mac or Linux PC.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Remote desktop control, files, and terminal tools for AI assistants on paired Windows PCs.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables the model to observe and control the live desktop via accessibility trees and screenshots, performing actions like clicking, typing, scrolling, dragging, and setting values.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to observe and control the user's live desktop by listing apps, reading accessibility trees, and performing clicks, typing, scrolling, dragging, and other input actions with per-action approvals and local audit archives.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to drive Windows desktop automation — opening and interacting with applications, native UI controls, keyboard/mouse input, files, processes, clipboard, and Chrome/Edge browsing via UI Automation and CDP. All actions pass through a safety policy with human approval, emergency stop, and deterministic verification.1MIT
- AlicenseAqualityBmaintenanceEnables agents to perceive and control a Windows desktop, a connected local Chromium browser, or a cloud Playwright browser through human-like mouse moves, clicks, drags, scrolling, and screenshots, forming an observe-locate-act computer-use loop. Includes safety guards such as random pauses, emergency stop, and approval prompts for destructive actions.11MIT