PyAutoGUI MCP Server

MIT License
6
  • Apple
  • Linux

Integrations

  • 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

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.

-
security - not tested
A
license - permissive license
-
quality - not tested

Provides automated GUI testing and control capabilities through an MCP server that enables mouse movements, keyboard input, screen captures, and image recognition across Windows, macOS, and Linux.

  1. Features
    1. Tools
      1. Mouse Control
      2. Keyboard Control
      3. Screen Operations
    2. Installation
      1. Prerequisites
      2. Install Steps
      3. Claude Desktop Configuration
    3. Development
      1. Building and Publishing
      2. Debugging
    4. License

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        A MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.
        Last updated -
        Python
        Apache 2.0
        • Apple
      • A
        security
        A
        license
        A
        quality
        Simple MCP Server to enable a human-in-the-loop workflow in tools like Cline and Cursor. This is especially useful for developing desktop applications that require complex user interactions to test.
        Last updated -
        1
        13
        Python
        MIT License
        • Linux
        • Apple
      • A
        security
        A
        license
        A
        quality
        The first open-source MCP server that enables AI to fully control remote macOS systems.
        Last updated -
        6
        55
        Python
        MIT License
        • Apple
      • -
        security
        A
        license
        -
        quality
        An MCP server that bridges AI agents with GUI automation capabilities, allowing them to control mouse, keyboard, windows, and take screenshots to interact with desktop applications.
        Last updated -
        Python
        MIT License
        • Apple
        • Linux

      View all related MCP servers

      ID: qjvdfenpis