
Desktop Touch Mcp
io.github.Harusame64由 GitHub 帳號 Harusame64 發布v2.4.0更新於 Nov 6, 2026
Computer-use MCP for Windows 10/11: 32 tools — screenshot, UIA, Chrome CDP, type/click/scroll, VBA.
概覽
適用於 Windows 的電腦操作 MCP 伺服器,讓助理檢視並操作桌面:截圖、UI Automation、Chrome CDP、鍵盤、滑鼠與終端機。
- 可以做什麼
- 觀察並操作桌面:找出帶租約的可互動實體,點擊、輸入、設值,並回傳語意差異
- 擷取與檢視畫面:文字/OCR 模式、差異模式、1:1 像素截圖、工作區快照與截圖快取
- 送出輸入:支援 IME 安全剪貼簿繞過的鍵盤輸入、滑鼠點擊與拖曳、捲動,以及舊式元素點擊
- 透過 CDP 驅動 Chrome、Edge 與 Brave:開啟、導覽、點擊、填表、執行腳本與搜尋 DOM
- 執行並讀取終端機、等待狀態變化、管理視窗、啟動應用程式、使用剪貼簿與批次巨集
- 在本地 Key Locker 管理終端機憑證,並撰寫或執行 Excel VBA 巨集
- 適用情境
- 當助理需要直接操作 Windows 應用程式(記事本、Excel、Chrome、Windows 終端機或其他程式),而不只是讀取文字時使用。適合重視以元素為基礎的定位與防誤視窗保護、而非靠像素猜測的桌面自動化工作。
- 執行需求
- 在 Windows 10/11 64 位元上以本機程序執行,透過 npx 啟動;建議 Node.js v20+。需要 PowerShell 5.1+ 作為備援、.NET 10 桌面執行階段(用於 OCR、Key Locker 與背景主控台輸入)、nut-js 所需的 Visual C++ 可轉散發套件,以及 claude 命令列。首次執行會從 GitHub Releases 下載執行階段壓縮檔;在共用網路上可用 GITHUB_TOKEN 或 GH_TOKEN 提高 API 額度。Apple Silicon 上的 macOS 14+ 僅有 4 個工具的有限預覽,需授予輔助使用與螢幕錄製權限。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Desktop Touch Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
desktop-touch-mcp
[desktop-touch-mcp MCP server]
Computer-use MCP server for Windows. Lets Claude, Cursor, or any MCP client see and operate your Windows 10/11 desktop — screenshots, UI Automation, Chrome CDP, keyboard / mouse, terminal — with semantic discover-then-act targeting that avoids pixel-coordinate guessing, and per-action perception guards that catch wrong-window typing before it happens.
32 tools, native Rust engine (UIA in 2 ms), zero-config PowerShell fallback, full CJK support, MIT licensed. Add the snippet above to your Claude / Cursor / VS Code Copilot config and Claude can drive Notepad, Excel, Chrome, Windows Terminal, and any other app on your machine.
Why this over pixel-clicking? Two ideas run through every tool: discover-then-act —
desktop_discoverreturns interactive entities with short-lived leases instead of raw coordinates, sodesktop_actoperates on what you mean, not where it was — and per-action perception guards that verify the target window's identity and bounds before input lands, catching wrong-window typing and stale-coordinate clicks before they happen.2.1 reads UI Automation by element count instead of depth: Chrome, Edge and VS Code pages, Explorer and Settings values, and Word's body are read and can be acted on, and what UIA still cannot see falls back to OCR and Set-of-Marks as before.
desktop_actalso types into Word's body, and into Windows Terminal after asking the user. 2.0 refuses an action that cannot be done, with a reason, instead of reporting it done, and an action aimed byhwndreaches that window only. See the CHANGELOG.
Features
- 🔁 Every act reports what it did —
desktop_actanswers with what changed: elements that appeared or disappeared, a modal, a focus move, the screen's repaint (observation), and withnarrate:"rich"the values and names that changed. The agent reads the result of its click from the reply instead of taking another screenshot. On UIA-blind targets it can also attach a PNG of just the region that changed (roiCapture; on by default for a visible change,returnCapture:"never"to suppress,"always"to force). - 🛑 An act that cannot be done is refused, not reported as done — input that would not reach the field, a window blocked by a dialog, a closed window, a window on another virtual desktop: nothing is sent, and the reply names the reason and what to do next. An act aimed by
hwndnever lands in another window with the same title. - 🌐 Reads deep windows (2.1) — The UI Automation read goes to depth 64 and 500 elements. Chrome, Edge and VS Code pages, which 2.0 called blind, Explorer and Settings values it left out, and Word's body are read and can be acted on (a Chrome page: 6 elements in 387 ms → 45 in 186 ms).
- 🎯 Set-of-Marks (SoM) visual fallback — Games, RDP sessions and apps with no accessibility tree still return clickable elements: when UIA is blind,
desktop_discoverandscreenshot(detail="text")switch to a Hybrid Non-CDP pipeline — Rust-powered grayscale + bilinear upscale → Windows OCR → clustering → red bounding boxes with numbered badges ([1],[2]…). Two representations come back: a PNG for spatial orientation and anelements[]list withclickAtcoords — no CDP required. - ⌨️ Types where background input does not reach — Windows Terminal, after asking the user each time (needs an MCP client with elicitation, over stdio), and Word's body, at Word's caret whether it is in front or behind.
- 🔐 Key Locker — the terminal autofills your SSH / sudo passwords — Save a credential once into the locker's own secure dialog (stored encrypted on your machine with Windows DPAPI; never shown to the assistant), then run
ssh/sudoin a console opened bykey_locker(action='launch_console')— the password is filled in automatically when the hidden prompt appears, with a per-fill confirmation prompt by default. See Key Locker. - ⚡ Rust native core — The UIA bridge and image diffing are a Rust native addon (
napi-rs+windows-rs): UIA is called over COM from a dedicated thread instead of spawning PowerShell, and image diffs use SSE2 SIMD. Without the addon, every function falls back to PowerShell transparently. The npm launcher fetches only the GitHub Release matching its version and verifies the Windows runtime zip before extracting it. - LLM-native design — Built around how LLMs think, not how humans click.
run_macrobatches multiple operations into a single API call;diffModesends only the windows that changed since the last frame. Minimal tokens, minimal round-trips. - Reactive Perception Graph — Register a
lensIdfor a window or browser tab, pass it to action tools, and get guard-checkedpost.perceptionfeedback after each action. It reduces repeatedscreenshot/desktop_statecalls and prevents wrong-window typing or stale-coordinate clicks. - Full CJK support — Uses Win32
GetWindowTextWfor window titles, avoiding nut-js garbling. IME bypass input supported for Japanese/Chinese/Korean environments. - 3-tier token reduction —
detail="image"(~443 tok) /detail="text"(~100–300 tok) /diffMode=true(~160 tok). Send pixels only when you actually need to see them. - 1:1 coordinate mode —
dotByDot=truecaptures at native resolution (WebP). Image pixel = screen coordinate — no scale math needed. Withorigin+scalepassed tomouse_click, the server converts coords for you — eliminating off-by-one / scale bugs. - Browser capture data reduction —
grayscale=true(~50% size),dotByDotMaxDimension=1280(auto-scaled with coord preservation), andwindowTitle + regionsub-crops help exclude browser chrome and other irrelevant pixels. Typical reduction for heavy captures: 50–70%. - Chromium smart fallback —
detail="text"on Chrome/Edge/Brave auto-skips UIA (prohibitively slow there) and runs Windows OCR.hints.chromiumGuard+hints.ocrFallbackFiredflag the path taken. - UIA element extraction —
detail="text"returns button names andclickAtcoords as JSON. Claude can click the right element without ever looking at a screenshot. - Auto-dock CLI —
window_dock(action='dock')snaps any window to a screen corner with always-on-top. SetDESKTOP_TOUCH_DOCK_TITLE='@parent'to auto-dock the terminal hosting Claude on MCP startup — the process-tree walker finds the right window regardless of title. - Emergency stop (Failsafe) — Park the mouse in the top-left corner of the primary monitor (within 10px of 0,0) for 500ms to trigger the emergency stop.
Requirements
Note: nut-js native bindings require the Visual C++ Redistributable. Download from Microsoft if not already installed.
Note (Key Locker): The credential helper Key Locker uses is an unsigned executable, so on some machines Windows SmartScreen or antivirus may show an "unknown publisher" warning the first time it runs. This is expected — the helper ships with desktop-touch-mcp and runs locally on your machine; you can allow it to proceed. Code signing is planned for a future release.
Installation
The npm launcher resolves runtime strictly by npm package version. For package X.Y.Z, it fetches only GitHub Release tag vX.Y.Z, downloads the zip for your platform (desktop-touch-mcp-windows.zip, or desktop-touch-mcp-macos-arm64.zip on an Apple Silicon Mac), verifies its SHA256 digest, and only then expands it under %USERPROFILE%\.desktop-touch-mcp (~/.desktop-touch-mcp on macOS). Verified cached releases are reused on later runs.
Set DESKTOP_TOUCH_MCP_HOME to override the cache root directory.
Old releases are removed once the server has started, keeping the one being run and one other (about 180 MB each on Windows). Set DESKTOP_TOUCH_MCP_KEEP_RELEASES to keep more (0 keeps all). A release another client is running is kept. Removing an old releases/vX.Y.Z folder by hand is also safe while no client runs it.
On a shared or CI network? The first run reads the GitHub Releases API to locate the runtime zip. The anonymous limit is 60 requests/hour per IP, which a shared public address (CI runners, office NAT) can exhaust before your download even starts. Set
GITHUB_TOKEN(orGH_TOKEN) in the environment and the launcher authenticates the request, raising the limit to 5,000 requests/hour. No token is needed on an ordinary home connection.
Running the launcher from a source checkout? A source build's
bin/launcher.jscarries a placeholder integrity hash (sha256: "PENDING") instead of a finalized one. Rather than download and run an unverified runtime, the launcher fails closed — this guard stops an accidentally published or unfinalized launcher from silently starting unverified code. Published npm releases always ship a real SHA256, so end users never see this. If you are intentionally running the launcher from source, setDESKTOP_TOUCH_MCP_ALLOW_UNVERIFIED=1to skip integrity verification (development only).
Does your host give up before the launcher finishes? Some desktop hosts allow a plugin a fixed budget — 60 seconds is common — to become ready, and a launcher waiting on an unreachable GitHub can spend all of it. Two environment variables cover that case.
DESKTOP_TOUCH_MCP_FETCH_TIMEOUT_MS(default15000) bounds how long the launcher waits without hearing from GitHub. It applies to the release lookup and to the download; for the download it counts silence rather than total time, so a large runtime still installs over a slow connection. A value that is not a positive number of milliseconds is ignored with a warning.
DESKTOP_TOUCH_MCP_OFFLINE_FALLBACK=1lets the launcher start a release that is already installed when GitHub cannot be reached at all. It is off by default. GitHub is always contacted first, so a reachable network still re-downloads and repairs a damaged install; only a network failure reaches the fallback, which starts the copy of your version on disk — without re-verification — or, when that version was never installed, the newest older release that completed a verified install. Answers that are not network failures (a 404, the API rate limit, a mismatched integrity hash) still stop startup loudly. Leave it off unless a host timeout forces your hand: while it is set, a corrupted install of your current version is reused instead of being repaired.The two work together: with the fallback on, startup still waits out the timeout before falling back, so lower
DESKTOP_TOUCH_MCP_FETCH_TIMEOUT_MSif your host's budget is tight. Note also that a download which is still arriving, however slowly, is never interrupted — the fallback answers when the network has gone silent, not when it is merely slow.
Register with Claude CLI
Add to ~/.claude.json under mcpServers:
No system prompt needed. The command reference is automatically injected into Claude via the MCP initialize response's instructions field.
Register with other clients (HTTP mode)
Clients that require an HTTP endpoint (GPT Desktop, VS Code Copilot, Cursor, etc.) can use the built-in Streamable HTTP transport:
The server starts at http://127.0.0.1:23847/mcp (localhost only). Register the URL in your MCP client settings. A health check is available at http://127.0.0.1:<port>/health.
In HTTP mode the system tray icon shows the active URL and provides quick-copy and open-in-browser shortcuts.
Development install
Build after install:
For a local checkout, register the built server directly:
Note: Replace
D:/path/to/desktop-touch-mcpwith the actual path where you cloned this repository.
macOS (preview)
Limited preview. The macOS build has only 4 of the tools — a small subset of the Windows build — and its behaviour may change between releases.
On an Apple Silicon Mac (macOS 14 or later) the same npx command starts a macOS server with four tools: desktop_state, desktop_discover, desktop_act (press, replace or append text) and screenshot (one window). The other tools are Windows-only and are not listed on macOS.
- Grant Accessibility — and Screen Recording for window titles and screenshots — to the app that runs the server (Terminal, iTerm, VS Code, the Claude app, …) in System Settings › Privacy & Security. On recent macOS the Accessibility pane can have another name; these commands open the two panes directly:
Then restart the MCP server — restart or reconnect it in your client, or restart the app that runs it: a server that was already running did not see a new Accessibility grant. If screenshots still fail after granting Screen Recording, quit and reopen that app. Until then the tools answer
PermissionRequiredand say what to grant. - Install with
npxonly: a release zip downloaded with a browser is refused by Gatekeeper (the native module is not notarized). - stdio only (
--httpis not available yet). Intel Macs and Linux are not supported.
Tools (32 Optimized Tools)
📖 Full Reference:
docs/system-overview.md— Exhaustive guide on parameters, return schemas, and coordinate math.
🌐 World-Graph V2 (Primary Path)
👁️ Observation & State
⌨️ Input & Control
🌐 Browser CDP (Chrome/Edge/Brave)
🛠️ Utilities & Workflow
📊 Office (Excel)
Standard workflow (v1.0.0)
The v2 World-Graph surface (desktop_discover / desktop_act) is the recommended dispatch path. The four-call shape works for native apps, browsers, and terminals identically.
Clicking — priority order:
Recovery hints for each refusal, and how leases expire: Guide → Recovery hints and leases.
More in the guide
The details live in the guide:
- Recovery hints and leases
- Terminal command completion (
until) - Key Locker (terminal credential autofill)
- Browser CDP automation
- Auto-dock CLI on startup
- Mouse homing correction
screenshotkey parameters- Security
- Mouse movement speed
- Force-Focus (AttachThreadInput)
- Auto Guard
- Diagnostic log
- Advanced response options
- Performance of the native engine (measured at v0.15)
- UI Operating Layer (V2)
- Token cost reference
Known limitations
Thanks
Huge thanks to everyone who tried a desktop-automation MCP server, filed issues, opened PRs, and shared what broke. Every bug report made the next release better. Thank you for building with me!
License
MIT
Provided as is, without warranty. No telemetry: see the privacy policy for what it sends and keeps, and the security policy to report a vulnerability.
來源:README.md,提交 2f3ba3b
工具
0版本歷史
10- v2.4.0最新Oct 30, 2026
- v2.3.4Oct 29, 2026
- v2.3.3Oct 26, 2026
- v2.3.2Oct 24, 2026
- v2.3.1Oct 14, 2026
- v2.3.0Oct 13, 2026
- v2.2.0Oct 4, 2026
- v2.1.0Oct 4, 2026
- v2.0.0Sep 24, 2026
- v1.16.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分