Moonlight Desktop MCP

io.github.edulelis由 GitHub 账号 edulelis 发布v0.10.0更新于 Oct 28, 2026

Visual Windows desktop control over Moonlight/GameStream for MCP clients and coding agents

已验证STDIO仅桌面浏览器自动化开发者工具

概览

AI 生成的概览

本地 stdio MCP 服务器,通过 Moonlight/GameStream 让助手截取已配对 Windows 桌面画面并发送鼠标、键盘输入,实现可视化操作。

可以做什么
  • 配对、查看并唤醒主机:主机状态、配对流程、配置状态、Wake-on-LAN 配置与唤醒。
  • 检查、启动和停止桌面串流会话,含预检与状态查询。
  • 查看远程屏幕:屏幕截图、OCR、文本与模板查找、裁剪、差异比对与等待。
  • 交互并确认:鼠标移动与点击、拖拽、滚动、输入文字、具名按键与快捷键,以及视觉等待。
  • 在用户明确要求时启动已在 Apollo 注册的提供方应用。
适用场景
适合需要仅通过可见图形界面操作 Windows 机器的场景,例如打开应用、修改设置、关闭对话框,且目标主机已运行 Apollo 或 Sunshine 的 Desktop 应用。不适用于 shell、注册表或进程级访问。
运行要求
运行在控制端 macOS、Linux 或 Windows 机器上,而非被控 PC。需通过平台安装脚本安装,该脚本会构建原生 Moonlight 桥接与控制器依赖,不提供 npm 或 npx 包。Windows 主机须已运行 Apollo 或 Sunshine 的 Desktop 应用,并需用 PIN 完成一次配对。需要能访问该主机的网络。
安装前请注意
服务器会向远程 Windows 桌面发送真实的鼠标和键盘输入,操作可能修改或删除数据且难以撤销,应每步用新截图验证。配对密钥、画面帧、OCR 缓存和 Wake-on-LAN 设置保留在控制端。安装会执行远程安装脚本并构建原生依赖,建议先审阅或固定版本。同一时间仅支持一个桌面串流,不会抢占其他客户端占用的通道。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Moonlight Desktop MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Moonlight Desktop MCP

A local stdio MCP server for visual computer use on a paired Apollo or Sunshine Windows Desktop. MCP clients and coding agents can capture the remote screen, locate visible controls, and send mouse or keyboard input in that same coordinate space.

The server runs on the controlling macOS, Linux, or Windows machine and talks to the Windows host over Moonlight/GameStream. It is for visible tasks such as opening an application, changing a setting, or dismissing a dialog—not for a hidden Windows shell, registry, process access, or a Windows-side agent.

Choose your path

Your goalStart here
Install, update, and run the MCPInstall and update
Pair a PC and use the visual toolsUse the MCP
Clone, modify, test, or build the source yourselfDevelop from source
Give an agent the concise operating contractAgent operating guide

Most people need only the first two links. The commands in the development guide are deliberately not part of the normal installation path.

Discovery for clients and agents

  • server.json provides the standard MCP server identity, repository, version, and canonical installation page for catalogs and clients. Because this project requires a controller-native build, the card points to the managed installer instead of advertising an npm package or a hosted remote endpoint.
  • llms.txt is a compact, model-readable map of the canonical installation, use, tool, architecture, and safety documentation.
  • AGENTS.md guides coding agents working in this repository; docs/AGENT-GUIDE.md guides agents operating the installed MCP. Codex users can also install the bundled moonlight-desktop-operator skill.

Install or update

Run one command on the computer that will run the MCP—your Mac, Linux, or Windows machine, not the Windows PC being controlled. Re-run the same command later to update a clean installation.

This project is not distributed as a ready-to-run npm or npx package. Use the platform installer below so the native Moonlight bridge and controller dependencies are built and checked together.

macOS and Linux:

sh
curl --proto '=https' --tlsv1.2 -fsSL \  https://raw.githubusercontent.com/edulelis/moonlight-desktop-mcp/main/install.sh | bash

Windows PowerShell:

powershell
irm https://raw.githubusercontent.com/edulelis/moonlight-desktop-mcp/main/install.ps1 | iex

The installer obtains controller-side build dependencies, creates or refreshes its own checkout, builds the native Moonlight bridge, and verifies readiness. It preserves pairing data outside that checkout. When the Codex CLI is already available, it adds the moonlight-desktop MCP entry if one does not exist. It does not install anything on the Windows host; that host must already run Apollo or Sunshine with a Desktop application. See Install and update for review, pinning, and other MCP clients.

Use the MCP

The normal computer-use loop is:

  1. Pair once: host_status → pairing_begin → enter the returned PIN at the returned Apollo URL → pairing_status.
  2. Optionally configure Wake-on-LAN with profile_wol_configure if the PC may be asleep or powered off.
  3. Before each task, call desktop_channel_status, follow its nextAction, then call session_preflight and session_start when the transport is available and no launch preparation is in progress.
  4. Capture the Desktop, use that current frame to establish whether the requested app or setup state is visibly available, locate a target, input in that frame's coordinate space, and capture again to verify the result.
  5. Call session_stop when finished.

session_start always opens the Desktop. An application need not be registered in Apollo to be opened from the Desktop or Start menu. Use provider_app_start only when the user explicitly asks to launch an Apollo-registered provider app. The detailed setup, safety boundaries, and examples are in Use the MCP.

What it provides

NeedMCP tools
Pair, inspect, and wake a hosthost_status, pairing tools, profile_status, profile_wol_configure, host_wake
Check/start/stop a desktopsession_preflight, session_start, session_status, session_stop
See the remote screenscreen_capture, OCR, text/template lookup, crops, diffs, and waits
Interact and confirmmouse, drag, scroll, text, named-key/hotkey tools, and visual waits

The complete tool contract is in docs/TOOLS.md. The bundled agent guidance is in docs/AGENT-GUIDE.md.

Scope and safety

  • One Desktop stream at a time. If another GameStream client owns the channel, the MCP reports it and does not take it over.
  • Remote app availability, installer progress, account state, and license state are established only through the current rendered Desktop, never through a remote shell, registry, or process inspection.
  • Pairing keys, frames, OCR cache, and Wake-on-LAN settings stay on the controlling machine.
  • H.264 Desktop video defaults to 1920×1080/30fps at 20 Mbps. Pass stream_profile: "low_bandwidth" to session_start for 1280×720/30fps at 8 Mbps on a slow connection; width, height, FPS, and bitrate remain optional per-session overrides. Audio, clipboard, file transfer, HEVC/AV1, and session recovery are out of scope.
  • Every meaningful action should be visually verified using a fresh capture.

For compatibility, troubleshooting, architecture, and security details, see docs/COMPATIBILITY.md, docs/TROUBLESHOOTING.md, docs/ARCHITECTURE.md, and docs/SECURITY.md.

来源:README.md,提交 291d55f

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.10.0最新Oct 23, 2026
  2. v0.9.1Oct 19, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。