Skip to main content
Glama

MCP控制

模型上下文协议的 Windows 控制服务器,提供对系统操作(包括鼠标、键盘、窗口管理和屏幕捕获功能)的编程控制。

注意:该项目目前仅支持 Windows。

🔥 为什么选择 MCPControl?

MCPControl 弥合了 AI 模型和桌面之间的差距,实现了安全的程序化控制:

  • 🖱️鼠标移动和点击
  • ⌨️键盘输入和快捷键
  • 🪟窗口管理
  • 📸屏幕截图和分析
  • 📋剪贴板操作

🔌 快速入门

先决条件

  1. 安装构建工具(包括 VC++ 工作负载)
    # Run as Administrator - may take a few minutes to complete winget install Microsoft.VisualStudio.2022.BuildTools --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
  2. 安装 Python (如果尚未安装)
    # Install Python (required for node-gyp) winget install Python.Python.3.12
  3. 安装 Node.js
    # Install latest LTS version winget install OpenJS.NodeJS

安装

  1. 安装 MCPControl 包
    npm install -g mcp-control

配置

MCPControl 在1280x720 分辨率的虚拟机中运行效果最佳,可实现最佳点击精度。

配置您的 Claude 客户端以通过 SSE 传输连接到 MCPControl:

选项 1:直接 SSE 连接

要连接到在 VM 或远程机器上运行的 MCPControl 服务器:

{ "mcpServers": { "MCPControl": { "transport": "sse", "url": "http://192.168.1.100:3232/mcp" } } }

192.168.1.100:3232替换为您的服务器的 IP 地址和端口。

选项 2:使用 SSE 本地启动

要使用 SSE 传输在本地启动 MCPControl:

{ "mcpServers": { "MCPControl": { "command": "mcp-control", "args": ["--sse"] } } }

启动服务器

首先,在您的虚拟机或本地机器上启动 MCPControl 服务器:

mcp-control --sse

服务器将显示:

  • 可用的网络接口及其 IP 地址
  • 端口号(默认值:3232)
  • 连接状态消息

