MCP server for pyautogui
Project description
mcp-pyautogui-server
A MCP (Model Context Protocol) server that provides automated GUI testing and control capabilities through PyAutoGUI.
Features
- Control mouse movements and clicks
- Simulate keyboard input
- Take screenshots
- Find images on screen
- Get screen information
- Cross-platform support (Windows, macOS, Linux)
Tools
The server implements the following tools:
Mouse Control
- Move mouse to specific coordinates
- Click at current or specified position
- Drag and drop operations
- Get current mouse position
Keyboard Control
- Type text
- Press individual keys
- Hotkey combinations
Screen Operations
- Take screenshots
- Get screen size
- Find image locations on screen
- Get pixel colors
Installation
Prerequisites
- Python 3.12+
- PyAutoGUI
- Other dependencies will be installed automatically
Install Steps
Install the package:
pip install mcp-pyautogui-server
Claude Desktop Configuration
On MacOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows:
%APPDATA%/Claude/claude_desktop_config.json
Development/Unpublished Servers Configuration:
{
"mcpServers": {
"mcp-pyautogui-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-pyautogui-server",
"run",
"mcp-pyautogui-server"
]
}
}
}
Published Servers Configuration:
{
"mcpServers": {
"mcp-pyautogui-server": {
"command": "uvx",
"args": [
"mcp-pyautogui-server"
]
}
}
}
Development
Building and Publishing
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
- Publish to PyPI:
uv publish
Note: Set PyPI credentials via environment variables or command flags:
- Token:
--tokenorUV_PUBLISH_TOKEN - Username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
For the best debugging experience, use the MCP Inspector.
Launch the MCP Inspector via npm:
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-pyautogui-server run mcp-pyautogui-server
The Inspector will display a URL that you can access in your browser to begin debugging.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 mcp_pyautogui_server-0.1.2.tar.gz.
File metadata
- Download URL: mcp_pyautogui_server-0.1.2.tar.gz
- Upload date:
- Size: 33.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3cd6d05684bf30aa456b21e0609dcc0d5a7e7ffc652aedddebad6efa85d793c
|
|
| MD5 |
be481fe3a4007f8b73d2645ed0f00490
|
|
| BLAKE2b-256 |
d3673e951e775c33b2892fa2490394a8ec469ed93ab142cfe19b7f39fa9ff0f9
|
File details
Details for the file mcp_pyautogui_server-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mcp_pyautogui_server-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa41d69c26192a42ad6b03c3bb1f37f79ec931812c7d2ce9a90cc2d3a0f0203c
|
|
| MD5 |
4a5be9e1f34325d6d4f0b04b38967b58
|
|
| BLAKE2b-256 |
fe74d12a60842723d1180f83179e19eaf5bc723dd8dde69fa4c9beb1299f6bfc
|