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-服务器

通过 PyAutoGUI 提供自动化 GUI 测试和控制功能的 MCP(模型上下文协议)服务器。

特征

  • 控制鼠标移动和点击
  • 模拟键盘输入
  • 截取屏幕截图
  • 在屏幕上查找图像
  • 获取屏幕信息
  • 跨平台支持(Windows、macOS、Linux)

工具

该服务器实现了以下工具:

鼠标控制

  • 移动鼠标到指定坐标
  • 单击当前或指定位置
  • 拖放操作
  • 获取当前鼠标位置

键盘控制

  • 输入文本
  • 按下单个键
  • 热键组合

屏幕操作

  • 截取屏幕截图
  • 获取屏幕尺寸
  • 在屏幕上查找图像位置
  • 获取像素颜色

安装

先决条件

  • Python 3.12+
  • PyAutoGUI
  • 其他依赖项将自动安装

安装步骤

安装软件包:

pip install mcp-pyautogui-server

Claude桌面配置

在 MacOS 上:

~/Library/Application\ Support/Claude/claude_desktop_config.json

在 Windows 上:

%APPDATA%/Claude/claude_desktop_config.json

开发/未发布的服务器配置:

{ "mcpServers": { "mcp-pyautogui-server": { "command": "uv", "args": [ "--directory", "/path/to/mcp-pyautogui-server", "run", "mcp-pyautogui-server" ] } } }

已发布的服务器配置:

{ "mcpServers": { "mcp-pyautogui-server": { "command": "uvx", "args": [ "mcp-pyautogui-server" ] } } }

发展

构建和发布

  1. 同步依赖项并更新锁文件:
uv sync
  1. 构建软件包分发版:
uv build
  1. 发布到 PyPI:
uv publish

注意:通过环境变量或命令标志设置 PyPI 凭据:

  • 令牌: --tokenUV_PUBLISH_TOKEN
  • 用户名/密码: --username / UV_PUBLISH_USERNAME--password / UV_PUBLISH_PASSWORD

调试

为了获得最佳调试体验,请使用 MCP Inspector。

通过 npm 启动 MCP 检查器:

npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-pyautogui-server run mcp-pyautogui-server

检查器将显示一个 URL,您可以在浏览器中访问该 URL 以开始调试。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

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

通过 MCP 服务器提供自动化 GUI 测试和控制功能,支持跨 Windows、macOS 和 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