Skip to main content
Glama

mcp-pyautogui-服务器

铁匠徽章

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

特征

  • 控制鼠标移动和点击

  • 模拟键盘输入

  • 截取屏幕截图

  • 在屏幕上查找图像

  • 获取屏幕信息

  • 跨平台支持(Windows、macOS、Linux)

Related MCP server: Computer Use MCP

工具

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

鼠标控制

  • 移动鼠标到指定坐标

  • 单击当前或指定位置

  • 拖放操作

  • 获取当前鼠标位置

键盘控制

  • 输入文本

  • 按下单个键

  • 热键组合

屏幕操作

  • 截取屏幕截图

  • 获取屏幕尺寸

  • 在屏幕上查找图像位置

  • 获取像素颜色

安装

先决条件

  • 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 文件。

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server that provides computer control capabilities including mouse movements, keyboard actions, screenshot capture with OCR, and window management through a unified API.
    165
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server for computer automation that provides tools for screenshots, mouse actions, keyboard input, and drag-and-drop functionality. It supports cross-platform desktop interaction for both Linux (X11) and Windows environments.
    236
    2
    MIT
  • F
    license
    A
    quality
    A
    maintenance
    Cross-platform desktop automation MCP server that lets AI agents capture screenshots, run OCR with UI-element classification, control mouse/keyboard, and launch programs on Linux, macOS, and Windows.
    20
    1
    -