Enables cross-platform GUI automation on Linux systems, allowing control of mouse and keyboard input and screen operations
Enables cross-platform GUI automation on macOS systems, allowing control of mouse and keyboard input and screen operations
Supports launching the MCP Inspector via npm for debugging the server's operations
Allows publishing the server package to PyPI for easy installation
Built on Python with PyAutoGUI to provide GUI testing and control capabilities
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)
Related MCP server: Computer Control MCP
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:
Claude Desktop Configuration
On MacOS:
On Windows:
Development/Unpublished Servers Configuration:
Published Servers Configuration:
Development
Building and Publishing
Sync dependencies and update lockfile:
Build package distributions:
Publish to PyPI:
Note: Set PyPI credentials via environment variables or command flags:
Token:
--tokenorUV_PUBLISH_TOKENUsername/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:
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.