Skip to main content

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

  1. Sync dependencies and update lockfile:
uv sync
  1. Build package distributions:
uv build
  1. Publish to PyPI:
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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_pyautogui_server-0.1.2.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_pyautogui_server-0.1.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_pyautogui_server-0.1.2.tar.gz.

File metadata

File hashes

Hashes for mcp_pyautogui_server-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b3cd6d05684bf30aa456b21e0609dcc0d5a7e7ffc652aedddebad6efa85d793c
MD5 be481fe3a4007f8b73d2645ed0f00490
BLAKE2b-256 d3673e951e775c33b2892fa2490394a8ec469ed93ab142cfe19b7f39fa9ff0f9

See more details on using hashes here.

File details

Details for the file mcp_pyautogui_server-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_pyautogui_server-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa41d69c26192a42ad6b03c3bb1f37f79ec931812c7d2ce9a90cc2d3a0f0203c
MD5 4a5be9e1f34325d6d4f0b04b38967b58
BLAKE2b-256 fe74d12a60842723d1180f83179e19eaf5bc723dd8dde69fa4c9beb1299f6bfc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page