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.
概览
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。
安装
在 SourceWeft 中
- 打开 控制台中的 WinCtl,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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.
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_snapshotreads an application's accessibility tree, so Claude can act on "the Save button" rather than on coordinates that go stale.uia_invokeanduia_set_valuedrive 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,
GetWindowRectreports 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_focusverifies 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:
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/winctlhere. 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 reportConnection closed.
Any MCP client (manual)
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:
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.
Profiles bundle these:
Configuration
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)
Windows (7)
Input (7)
UI Automation (4)
System & processes (8)
Files, clipboard & shell (9)
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:
process_start→ launch Notepadwindow_list→ find the window and its owning process idwindow_focus→ make sure keystrokes land thereinput_type→ paste the notes via the clipboardinput_press_keysctrl+s, thenuia_set_valueon the filename fieldscreen_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,Bootand the Startup folder are refused in every profile, includingfull. - 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
Ctrllatched 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 withWINCTL_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
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
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
INPUTstruct size is asserted at startup. A layout mismatch wouldn't throw — it would send mouse events to garbage coordinates.
Publishing
For the Claude Connectors Directory, submit desktop extensions via the extension form.
Author
Sitharaj Seenivasan
- Website — sitharaj.in
- GitHub — @sitharaj88
- LinkedIn — in/sitharaj08
- Email — [email protected]
Issues and feature requests are welcome at github.com/sitharaj88/winctl/issues.
Licence
MIT © Sitharaj Seenivasan
来源:README.md,提交 91cabae
工具
0版本历史
1- v1.0.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分