WinCtl

io.github.sitharaj88由 GitHub 帳號 sitharaj88 發布v1.0.2更新於 Oct 24, 2026

Windows desktop control for AI agents: screen, UI Automation, input, processes, files, shell.

概覽

AI 產生的概覽

WinCtl 讓 AI 助理完整控制 Windows 桌面:螢幕截圖、UI Automation、滑鼠鍵盤輸入、視窗、處理程序、檔案與 shell。

可以做什麼
WinCtl 提供 40 個工具,分為五個能力層級:螢幕擷取與螢幕列舉,視窗列出、聚焦、移動與關閉,模擬滑鼠與鍵盤輸入,UI Automation 快照與控制項呼叫,系統與處理程序資訊,服務與處理程序控制,檔案讀寫與搜尋,剪貼簿存取,以及 PowerShell 或 cmd 執行。被停用層級中的工具不會被註冊,模型無法看到或呼叫。它採用 UI Automation 樹與 DPI 感知座標,而非原始像素點擊,並會把每次呼叫寫入本機 JSONL 稽核記錄。
適用情境
當助理需要在使用者自己的機器上操作真實的 Windows 應用程式時使用:驅動沒有 API 的圖形介面、讀取無障礙樹以點擊具名控制項、自動化桌面工作流程,或檢視與管理本機處理程序、服務與檔案。它僅支援 Windows 桌面,不適合無頭伺服器或非 Windows 主機。
執行需求
需要 Windows 10(1809+)或 Windows 11,以及 Node.js 20 或更新版本;原生相依套件以預先建置的執行檔提供,不需要編譯器。以 npm 套件 @sitharaj88/winctl 或 winctl.mcpb 桌面擴充安裝,透過 stdio 執行。未宣告身分驗證。設定透過環境變數:WINCTL_PROFILE、WINCTL_TIERS、WINCTL_ALLOWED_PATHS、WINCTL_CONFIRM_DESTRUCTIVE、WINCTL_AUDIT_LOG、WINCTL_MAX_IMAGE_WIDTH。
安裝前請注意
這是範圍很廣的桌面控制。full 設定會加入處理程序控制與任意 shell 執行,filesystem 層級可以建立、修改、移動與刪除檔案;除非確有需要,建議維持預設的 standard 或 readonly。WINCTL_CONFIRM_DESTRUCTIVE 預設為 true,應保持開啟。螢幕擷取與工具回傳內容會傳送給所連接的 AI 服務商,因此在處理機密資料的機器上啟用螢幕擷取有實際風險。稽核記錄保存在本機,可用 WINCTL_AUDIT_DISABLED 關閉。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 WinCtl,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[WinCtl]

WinCtl

Full Windows desktop access for Claude and other MCP clients
See the screen, read and drive real application UIs, manage windows and processes, work with files, and run shell commands — all behind a tiered permission model with audit logging.

[npm] [license]


Why this connector

Most desktop automation servers hand the model a screenshot and a click(x, y) tool, which breaks the moment a window moves. This one is built around the things that actually make Windows automation reliable:

  • UI Automation first. uia_snapshot reads an application's accessibility tree, so Claude can act on "the Save button" rather than on coordinates that go stale. uia_invoke and uia_set_value drive controls directly.
  • Correct coordinates, always. The process declares per-monitor DPI awareness before touching any UI API, and reports the DWM frame bounds rather than the raw window rect (which includes an invisible ~7px resize border). Without this, every coordinate on a scaled display is silently wrong — on a 200% display, GetWindowRect reports 1351px where the true edge is 2641px.
  • Input that actually arrives. Synthetic typing is paced, because batching Unicode key events makes applications drop and repeat characters. Text over 200 characters is pasted via the clipboard instead, and your clipboard is restored afterwards.
  • Handles that cannot betray you. Window ids are opaque and fingerprinted; Windows recycles window handles, and a stale one silently retargeting to a different app is exactly how automation closes the wrong window.
  • Honest failures. window_focus verifies the foreground actually changed and says so when Windows refuses. Errors explain what to do next rather than surfacing an HRESULT.

Requirements

  • Windows 10 (1809+) or Windows 11
  • Node.js 20 or newer
  • No compiler or build tools — every native dependency ships prebuilt binaries

Install

Claude Desktop (recommended)

Download winctl.mcpb from the latest release and double-click it. Claude Desktop installs it and exposes the permission profile, allowed folders and confirmation settings in its UI.

Claude Code

Install globally first, then register the command:

bash
npm install -g @sitharaj88/winctlclaude mcp add winctl -- winctl

Add --scope user to the second command to make it available in every project rather than just the current one.

