Skip to main content
Glama

PyAutoGUI MCP Server

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

local-only server

The server can only run on the client's local machine because it depends on local resources.

通过 MCP 服务器提供自动化 GUI 测试和控制功能,支持跨 Windows、macOS 和 Linux 的鼠标移动、键盘输入、屏幕捕获和图像识别。

  1. 特征
    1. 工具
      1. 鼠标控制
      2. 键盘控制
      3. 屏幕操作
    2. 安装
      1. 先决条件
      2. 安装步骤
      3. Claude桌面配置
    3. 发展
      1. 构建和发布
      2. 调试
    4. 执照

      Related MCP Servers

      • -
        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 -
        8
        MIT License
        • Apple
        • Linux
      • -
        security
        A
        license
        -
        quality
        MCP server that provides computer control capabilities including mouse movements, keyboard actions, screenshot capture with OCR, and window management through a unified API.
        Last updated -
        32
        MIT License
      • A
        security
        A
        license
        A
        quality
        A powerful MCP server that provides interactive user feedback and command execution capabilities for AI-assisted development, featuring a graphical interface with text and image support.
        Last updated -
        1
        35
        MIT License
      • -
        security
        F
        license
        -
        quality
        An MCP server that allows AI tools like Claude Desktop, Claude Code, and Cursor to visually interact with macOS applications by capturing screenshots and controlling the mouse and keyboard.
        Last updated -
        4
        • Apple

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/hetaoBackend/mcp-pyautogui-server'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server