M

MCP远程macOS控制台

@baryhuang/mcp-remote-macos-use
0 Stars 403 次浏览 baryhuang 更新于 2026-08-23

第一个开源的MCP服务器,它使人工智能能够完全控制远程macOS系统。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "remote-macos-use": {
      "args": [
        "run",
        "-i",
        "-e",
        "MACOS_USERNAME=your_macos_username",
        "-e",
        "MACOS_PASSWORD=your_macos_password",
        "-e",
        "MACOS_HOST=your_macos_hostname_or_ip",
        "--rm",
        "buryhuang/mcp-remote-macos-use:latest"
      ],
      "command": "docker"
    }
  }
}

该服务需要配置环境变量:MACOS_HOST、MACOS_PASSWORD、MACOS_USERNAME

服务介绍

MCP Server - 远程 MacOs 使用

首个开源的 MCP 服务器,使 AI 能够完全控制远程 macOS 系统。

作为 OpenAI Operator 的直接替代方案,特别为具有完整桌面功能的自主 AI 代理进行了优化,无需安装额外软件。

Docker Pulls

演示

特性

  • 无额外 API 成本:使用现有的 Claude Pro 计划免费处理屏幕
  • 最小设置:只需在目标 Mac 上启用屏幕共享——无需额外软件
  • 通用兼容性:支持所有当前和未来的 macOS 版本

我们为什么要构建这个

无妥协的原生 macOS 体验

macOS 原生生态系统在用户体验方面至今仍无可匹敌,并且在未来几年内将继续成为黄金标准。这是人类能力真正繁荣的地方,现在您的 AI 也可以在这个环境中以同样的流畅度操作。

开放式架构设计

  • 通用 LLM 兼容性:与您选择的任何 MCP 客户端一起工作
  • 模型灵活性:无缝集成 OpenAI、Anthropic 或任何其他 LLM 提供商
  • 面向未来的集成:设计为随着 MCP 生态系统的演进而发展

无痛部署

  • 目标机器上零设置:macOS 上不需要后台应用程序或代理
  • 仅需屏幕共享:控制启用了屏幕共享的任何 Mac
  • 消除后端复杂性:与其他需要运行 Python 应用程序或后台服务的解决方案不同

简化的引导过程

  • 利用 Claude Desktop 的精致 UI:无需开发人员风格的 Python 接口
  • 直观的用户体验:通过熟悉的用户友好界面与您的 AI 控制的 Mac 交互
  • 即时生产力:立即开始工作,无需繁琐的配置

架构

安装

{
  "mcpServers": {
    "remote-macos-use": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-e",
        "MACOS_USERNAME=your_macos_username",
        "-e",
        "MACOS_PASSWORD=your_macos_password",
        "-e",
        "MACOS_HOST=your_macos_hostname_or_ip",
        "--rm",
        "buryhuang/mcp-remote-macos-use:latest"
      ]
    }
  }
}

开发者指南

克隆仓库

# Clone the repository
git clone https://github.com/yourusername/mcp-remote-macos-use.git
cd mcp-remote-macos-use

构建Docker镜像

# Build the Docker image
docker build -t mcp-remote-macos-use .

跨平台发布

要为多个平台发布Docker镜像,可以使用docker buildx命令。请按照以下步骤操作:

  1. 创建一个新的构建器实例(如果你还没有的话):

    docker buildx create --use
    
  2. 为多个平台构建并推送镜像

    docker buildx build --platform linux/amd64,linux/arm64 -t buryhuang/mcp-remote-macos-use:latest --push .
    
  3. 验证镜像是否可用于指定的平台

    docker buildx imagetools inspect buryhuang/mcp-remote-macos-use:latest
    

使用方法

该服务器通过MCP工具提供远程MacOS功能。

工具规范

服务器提供了四个主要工具用于远程控制MacOS:

remote_macos_get_screen

获取远程桌面的截图。示例:

{
  "host": "remote-macos-hostname-or-ip",
  "port": 5900,
  "password": "remote-macos-password",
  "username": "remote-macos-username",
  "encryption": "prefer_on"
}

remote_macos_send_keys

发送键盘输入。示例:

{
  "host": "remote-macos-hostname-or-ip",
  "password": "remote-macos-password",
  "text": "Hello world!",
  "special_key": "enter",
  "key_combination": "cmd+c"
}

remote_macos_send_mouse

发送鼠标输入。示例:

{
  "host": "remote-macos-hostname-or-ip",
  "password": "remote-macos-password",
  "x": 500,
  "y": 300,
  "button": 1,
  "action": "click"
}

remote_macos_scale_coordinates

在不同屏幕尺寸之间缩放坐标。示例:

{
  "host": "remote-macos-hostname-or-ip",
  "password": "remote-macos-password",
  "source_width": 1366,
  "source_height": 768,
  "x": 500,
  "y": 300
}

所有工具都支持Apple认证(协议30),并且至少需要主机和密码。

限制

  • 认证支持
    • 仅支持Apple认证(协议30)

安全提示

https://support.apple.com/guide/remote-desktop/encrypt-network-data-apdfe8e386b/mac
https://cafbit.com/post/apple_remote_desktop_quirks/

我们只支持协议30,该协议使用了基于512位素数的Diffie-Hellman密钥协商协议。当与OS X 10.11或更早版本的客户端通信时,macOS 11至macOS 12会使用此协议。

以下是转换为Markdown表格的信息:

macOS 版本运行远程桌面 macOS 客户端版本 身份验证 控制和观察 复制项目或安装包 所有其他任务 协议版本
macOS 13 macOS 13 2048位 RSA 主机密钥 2048位 RSA 主机密钥 使用 2048位 RSA 主机密钥进行身份验证,然后使用 128位 AES 2048位 RSA 主机密钥 36
macOS 13 macOS 10.12 仅本地使用安全远程密码 (SRP) 协议。如果绑定到 LDAP 或 macOS 服务器版本为 10.11 或更早,则使用 Diffie-Hellman (DH) SRP 或 DH, 128位 AES 使用 SRP 或 DH 进行身份验证,然后使用 128位 AES 2048位 RSA 主机密钥 35
macOS 11 至 macOS 12 macOS 10.12 至 macOS 13 仅本地使用安全远程密码 (SRP) 协议,如果绑定到 LDAP 则使用 Diffie-Hellman SRP 或 DH 1024位, 128位 AES 从 macOS 13 到 macOS 10.13 的 2048位 RSA 主机密钥 macOS 10.13 或更高版本的 2048位 RSA 主机密钥 33
macOS 11 至 macOS 12 OS X 10.11 或更早版本 DH 1024位 DH 1024位, 128位 AES 使用 512位素数的 Diffie-Hellman 密钥协商协议 使用 512位素数的 Diffie-Hellman 密钥协商协议 30

在访问远程 MacOs 机器时始终使用安全、经过身份验证的连接。此工具仅应用于您信任且有权访问的服务器。

许可证

请参阅 LICENSE 文件获取详细信息。

相关 MCP 服务