VM 设置示例

  1. 以 1280x720 分辨率启动 Windows VM
  2. 在虚拟机上安装 MCPControl
    npm install -g mcp-control
  3. 使用 SSE 传输运行服务器
    mcp-control --sse
  4. 记下虚拟机的 IP 地址(例如192.168.1.100
  5. 使用 SSE URL配置 Claude
    { "mcpServers": { "MCPControl": { "transport": "sse", "url": "http://192.168.1.100:3232/mcp" } } }
  6. 重新启动 Claude ,MCPControl 将出现在您的 MCP 菜单中!

🔧 CLI 选项

MCPControl 支持多个用于高级配置的命令行标志:

# Run with SSE transport on default port (3232) mcp-control --sse # Run with SSE on custom port mcp-control --sse --port 3000 # Run with HTTPS/TLS (required for production deployments) mcp-control --sse --https --cert /path/to/cert.pem --key /path/to/key.pem # Run with HTTPS on custom port mcp-control --sse --https --port 8443 --cert /path/to/cert.pem --key /path/to/key.pem

命令行参数

  • --sse - 启用 SSE(服务器发送事件)传输以进行网络访问
  • --port [number] - 指定自定义端口(默认值:3232)
  • --https - 启用 HTTPS/TLS(根据 MCP 规范,远程部署需要)
  • --cert [path] - TLS 证书文件的路径(--https 需要)
  • --key [path] - TLS 私钥文件的路径(--https 需要)

安全说明

根据 MCP 规范,生产环境中所有基于 HTTP 的传输都必须使用 HTTPS。部署 MCPControl 进行远程访问时,请务必使用--https标志并携带有效的 TLS 证书。

🚀 热门用例

辅助自动化

  • 应用程序测试:将重复的 UI 测试委托给 Claude,让 AI 浏览应用程序并报告问题
  • 工作流自动化:让 Claude 代表您操作应用程序,处理重复性任务,而您则专注于创造性工作
  • 表格填写:让 Claude 在您的监督下处理数据录入任务

人工智能实验

  • 人工智能游戏:观看克劳德通过视觉反馈学习玩简单游戏
  • 视觉推理:测试克劳德浏览视觉界面和解决视觉谜题的能力
  • 人机协作:探索新的交互范式,克劳德可以看到你的屏幕并帮助完成复杂的任务

开发和测试

  • 跨应用程序集成:桥接通常不通信的应用程序
  • UI 测试框架:通过视觉验证创建强大的测试场景
  • 演示创建:自动创建产品演示

⚠️ 重要免责声明

本软件尚处于实验阶段,存在潜在危险

通过使用此软件,您承认并接受:

  • 通过此工具让人工智能模型直接控制你的计算机本身就存在风险
  • 该软件可以控制您的鼠标、键盘和其他系统功能,可能会导致意外后果
  • 您自行承担使用该软件的全部风险。
  • 本项目的创建者和贡献者对于因使用本软件而造成的任何损害、数据丢失或其他后果不承担任何责任
  • 此工具仅应在有适当安全措施的受控环境中使用

使用风险自负

🌟 功能

🔧 自动化提供商

MCPControl 支持针对不同用例的多个自动化提供程序:

  • keysender (默认)- 具有高可靠性的原生 Windows 自动化
  • powershell - 基于 Windows PowerShell 的自动化,实现更简单的操作
  • autohotkey - AutoHotkey v2 脚本,满足高级自动化需求

提供程序配置

您可以使用环境变量配置自动化提供程序:

# Use a specific provider for all operations export AUTOMATION_PROVIDER=autohotkey # Configure AutoHotkey executable path (if not in PATH) export AUTOHOTKEY_PATH="C:\Program Files\AutoHotkey\v2\AutoHotkey.exe"

或者使用模块化配置进行具体操作:

# Mix and match providers for different operations export AUTOMATION_KEYBOARD_PROVIDER=autohotkey export AUTOMATION_MOUSE_PROVIDER=keysender export AUTOMATION_SCREEN_PROVIDER=keysender export AUTOMATION_CLIPBOARD_PROVIDER=powershell

请参阅特定于提供商的文档:

🛠️ 开发设置

如果您有兴趣贡献或从源代码构建,请参阅CONTRIBUTING.md获取详细说明。

开发要求

要构建此项目进行开发,您需要:

  1. Windows 操作系统(keysender 依赖项所需)
  2. Node.js 18 或更高版本(使用包含构建工具的官方 Windows 安装程序安装)
  3. npm 包管理器
  4. 原生构建工具:
    • 节点-gyp: npm install -g node-gyp
    • cmake-js: npm install -g cmake-js

keysender 依赖项依赖于需要这些构建工具的 Windows 特定本机模块。

📋 项目结构

  • /src
    • /handlers请求处理程序和工具管理
    • /tools核心功能实现
    • /types - TypeScript 类型定义
    • index.ts - 主应用程序入口点

🔖 仓库分支

  • main - 具有最新功能和变化的主要开发分支
  • release - 镜像最新稳定标签的稳定发布分支(当前为 v0.2.0)

版本安装

您可以使用 npm 安装特定版本的 MCPControl:

# Install the latest stable release (from release branch) npm install mcp-control # Install a specific version npm install mcp-control@0.1.22

📚 依赖项

🚧 已知限制

  • 目前不支持窗口最小化/恢复操作
  • 根据设置,多屏幕功能可能无法按预期工作
  • get_screenshot 实用程序不适用于 VS Code 扩展 Cline。请参阅GitHub 问题 #1865。
  • 根据目标应用程序,某些操作可能需要提升权限
  • 仅支持 Windows
  • MCPControl 在 1280x720 分辨率下单屏运行效果最佳。点击精度已针对此分辨率进行了优化。我们正在修复偏移/缩放错误,并正在寻找测试人员或帮助创建测试工具。

👥 贡献

参见CONTRIBUTING.md

⚖️ 许可证

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

📖 参考文献

-
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.

模型上下文协议的 Windows 控制服务器,提供对系统操作(包括鼠标、键盘、窗口管理和屏幕捕获功能)的编程控制。

  1. 🔥 为什么选择 MCPControl?
    1. 🔌 快速入门
      1. 先决条件
      2. 安装
      3. 配置
      4. 启动服务器
      5. VM 设置示例
    2. 🔧 CLI 选项
      1. 命令行参数
      2. 安全说明
    3. 🚀 热门用例
      1. 辅助自动化
      2. 人工智能实验
      3. 开发和测试
    4. ⚠️ 重要免责声明
      1. 🌟 功能
        1. 🔧 自动化提供商
          1. 提供程序配置
        2. 🛠️ 开发设置
          1. 开发要求
        3. 📋 项目结构
          1. 🔖 仓库分支
            1. 版本安装
          2. 📚 依赖项
            1. 🚧 已知限制
              1. 👥 贡献
                1. ⚖️ 许可证
                  1. 📖 参考文献

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      A beginner-friendly Model Context Protocol (MCP) server that helps users understand MCP concepts, provides interactive examples, and lists available MCP servers. This server is designed to be a helpful companion for developers working with MCP. Also comes with a huge list of servers you can install.
                      Last updated -
                      3
                      9
                      36
                      JavaScript
                      Apache 2.0
                    • A
                      security
                      A
                      license
                      A
                      quality
                      A Model Context Protocol server that provides secure command-line access to Windows systems, allowing MCP clients like Claude Desktop to safely execute commands in PowerShell, CMD, and Git Bash shells with configurable security controls.
                      Last updated -
                      9
                      350
                      105
                      JavaScript
                      MIT License
                    • -
                      security
                      -
                      license
                      -
                      quality
                      A Model Context Protocol (MCP) server that interacts with system APIs, allowing users to check connections, search employees, register breakfast, and update chemical information by shifts.
                      Last updated -
                      2
                    • -
                      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/intelligence-assist/MCPControl'

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