Don't use npx -y @sitharaj88/winctl here. It works, but WinCtl depends on prebuilt native binaries (sharp, koffi), and npx re-resolves them on every launch — around 18 seconds versus 3 for a global install. MCP clients give up long before that and report Connection closed.

Any MCP client (manual)

jsonc
{  "mcpServers": {    "winctl": {      "command": "winctl",      "env": {        "WINCTL_PROFILE": "standard"      }    }  }}

If winctl isn't on your PATH, point at the entry point directly — on Windows a global npm install lands in %APPDATA%\npm\node_modules:

jsonc
{  "mcpServers": {    "winctl": {      "command": "node",      "args": ["C:\\Users\\<you>\\AppData\\Roaming\\npm\\node_modules\\@sitharaj88\\winctl\\dist\\index.js"]    }  }}

Claude Desktop's config lives at %APPDATA%\Claude\claude_desktop_config.json.

Permission tiers

Every tool belongs to exactly one tier. Tools in a disabled tier are never registered, so the model cannot see them, attempt them, or spend context reading their descriptions.

TierWhat it allows
observeScreenshots, window/monitor enumeration, UI trees, system and process info, file reads
interactMouse and keyboard input, UI Automation invokes, window focus/move/close, clipboard writes
filesystemCreating, modifying, moving and deleting files
manageStarting and terminating processes, controlling services
shellArbitrary PowerShell and cmd execution

Profiles bundle these:

ProfileTiers
readonlyobserve
standard (default)observe, interact, filesystem
fullall five
bash
# Pick a profileWINCTL_PROFILE=readonly
# …or choose tiers explicitlyWINCTL_TIERS=observe,interact

Configuration

VariableDefaultPurpose
WINCTL_PROFILEstandardreadonly, standard or full
WINCTL_TIERS—Explicit tier list, overrides the profile
WINCTL_ALLOWED_PATHS—Semicolon-separated folders file tools may touch
WINCTL_DENIED_PATHS—Extra folders to refuse
WINCTL_CONFIRM_DESTRUCTIVEtrueAsk before destructive actions
WINCTL_AUDIT_LOG%LOCALAPPDATA%\winctl\audit.jsonlAudit log path
WINCTL_AUDIT_DISABLEDfalseTurn auditing off
WINCTL_MAX_IMAGE_WIDTH1600Screenshot downscale width
WINCTL_COMMAND_TIMEOUT_MS60000Shell/PowerShell time limit

An unrecognised profile name fails closed to readonly with a warning on stderr, rather than guessing what you meant and possibly granting write access.

Tools

Screen (5)
ToolTierDescription
screen_list_monitorsobserveDisplays with position, resolution and DPI scale
screen_captureobserveScreenshot a monitor or the whole virtual desktop
screen_capture_regionobserveScreenshot a rectangular region
screen_capture_windowobserveScreenshot one window, even if overlapped
screen_list_capturable_windowsobserveWindows available for individual capture
Windows (7)
ToolTierDescription
window_listobserveVisible top-level windows with stable ids and bounds
window_get_activeobserveThe window with keyboard focus
window_get_desktop_infoobserveVirtual desktop bounds and cursor position
window_focusinteractRaise and focus a window, with verification
window_set_stateinteractMinimize, maximize, restore, hide, show
window_moveinteractMove and resize (un-maximizes first)
window_closeinteractAsk a window to close
Input (7)
ToolTierDescription
input_move_mouseinteractMove the cursor
input_clickinteractClick, right-click or double-click
input_draginteractDrag between two points, interpolated
input_scrollinteractScroll vertically or horizontally
input_typeinteractType Unicode text, or paste when long
input_press_keysinteractChords such as ctrl+shift+escape
input_key_holdinteractHold or release a key
UI Automation (4)
ToolTierDescription
uia_snapshotobserveRead an application's accessibility tree
uia_findobserveFind controls by name, id or type
uia_invokeinteractClick, toggle, expand, select or focus a control
uia_set_valueinteractSet an editable control's text directly
System & processes (8)
ToolTierDescription
system_infoobserveOS, CPU, memory, disks, network, battery, GPU
system_list_servicesobserveServices with state and startup type
system_list_installed_appsobserveInstalled applications
system_notifyinteractWindows toast notification
system_control_servicemanageStart, stop or restart a service
process_listobserveProcesses with CPU and memory usage
process_startmanageLaunch an application or open a document
process_killmanageTerminate a process
Files, clipboard & shell (9)
ToolTierDescription
file_known_foldersobserveStandard Windows paths and current access limits
file_listobserveDirectory listing with sizes and timestamps
file_readobserveRead text or base64 content
file_searchobserveFind files by name pattern and content
file_writefilesystemWrite, append or create
file_managefilesystemCopy, move, delete, mkdir
clipboard_readobserveRead clipboard text
clipboard_writeinteractSet clipboard text
shell_runshellRun a PowerShell or cmd command

