1. Conduid
  2. Developer Tools
  3. Kwin MCP
MCP server · Developer Tools

Kwin MCP

MCP server for Linux desktop GUI automation on KDE Plasma 6 Wayland — 29 tools for virtual and live sessions

Unclaimed MIT browser
64Good

Scored 5 hours ago · breakdown

About Kwin MCP

Kwin MCP is an MCP server published by isac322 in the Developer Tools category: mCP server for Linux desktop GUI automation on KDE Plasma 6 Wayland — 29 tools for virtual and live sessions. Conduid read 29 tools from its source: app_launch, app_log, clipboard_read, clipboard_write, dbus_call, desktop_list and 23 more. It is published to PyPI as kwin-mcp and runs with uvx.

The repository has 88 stars and 28 forks, is licensed MIT, and its last commit was on 8 Nov 2026. The latest release is v0.12.0 (15 Oct 2026): kwin-mcp v0.12.0 expands Linux GUI automation through a KDE Plasma 6 Wayland MCP server with exact virtual session and live session control, now providing 37 MCP tools. It follows v0.11.0 (11 Oct 2026), and the 5 most recent releases go back to v0.9.0 (26 Sep 2026). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include browser.

Install

Claude Code
claude mcp add kwin-mcp -- uvx kwin-mcp --screenshot-images
Run
uvx kwin-mcp --screenshot-images
uvx
uvx kwin-mcp
pip
pip install kwin-mcp
From source
git clone https://github.com/isac322/kwin-mcp

Tools (29)

