kwin-mcp: Instructions file for Claude Code

CLAUDE.md

kwin-mcp CLAUDE.md is an instructions file for Claude Code from isac322/kwin-mcp. It costs 932 tokens per session, scanned A, original, MIT.

Project instructions for kwin-mcp, a server that lets AI assistants control and observe Linux desktop applications running on KDE Plasma 6.

In plain words
What is it for?
Developing or checking desktop-automation features, including isolated GUI testing and automation of a live KDE desktop.
Why use it?
They provide the project context, required tools, commands, and coding rules needed to make safe changes.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions Claude Code; mentions OpenCode.

This is isac322/kwin-mcp's own configuration. It tells Claude Code how to work on kwin-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kwin-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to isac322/kwin-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/isac322/kwin-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/isac322/kwin-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kwin-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/isac322/kwin-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/isac322/kwin-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/isac322/kwin-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/isac322/kwin-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kwin-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/isac322/kwin-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/isac322/kwin-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 932 This file is loaded in full into every session.
When invoked 932 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00932 $0.00932
Opus 5.5 $0.00373 $0.00373
Sonnet 5.5 $0.00186 $0.00186
Haiku 4.5 $0.00093 $0.00093

Measured 12d ago against content hash ac9aae52a526, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kwin-mcp CLAUDE.md 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 12d 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.

CLAUDE.md · 62 lines

How it starts

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

Claude Code Working Guidelines

Project Overview

kwin-mcp is an MCP (Model Context Protocol) server for Linux desktop GUI automation on KDE Plasma 6 Wayland. Purpose: Enable AI agents (Claude Code and other MCP clients) to launch, interact with, and observe any Wayland application — either in a fully isolated virtual KWin session for reproducible GUI testing, or by connecting to a live KDE Plasma desktop (real session or container) for collaborative live desktop automation workflows.

Toolchain

  • Package Manager: uv (Astral). Always use uv instead of pip/poetry.
  • Lint + Format: ruff (Astral). Config in pyproject.toml under [tool.ruff].
  • Type Check: ty (Astral). Config in pyproject.toml under [tool.ty].
  • Build: uv build (uv_build backend)

Common Commands

uv sync                   # Install/sync dependencies
uv add <pkg>              # Add dependency
uv add --dev <pkg>        # Add dev dependency
uv run ruff check .       # Lint
uv run ruff format .      # Format
uv run ty check           # Type check
uv run python -m kwin_mcp # Run server

Code Style

  • Python 3.12+
  • ruff rules: E, F, W, I, N, UP, B, A, SIM, TCH, RUF
  • Line length: 100
  • Quotes: double quote
  • Type hints required
  • All documents (.md files), code comments, and docstrings must be written in English

Architecture

Key modules in src/kwin_mcp/:

  • models.py: Shared argument types and result models; one render() per result
  • core.py: AutomationEngine — MCP-independent automation logic for all 29 tools
  • server.py: Thin MCP wrappers delegating to AutomationEngine
  • cli.py: Interactive REPL + pipe mode via cmd.Cmd (kwin-mcp-cli entry point)
  • session.py: Virtual sessions (dbus-run-session + kwin_wayland --virtual) and live session attachment (session_connect to real desktop or container)
  • screenshot.py: KWin ScreenShot2 D-Bus, Spectacle, and X11/scrot capture
  • accessibility.py: AT-SPI2 widget queries, element refs, and actions
  • spoken_name.py: Unicode normalization and spoken accessible-name matching
  • geometry.py: Windows, virtual desktops, activation, and output topology via KWin scripting
  • clipboard.py: Private Wayland data-control helper for Unicode paste
  • dbus_args.py: dbus_call argument parser (dbus-send strings and typed JSON)
  • dbus_service_file.py: Bounded D-Bus service-file parser and direct AT-SPI exec helper
  • input.py: KWin EIS D-Bus + libei input injection and held-input tracking

Read the full file on GitHub · 62 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. 12d ago Changed · -82 lines · -1,575 tokens per session ac9aae52a526
  2. 15d ago Changed · +4 lines · +49 tokens per session a974ba2cf6c0
  3. 1mo ago First seen · 140 lines · 2,458 tokens per session scan A b9753cfe2b43

Subscribe to this mod's changes

kwin-mcp CLAUDE.md is an instructions file published in the GitHub repository isac322/kwin-mcp (77 stars, last pushed 2d ago), licensed MIT. It adds 932 tokens to every session, about $0.0037 per session on Opus 5.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.

Related

Other instructions, from other repositories