windows-cli

A command-line interface for controlling Windows desktop applications through the same tools as a Windows automation server.

In plain words
What is it for?
Use it to find application windows, inspect their controls, click buttons, enter text, select options, and read values from Windows apps.
Why use it?
It provides one compact command surface for finding windows and interacting with accessible controls, without loading many separate tool definitions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sbroenne/mcp-windows/windows-cli
Any agent
npx skills add sbroenne/mcp-windows --skill windows-cli
Clone the repo
git clone --depth 1 https://github.com/sbroenne/mcp-windows

Made for: Claude Code, Codex.

Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,047 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00051 $0.01047
Opus 5 $0.00026 $0.00524
Sonnet 5 $0.00010 $0.00209
Haiku 4.5 $0.00005 $0.00105

Measured 2d ago against content hash a5c2f209406c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

windows-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/skills/windows-cli/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context

wincli is the command-line twin of the Windows MCP server. Every command calls the exact same underlying tool, so behavior and JSON output are identical to the MCP tools - only the entry point differs. Prefer wincli when you already have a shell: one small command vocabulary costs far fewer tokens than loading every MCP tool schema, and each call is stateless (window handles are OS-global, so there is no server session to keep alive).

Discovery (do this first)

  • wincli --help - the command map and a common workflow.
  • wincli tools - every command with its options.
  • wincli tools --json - machine-readable tool manifest (names, descriptions, JSON input schemas); the same surface the MCP server exposes via tools/list. Parse this to construct calls precisely.
  • wincli guidance - the full semantic-automation guide (same text the MCP host receives).

Preferred workflow

  1. wincli window find --title <part> (or wincli app --path <exe>) to get a window handle.
  2. wincli ui snapshot --window <handle> to see the accessible element tree.
  3. wincli ui find|click|type|select|read --window <handle> ... for normal controls.
  4. wincli ui read-table --window <handle> --automation-id <grid> to pull a grid/table/details-list into structured rows + headers in one call. For a web page, add --format article to wincli ui read to get clean main-content text (nav/breadcrumb chrome and inline link URLs stripped, headings/lists as markdown).
  5. wincli file-save --window <handle> --path <file> for Save / Save As - never raw Ctrl+S. Use wincli file-open --window <handle> --path <file> for Open flows.
  6. wincli clipboard get|set|clear for fast bulk text IO; wincli macro save|run|list|get|delete to persist a ui batch sequence and replay it by name.
  7. Fall back to wincli screenshot, wincli mouse, or wincli keyboard only for custom-drawn UI.

Patterns

Semantic-first automation

  • Target elements by --name, --name-contains, --control-type, or --automation-id, not coordinates.
  • Add --with-snapshot to ui click/ui type/ui select to get the updated tree back in the same call (perceive + act fused - avoids a second round trip).
  • Use ui batch --window <h> --steps '<json>' to run an ordered sequence (e.g. [{"action":"type","automationId":"UsernameInput","text":"me"},{"action":"click","name":"Submit"}]) in a single invocation.

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 75 lines · 51 tokens per session scan A a5c2f209406c

Subscribe to this mod's changes

windows-cli is a skill published in the GitHub repository sbroenne/mcp-windows (87 stars, last pushed 3d ago), licensed MIT. It adds 51 tokens to every session and 1,047 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.