app_launchLaunch a program in the session, split with `shlex` (no shell), in its own process group, with stdin closed. `env` adds environment variables for this process. stdout and stderr go to a log file read with `app_log`. An empty command, unbalanced quotes, or a NUL byte in the command or an env value is an error; an env name that is empty or contains `=` is also invalid. A failed launch keeps the session running; call `session_stop` to roll back. Returns `pid`, `log_path` and `log_uri`.
ParameterTypeDescription
commandany
app_logReturn the tail of the captured stdout/stderr of an app launched with `app_launch` (`session_info` lists the PIDs). `last_n_lines=0` returns the whole log.
ParameterTypeDescription
pidany
clipboard_readReturn the session clipboard text (`wl-paste`) as `{text}`. Virtual sessions need `enable_clipboard=true` and `wl-clipboard`. A missing `wl-paste` or an empty or unreadable clipboard is an error.
clipboard_writeOwn the session clipboard with `text` (any size, including NUL characters) through `wl-copy`, waiting up to 5 s for ownership. Replaces the current selection. Same requirements as `clipboard_read`. The result echoes text of up to 200 characters; longer text is reported as its length.
ParameterTypeDescription
textany
dbus_callCall any method on the session bus, in-process through dbus-python. The method's declared signature is introspected (Qt overloads supported). Each argument is a dbus-send string (`"int32:42"`, `"dict:string:variant:k,string:v"`) or a typed JSON object (`{"type": "int32", "value": 42}`, with `element_type` for containers), and the two forms mix. Malformed values and arguments that fit none of the declared signatures are errors and nothing is sent; a D-Bus error reply is an error too. Returns `{reply, signature}`. Prefer the dedicated tools.
ParameterTypeDescription
interfaceany
methodany
pathany
serviceany
desktop_listList KWin virtual desktops in pager order (`id`, `name`) with the current one marked.
element_actInvoke a named AT-SPI action (case-insensitive, e.g. `Press`, `Toggle`, `Activate`) on exactly one element without pointer coordinates: `element={ref}` from `element_query`, or `element={strict: Locator}` for a strict search with the same `match` modes (depth 64, fails closed on any unreadable node, exactly one element exposing a requested action). `action` is an action name or a `"|"`-separated fallback list such as `"Press|click"` (the engine also accepts `["Press", "click"]`): choose the first action the element exposes, counting each element once. The result's `action` is the action actually dispatched. Zero or several candidates is an error that lists the actions the matches expose. When the application does not confirm a dispatched action, the result says it was sent but not confirmed (`dispatch: "sent_unconfirmed"`): the action may have run, so check the UI before retrying. Fallback selection is not a retry; actions are never retried automatically.
ParameterTypeDescription
actionany
elementany
element_queryReturn the AT-SPI2 elements matching `locator`, in pre-order, with role, name, description, states, rectangle (or the reason it is unavailable), actions, text content (capped at 200 characters), slider/scrollbar value, `app`, `window_id`, `child_count` and a `ref` to use as a target. `locator.match` selects `"substring"` (default, name/role/description), `"exact"` (normalized name equality), or `"spoken"` (spoken-label matching); see `Locator` below. An empty locator lists everything to `max_depth` (`0` or less = application nodes only, `1` = top-level windows). With `wait={until, timeout_ms, poll_interval_ms}` it polls until matching elements are `present` (default) or `absent`; a timeout is not an error but returns `satisfied: false` with the last observed matches and a `NOT SATISFIED: Timeout after N ms` line. Unreadable nodes are skipped.
keyboard_holdPress or release one key or chord across calls (modifiers first on press, reverse order on release), e.g. hold `ctrl` while clicking several items. `press` of an already held key sends no event; `release` is always sent. Held keys stay held until released, `session_stop` or server exit, and every result reports them. On a live desktop, release held input before ending your turn.
ParameterTypeDescription
keysany
phaseany
keyboard_pressPress and release one key or chord at the keyboard focus, e.g. `Return`, `ctrl+c`, `alt+F4`, `shift+ctrl+z`. Unknown key names are an error.
ParameterTypeDescription
keysany
keyboard_typeInsert text at the keyboard focus. `method="keys"` sends per-key US-QWERTY events (letters, digits, ASCII punctuation, space, tab, newline) and rejects any other character before typing anything, with an error that says to retry with `method="unicode"`. `method="unicode"` types any text through `wtype`, or, when `wtype` is unavailable or unsupported, a private clipboard paste whose chord follows the focused window (Ctrl+Shift+V in terminals that paste on it, Ctrl+V elsewhere) and that restores the previous clipboard in every format afterwards; the result's `route` says which was used. Text echoes are capped at 200 characters.
ParameterTypeDescription
textany
pointer_clickMove the pointer to `target` and click `count` times (1 single, 2 double, 3 triple) with `left`, `right` or `middle`. `modifiers` (e.g. `"ctrl+shift"`) are held during the click only; an unknown key name is an error raised before any input. `hold_ms` long-presses the last click (minimum press 25 ms).
ParameterTypeDescription
targetany
pointer_dragPress a button at `from`, move with smooth interpolation through optional `waypoints` (`{x, y, dwell_ms}`, pausing `dwell_ms` at each), and release at `to` after pausing `dwell_ms` (for drop targets that need hover). The button and modifiers are always released, even on error.
ParameterTypeDescription
fromany
toany
pointer_holdPress, move or release one mouse button across calls, for custom drags: `press` (no event if already held), `move` (the button must be held), `release` (always sent). Every phase moves to `target` first. A held button stays held until released, `session_stop` or server exit, and every result reports it.
ParameterTypeDescription
phaseany
targetany
pointer_moveMove the pointer onto `target` and leave it there (hover, tooltips). Refused while a mouse button is held; use `pointer_hold(phase="move")` to move a held button.
ParameterTypeDescription
targetany
pointer_scrollMove to `target` and scroll. `delta` positive = down/right, negative = up/left. `unit="smooth_step"` scrolls 15 px per unit smoothly; `unit="detent"` sends wheel clicks. `steps` splits `delta` into increments 10 ms apart.
ParameterTypeDescription
deltaany
targetany
screen_captureCapture the whole workspace, or a `region` rectangle of it, as a PNG via KWin ScreenShot2 (Spectacle fallback). Returns a `Frame`: the file path, the `kwin://screenshots/{name}` URI, the image size, `size_kb`, the image-to-logical `mapping` and `coverage`, plus the `Coordinate space` text line. `max_edge` downscales (default from `--screenshot-max-edge`, `0` = full resolution); `include_cursor` draws the pointer. See Screenshot Capture.
session_connectAttach to an already running KWin session: the real desktop or a KWin inside a container. Empty values default to `$DBUS_SESSION_BUS_ADDRESS` and `$WAYLAND_DISPLAY` (a socket name is resolved under `$XDG_RUNTIME_DIR`). Clipboard is always enabled. Actions affect real applications, and `window_close` asks the user first (see Live Window Close Consent). `enable_accessibility=true` turns on the desktop's `org.a11y.Status.IsEnabled` switch until `session_stop` (see Accessibility Tree). `retention.home` is an error here; live sessions use the host HOME.
session_infoReport the current session (or `null`): its kind, Wayland socket, bus address, screen size, enabled backends (input, clipboard, accessibility), retention and artifacts directory, every app launched through kwin-mcp, and the held input. Works without a session.
session_startStart an isolated virtual KWin Wayland session (one at a time) with its own `dbus-run-session` bus, `kwin_wayland --virtual` compositor, AT-SPI2 bus and EIS input. `screen_width`/`screen_height` size each output in logical pixels and must be positive integers. `output_count` creates that many outputs (positive integer, default `1`, no application upper bound); KWin controls the initial layout. With multiple outputs, `session.screen` reports the KWin workspace union, or `null` if unavailable (a failed query adds a warning). The single-output default still reports the requested size. Large counts consume more compositor resources; this option does not set per-output positions or scales. `enable_clipboard=true` serves the clipboard tools (off by default because `wl-copy` can hang on a freshly created bus). `home="isolated"` gives launched apps a temporary HOME with isolated XDG directories (not a security sandbox; see Isolation scope). `retention={artifacts, home}` decides now what survives the session end: the artifacts directory (screenshots, frames, app logs) and the isolated HOME; `home=true` requires `home="isolated"`. Startup is deadline-bounded and atomic: a failed step stops the partly started session and reports the captured session stderr. Then launch apps with `app_launch`.
session_stopEnd the current session. Virtual: terminate the whole session process group (`SIGTERM`, then `SIGKILL` for members that remain), KWin, launched apps and the bus. Live: detach, kill only apps launched through kwin-mcp, restore the accessibility switch. Releases all held input and reports it. Idempotent: with no session it returns `stopped: false` and `No session running.`
touch_pinchTwo contacts move symmetrically around `center`: `end_distance < start_distance` pinches in, `end_distance > start_distance` zooms out.
ParameterTypeDescription
centerany
end_distanceany
start_distanceany
touch_swipeSwipe with `fingers` parallel contacts from one target to another over `duration_ms` (10 ms per step). Contacts are spread vertically 20 px apart around the path. KWin consumes swipes with 3 or more fingers as global gestures (see Limitations).
ParameterTypeDescription
fromany
toany
touch_tapTap `target` with one touch contact (does not move the pointer). `hold_ms` is the contact duration (minimum 10 ms; above 500 ms is a long-press).
ParameterTypeDescription
targetany
wayland_listList the Wayland protocol globals the compositor advertises (`wayland-info`): the raw lines containing `filter` (case-sensitive) and the parsed `globals` (`interface`, `version`, `name`). Useful for verifying protocol access such as `org_kde_plasma_window_management`.
window_closeAsk exactly one window to close, like its titlebar button; the app may refuse or keep it open behind a "save changes?" prompt, so confirm with `window_list`. On a live session the user must confirm first. An unconfirmed close, a window that cannot be closed, and an `{id}` that matches no window are non-error refusals reported in `refusal`.
ParameterTypeDescription
windowany
window_focusRaise and activate exactly one window through KWin scripting (`workspace.activeWindow`). The result reports the window's observed state afterwards, or that it vanished.
ParameterTypeDescription
windowany
window_listList KWin windows, dialogs, popups and shell surfaces included, with `id`, `app_id`, `caption`, `kind`, `active`, `frame` and `client` rectangles, `moveable`/`resizeable`/`closeable`, and `desktops`. `filter` is the same `WindowSelector` the mutators use, applied as an AND-ed filter: `{active: true}` gives the active window, `{kind: ["normal"]}` the normal windows. An empty list is a normal result.
window_placeSet the outer `frame` (any subset of `x`, `y`, `width`, `height`; omitted fields keep their value; signed 32-bit coordinates; width/height positive and at most the workspace size) and/or the virtual `desktop` (an id from `desktop_list`) of exactly one window, then read it back. KWin applies changes asynchronously, so fields it has not applied yet are listed as pending, and a window that vanished before the readback is reported as such, both as normal results. A desktop move that would also move related transient windows is refused with `nothing was changed`.
ParameterTypeDescription
windowany

