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 分

    請在儲存庫或註冊中心條目中宣告授權條款。