Labsco
hetaoBackend logo

PyAutoGUI Server

β˜… 46

from hetaoBackend

An MCP server for PyAutoGUI that enables automated GUI testing and control, including mouse and keyboard actions, screenshots, and screen information.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

mcp-pyautogui-server

smithery badge

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

Development

Building and Publishing

  1. Sync dependencies and update lockfile:
Copy & paste β€” that's it
uv sync
  1. Build package distributions:
Copy & paste β€” that's it
uv build
  1. Publish to PyPI:
Copy & paste β€” that's it
uv publish

Note: Set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

For the best debugging experience, use the MCP Inspector.

Launch the MCP Inspector via npm:

Copy & paste β€” that's it
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.