RealTimeX MCP server for deterministic GUI control via PyAutoGUI
Project description
realtimex-pyautogui-server
RealTimeX's MCP server for deterministic desktop control with PyAutoGUI. This fork adapts the reference implementation with production defaults, a dedicated wait tool, and safeguards that prevent accidental keystrokes during pauses.
Features
- Mouse movement, clicks, and drag support with automatic coordinate scaling
- Keyboard typing and hotkeys
- Screen size, pixel, and screenshot utilities
- Dedicated
wait(seconds)tool for precise pauses without injecting keystrokes - Resolution-independent coordinates: Automatically scales coordinates from reference resolution to current screen
- Automatically releases modifier keys before typing to prevent stuck-shift issues
- Global PyAutoGUI defaults tuned for automation (
PAUSE,FAILSAFE)
Coordinate Scaling
The server automatically scales mouse coordinates from a reference resolution (default: 1920×1080) to your current screen resolution. This allows you to use consistent coordinate values across different display configurations.
How It Works
- Define coordinates based on a reference screen (1920×1080 by default)
move_mouseanddrag_mouseautomatically scale to your actual screen size- Success messages show both original and scaled coordinates for debugging
Example
# On a 2560×1440 screen:
move_mouse(500, 90) # Input: reference coordinates
# Output: "Mouse moved to coordinates (500, 90) [scaled to (666, 120)]."
Configuration
PyAutoGUI Settings
- Set
REALTIMEX_FAILSAFEto0or1(default1) to control PyAutoGUI's failsafe corner abort. - Set
REALTIMEX_PAUSEto a float (seconds) to override the global pause between PyAutoGUI actions (default0.3).
Coordinate Scaling Settings
- Set
REFERENCE_SCREEN_WIDTHto customize the reference screen width (default:1920) - Set
REFERENCE_SCREEN_HEIGHTto customize the reference screen height (default:1080)
Example:
export REFERENCE_SCREEN_WIDTH=2560
export REFERENCE_SCREEN_HEIGHT=1440
uvx realtimex-pyautogui-server
Usage
uvx realtimex-pyautogui-server
The server communicates over stdio and is compatible with MCP clients like Claude Desktop and the MCP Inspector.
Development
uv sync
uv run ruff check
uv run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file realtimex_pyautogui_server-0.2.0.dev9.tar.gz.
File metadata
- Download URL: realtimex_pyautogui_server-0.2.0.dev9.tar.gz
- Upload date:
- Size: 208.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c11703b9096f28a06cc723322145adf7614708a6ee0635e41ce51b2bd9377413
|
|
| MD5 |
7f1ced24bf2879fe26f257cdf6d3e6ab
|
|
| BLAKE2b-256 |
8f63ba261e845560e037334833a600ececa89a5a6a43a4570b00f599168200b0
|
File details
Details for the file realtimex_pyautogui_server-0.2.0.dev9-py3-none-any.whl.
File metadata
- Download URL: realtimex_pyautogui_server-0.2.0.dev9-py3-none-any.whl
- Upload date:
- Size: 95.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19c19de2d0ad1825f599d403cc4df6f32aa18634118badb1f2a307fe9fa93195
|
|
| MD5 |
9dd6a2fc28d6fd5f850aa5e5d4978b75
|
|
| BLAKE2b-256 |
f47c26600fd3f02b439ac3b4967efa3c2d7dc449e98d0d4c50a54ef055cf2836
|