Security checks

Static checks derived from the repository 10 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository's README runs to about 11K words.
  • ✓License declaredThe repository declares the MIT license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedDependency versions are pinned by uv.lock.
  • ✓No dynamic code executionScanned 19 source files and found no eval, dynamic Function or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.12.0v0.12.0 · 15 Oct 2026kwin-mcp v0.12.0 expands Linux GUI automation through a KDE Plasma 6 Wayland MCP server with exact virtual session and live session control, now providing 37 MCP tools. Highlights Exact virtual desktop routing: `virtual_desktops` lists…
v0.11.0v0.11.0 · 11 Oct 2026kwin-mcp v0.11.0 lets AI agents resize and move exact windows and trigger native AT-SPI actions on KDE Plasma 6 Wayland, and makes MCP clients aware of failed calls. When a tool cannot do what was asked, it now returns an MCP tool error…
v0.10.0v0.10.0 · 27 Sep 2026kwin-mcp v0.10.0 moves the MCP server for KDE Plasma 6 Wayland GUI automation onto the MCP Python SDK 2.x, so it now speaks the stateless 2026-07-28 MCP revision natively while every existing client keeps working unchanged. All 33 MCP…
v0.9.1v0.9.1 · 27 Sep 2026kwin-mcp v0.9.1 makes EIS input reliable for the whole session: `session_start` no longer loses its input backend at startup, and keyboard, pointer, and touch input keep working after KWin changes keyboard layouts or outputs. What's…
v0.9.0v0.9.0 · 26 Sep 2026kwin-mcp v0.9.0 lets AI agents target individual windows on KDE Plasma 6 Wayland, click accessibility elements and screenshot pixels without coordinate math, and run Linux desktop GUI automation reliably on Debian, Fedora, openSUSE…

README

The repository's README runs to about 11K words, fetched a month ago. The original in the repository is authoritative.

Read full README
Questions

About Kwin MCP

How do I install Kwin MCP?

In Claude Code, run claude mcp add kwin-mcp -- uvx kwin-mcp --screenshot-images. Other MCP clients take the command after "--" in their server configuration.

Is Kwin MCP safe to use with an AI agent?

Its trust score is 64 out of 100 (good). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Kwin MCP still maintained?

Yes — the latest release is v0.12.0 (15 Oct 2026), and the last commit was 23 days ago. The repository has 88 stars and 27 open issues.

What tools does Kwin MCP provide?

Conduid read 29 tools from the source: app_launch, app_log, clipboard_read, clipboard_write, dbus_call, desktop_list, element_act, element_query and 21 more. 19 of them publish their parameters, listed under Tools above.

What license is Kwin MCP released under?

The repository declares the MIT license. That applies to the latest release, v0.12.0, as well.