
Desktop Mcp
io.github.jaimenbell由 GitHub 帳號 jaimenbell 發布v0.1.1更新於 Oct 24, 2026
Windows desktop-control MCP server: screenshot, window mgmt, mouse/keyboard input, recording.
概覽
僅限 Windows 的本機 MCP 伺服器,讓助理截圖、檢視與管理視窗、注入滑鼠鍵盤輸入,並錄製螢幕。
- 可以做什麼
- 擷取螢幕、區域或視窗的截圖,並列出視窗、取得作用中視窗或查詢視窗資訊(永遠開啟)。啟用 window 群組後,可聚焦、移動、調整大小、最小化與還原視窗。啟用 input 群組後,可移動、點擊、拖曳與捲動滑鼠,按下按鍵、送出快速鍵與輸入文字。啟用 record 群組後,可開始、查詢狀態與停止有時長上限的 ffmpeg 螢幕錄影。
- 適用情境
- 適合助理需要檢視或操作同一台機器上的 Windows 桌面時使用,例如查看螢幕內容、整理視窗、自動化重複的圖形介面操作,或錄製一段螢幕影片。不適合遠端控制或非 Windows 主機。
- 執行需求
- 以本機 stdio 程序在 Windows 上執行,從 PyPI 安裝(pip install desktop-mcp),由 MCP 主機啟動。需要 Python 及 fastmcp、mss、pyautogui、PyGetWindow、pywin32,錄影還需 PATH 中有 ffmpeg 與 ffprobe。window、input、record 群組預設關閉,需分別以 DESKTOP_MCP_ENABLE_WINDOW、DESKTOP_MCP_ENABLE_INPUT、DESKTOP_MCP_ENABLE_RECORD 開啟;選用設定包括 DESKTOP_MCP_RATE_LIMIT_PER_MIN 與 DESKTOP_MCP_SCRATCH_DIR。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Desktop Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
desktop-mcp
[PyPI] [MCP Registry] [License: MIT] [tests] [CI]
Windows desktop-control MCP server: screenshot, window management, mouse/keyboard input, and ffmpeg screen-recording, config-gated by tool group (input off by default) -- built to the same standard as mcp-factory and rag-mcp: own pyproject, fastmcp server, honest README, real test suite.
Quickstart
window/input/record tool groups are env-gated -- input stays off
unless you explicitly opt in. See Env vars below for the full table.
Tool groups
A disabled group returns a structured policy_refusal error (never a silent
no-op, never a crash). Input actions are additionally rate-capped (default 60
actions/min, tunable via DESKTOP_MCP_RATE_LIMIT_PER_MIN) -- exceeding the
cap returns a structured rate_limited error.
This is defense-in-depth: harness-level permission prompts are the first gate, but the server itself refuses input/window/record actions unless its own env explicitly enables them, so a misconfigured or overly-permissive harness can't turn on capabilities the operator didn't opt into for this process.
Security
Read this before you register desktop-mcp. This is a desktop-control server; what it can do to your machine is spelled out here plainly so you can make an informed decision. Honesty about the blast radius is the point.
- The
observegroup (screenshot, window enumeration) is ALWAYS ON and cannot be disabled. Any caller that can reach this server can capture the contents of any visible window on the machine -- including a password manager, an authenticator/2FA app, a seed phrase, a banking tab, or a private message.screenshotreturns a file path to a PNG written to the scratch dir (default%TEMP%\desktop-mcp-scratch), not inline pixels, so captured screen contents also persist on disk until that directory is cleared. Treat the scratch dir as sensitive and run this server only on a machine and under a harness you trust. DESKTOP_MCP_ENABLE_INPUT=1grants keystroke and mouse injection into the focused window -- this is RCE-equivalent. With theinputgroup enabled, a caller can type commands, press hotkeys, and drive the mouse in whatever window currently has focus (a terminal, a browser, an admin tool). It is OFF by default for exactly this reason; turn it on only when you understand that you are handing the caller the keyboard. When disabled every input tool returns a structuredpolicy_refusal(never a silent action).- Least privilege: leave
input,window, andrecordgroups off unless a specific task needs them, keep this server on a trusted host, and do not run it elevated (admin) unless you have accepted that an elevated input group can drive elevated windows.
The env-gating, default-off input group, structured refusals, and rate cap described above are the enforced controls; this section states, without softening, what remains reachable by design.
Honest-capabilities table
Every claim below maps to the file that implements it and the test(s) that verify it -- no capability is asserted without a corresponding implementation + test.
Limitations (read before relying on this)
- UIPI (User Interface Privilege Isolation) -- protects window handles,
not input. A medium-integrity process (this server, unless you elevate
it) cannot manipulate a window owned by a higher-integrity
(elevated/admin) process:
focus_window,move_resize_window,minimize_window, andrestore_windowgo throughpygetwindow's window-handle APIs (desktop_mcp/groups/window.py), which Windows blocks under UIPI and which this server surfaces as a structuredwindow_action_failederror naming UIPI, never a silent no-op. Keyboard/mouse input tools ARE covered by UIPI too -- and worse, they fail silently.type_text,hotkey,key_press, and the mouse actions (desktop_mcp/groups/input_tools.py) go throughpyautogui, whose Windows backend actually calls the legacykeybd_event/mouse_eventWin32 functions (notSendInput--pyautoguitriedSendInputand reverted to the older calls; see_pyautogui_win.pyin the installed package). Per Microsoft's own docs, UIPI applies to synthesized input generally: "[applications] are permitted to inject input only into applications that are at an equal or lesser integrity level" (MSDNSendInputreference), and critically, "neitherGetLastErrornor the return value will indicate the failure was caused by UIPI blocking."keybd_event/mouse_eventare void-return legacy calls with no failure signal at all, sopyautogui(and this server) cannot detect a block even in principle: if an elevated window has focus, these tools report{"ok": true}while Windows silently discards the injected keystrokes/clicks -- no exception, no error field, nothing reaches the target. This is worse than the window-handle path above, which at least raises a structuredwindow_action_failederror naming UIPI. There is no code-level bypass and no workaround short of running the server elevated (or not enabling the input group at all), which this project does not do or recommend. Operators should treat any elevated app that could plausibly have focus as silently unreachable by this server's input tools, not as a gap that lets them through. Possible future enhancement (not implemented): detect the foreground window's integrity level before injecting and return a structured refusal instead of a false{"ok": true}-- tracked as a v2 idea, not a current capability. - DPI scaling. The server sets per-monitor-v2 DPI awareness at startup so
msspixel coordinates andpyautoguipoint coordinates should agree on scaled displays. This bootstrap is unit-tested for idempotency/no-crash only -- actual coordinate agreement on a live multi-DPI multi-monitor setup has not been automated-tested and should be spot-checked if you're targeting a non-100%-scaled monitor. - UAC secure desktop. When Windows switches to the secure desktop (UAC elevation prompts, Ctrl+Alt+Del, lock screen), no process running on the regular desktop -- including this server -- can see or interact with it. Screenshots will show whatever was on the regular desktop before the switch; input calls will not reach the secure desktop at all.
- Single machine, local only. No network transport, no remote control. stdio only, spawned by the MCP host on the same machine.
- Input group is off by default in this repo's own registration. See
~/.claude.json'sdesktop-mcpentry --DESKTOP_MCP_ENABLE_INPUTis not set there. Enabling it is a deliberate per-registration operator choice, not a code change. - pyautogui failsafe.
FAILSAFE=Trueis intentional: slamming the cursor into a screen corner mid-action raises inside pyautogui and aborts the call. This can interrupt an in-flightmouse_drag. Treated as acceptable v1 behavior (see plan's Open questions) -- it's a deliberate human kill-switch, not a bug. - No OCR / vision analysis. Screenshots are raw PNGs; interpreting their content is the consumer's job, not this server's.
- No clipboard tools. Credential-adjacent surface, deferred to a v2 with its own safety design.
- Not registered with the mcp-factory hub. This ships as a standalone repo (own pyproject, own venv-free system-Python312 install), matching the rag-mcp model. Hub/registry integration is a v2 candidate.
Env vars
Usage examples
Testing
CI (.github/workflows/ci.yml) runs this suite on every push/PR (on
windows-latest, since pywin32/PyGetWindow are Windows-only deps that
don't install on Linux runners) and fails the build if the Tests badge
above drifts from what the suite actually reports -- see
scripts/check_readme_counts.py.
Install
Registered in ~/.claude.json as desktop-mcp (stdio, system Python312,
observe+window+record groups enabled, input group absent from env).
Commercial support
Maintained by Jaimen Bell. For production MCP integrations, custom servers, or agent-reliability work, see jaimenbell.dev.
Building your own MCP server? The MCP Starter Kit has templates, a build playbook, and packaging war-stories from shipping this one.
mcp-name: io.github.jaimenbell/desktop-mcp
來源:README.md,提交 9c9c79e
工具
0版本歷史
1- v0.1.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分