Skip to main content
Glama

Computer Control MCP

by AB498

计算机控制MCP

MCP 服务器使用 PyAutoGUI、RapidOCR 和 ONNXRuntime 提供计算机控制功能,例如鼠标、键盘、OCR 等。类似于 Anthropic 的“computer-use”。零外部依赖。

  • 仅在 Windows 上测试。其他平台也应该可以运行。

MCP 计算机控制演示

快速使用(使用uvx设置 MCP)

{ "mcpServers": { "computer-control-mcp": { "command": "uvx", "args": ["computer-control-mcp@latest"] } } }

或者使用pip全局安装:

pip install computer-control-mcp

然后使用以下命令运行服务器:

computer-control-mcp # instead of uvx computer-control-mcp, so you can use the latest version, also you can `uv cache clean` to clear the cache and `uvx` again to use latest version.

特征

  • 控制鼠标移动和点击
  • 在当前光标位置输入文本
  • 截取整个屏幕或特定窗口的屏幕截图,并可选择保存到下载目录
  • 使用 OCR(光学字符识别)从屏幕截图中提取文本
  • 列出并激活窗口
  • 按键盘键
  • 拖放操作

可用工具

鼠标控制

  • click_screen(x: int, y: int) :点击指定的屏幕坐标
  • move_mouse(x: int, y: int) :将鼠标光标移动到指定坐标
  • drag_mouse(from_x: int, from_y: int, to_x: int, to_y: int, duration: float = 0.5) :将鼠标从一个位置拖动到另一个位置

键盘控制

  • type_text(text: str) :在当前光标位置输入指定的文本
  • press_key(key: str) :按下指定的键盘键

屏幕和窗口管理

  • take_screenshot(title_pattern: str = None, use_regex: bool = False, threshold: int = 60, with_ocr_text_and_coords: bool = False, scale_percent_for_ocr: int = 100, save_to_downloads: bool = False) :使用可选 OCR 捕获屏幕或窗口
  • get_screen_size() :获取当前屏幕分辨率
  • list_windows() :列出所有打开的窗口
  • activate_window(title_pattern: str, use_regex: bool = False, threshold: int = 60) :将指定窗口置于前台

发展

设置开发环境

# Clone the repository git clone https://github.com/AB498/computer-control-mcp.git cd computer-control-mcp # Install in development mode pip install -e . # Start server python -m computer_control_mcp.core

运行测试

python -m pytest

API 参考

有关可用函数和类的详细信息,请参阅API 参考

执照

麻省理工学院

如需更多信息或帮助

-
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 服务器通过统一的 API 提供计算机控制功能,包括鼠标移动、键盘操作、使用 OCR 的屏幕截图以及窗口管理。

  1. MCP 服务器使用 PyAutoGUI、RapidOCR 和 ONNXRuntime 提供计算机控制功能,例如鼠标、键盘、OCR 等。类似于 Anthropic 的“computer-use”。零外部依赖。
    1. 快速使用(使用uvx设置 MCP)
      1. 特征
        1. 可用工具
          1. 鼠标控制
          2. 键盘控制
          3. 屏幕和窗口管理
        2. 发展
          1. 设置开发环境
          2. 运行测试
        3. API 参考
          1. 执照
            1. 如需更多信息或帮助

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Windows control server built using nut.js and Model Context Protocol (MCP), providing programmatic control over Windows system operations including mouse, keyboard, window management, and screen capture functionality.
                Last updated -
                79
                137
                TypeScript
                MIT License
              • -
                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
              • -
                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
              • -
                security
                A
                license
                -
                quality
                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.
                Last updated -
                6
                Python
                MIT License
                • Apple
                • Linux

              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/AB498/computer-control-mcp'

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