40 tools total. Every one carries title, readOnlyHint and destructiveHint annotations.

Example

"Open Notepad, write my meeting notes into it and save to Documents."

Claude will typically:

  1. process_start → launch Notepad
  2. window_list → find the window and its owning process id
  3. window_focus → make sure keystrokes land there
  4. input_type → paste the notes via the clipboard
  5. input_press_keys ctrl+s, then uia_set_value on the filename field
  6. screen_capture_window → confirm the result visually

Safety

  • Tier gating is the primary boundary — disabled tools are never exposed.
  • Path containment resolves symlinks before checking, so a link inside an allowed folder cannot reach a denied one. System32, WinSxS, Boot and the Startup folder are refused in every profile, including full.
  • Confirmation via MCP elicitation before destructive actions.
  • Audit log of every call in JSONL, with sensitive-looking arguments redacted. See PRIVACY.md.
  • Modifier release on shutdown, so a crash mid-chord cannot leave Ctrl latched down.
  • Refuses to terminate its own process or pids 0–4.

Screenshots capture whatever is on screen and send it to your AI provider. Read PRIVACY.md before enabling screen capture on a machine that handles confidential material.

Elevation

Windows blocks a normal-privilege process from automating, capturing or sending input to windows owned by elevated processes (UIPI). To drive an administrator application, run the connector elevated — otherwise those calls fail with a clear explanation rather than silently doing nothing.

Privacy Policy

WinCtl runs entirely on your machine. It has no backend, no telemetry and no analytics, and it makes no network calls of its own. The author receives nothing about you or your computer.

  • What it accesses: screen contents, window and application state, system and process information, files within the folders you permit, and the clipboard — each only when a tool is called. It generates synthetic input but never records your real keyboard or mouse activity.
  • Where data goes: to the AI client you connect it to, and nowhere else. Anything a tool returns becomes part of that conversation and is therefore subject to that client's privacy policy. A screenshot sends whatever is on screen to your AI provider — consider that before enabling screen capture on a machine handling confidential material.
  • What is stored: only a local audit log at %LOCALAPPDATA%\winctl\audit.jsonl — one line per tool call, with sensitive-looking arguments redacted. It is never uploaded. Disable it with WINCTL_AUDIT_DISABLED=1, or delete the file at any time.
  • Retention and sharing: nothing is retained off-machine and nothing is shared with third parties.
  • Contact: Sitharaj Seenivasan — [email protected]

Full policy: PRIVACY.md

Development

bash
git clone https://github.com/sitharaj88/winctlcd winctlnpm installnpm run build
npm run smoke                 # self-test against the live desktopnode scripts/smoke.mjs --full # full MCP protocol suite, including UI Automationnpm run inspect               # MCP Inspector UI

scripts/verify-interactive.mjs drives Notepad end-to-end — it launches the app, types, verifies the text through UI Automation and cleans up. It uses the real mouse and keyboard, so don't run it while you're using the machine.

Architecture

src/  index.ts              stdio entry point (DPI awareness runs first)  http.ts               streamable HTTP entry point, loopback-only by default  config.ts             profiles, tiers, limits  security/             tier definitions, path containment, audit log, errors  native/    ffi.ts              koffi bindings to user32/kernel32/dwmapi    dpi.ts              per-monitor DPI awareness    handles.ts          opaque, fingerprinted window ids    windows.ts          enumeration, focus, move, state    input.ts            SendInput mouse and keyboard    screen.ts           capture and token-aware encoding    powershell.ts       per-call PowerShell execution    uia.ts              UI Automation bridge  server/    registry.ts         tier gate + confirmation + audit in one place    createServer.ts     assembles tools, resources and prompts  tools/                the 40 tool definitions

Two implementation notes worth knowing if you extend this:

  • PowerShell runs one process per call. A long-lived host sounds better, but -Command - buffers all of stdin until the stream closes rather than executing statement by statement, so it never returns a result. Per-call processes also mean a hung script can't wedge later calls. Commands are passed as -EncodedCommand (base64 UTF-16LE), which removes shell quoting as a source of injection bugs.
  • The INPUT struct size is asserted at startup. A layout mismatch wouldn't throw — it would send mouse events to garbage coordinates.

Publishing

bash
npm run build && npm publish --access public   # npmnpx @anthropic-ai/mcpb pack                    # build the .mcpb bundlemcp-publisher login github && mcp-publisher publish   # MCP registry

For the Claude Connectors Directory, submit desktop extensions via the extension form.

Author

Sitharaj Seenivasan

Issues and feature requests are welcome at github.com/sitharaj88/winctl/issues.

Licence

MIT © Sitharaj Seenivasan

來源:README.md,提交 91cabae

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分