plasma-mcp
Lets AI agents inspect and control a KDE Plasma 6 desktop through KDE-native interfaces: read/write KConfig settings, list/focus/move/tile windows, manage virtual desktops, apply and undo desktop themes, send and watch notifications, and control MPRIS media players.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
plasma-mcp
An MCP server that lets AI agents (Claude Code, Codex, Cursor and other MCP clients) see and control a KDE Plasma 6 desktop. It works through KDE's own interfaces (D-Bus, KWin scripting and KConfig) instead of screenshots and simulated clicks.
Every write can be previewed and undone. Ask your agent to "tile my editor next to the browser", "switch to a dark theme" or "tell me when the build notification arrives".
Contents
Related MCP server: astra-linux-agent
Requirements
KDE Plasma 6 (tested on Plasma 6.8, Wayland, CachyOS)
Python 3.12+ and uv
kreadconfig6/kwriteconfig6and theplasma-apply-*tools, which ship with PlasmaOptional: KDE Customizer (
kdecon yourPATH), required only for the theme tools
Install
git clone https://github.com/RJCogburn/plasma-mcp.git
cd plasma-mcp
uv syncRegister it with Claude Code for all your projects:
claude mcp add --scope user plasma -- uv --directory /path/to/plasma-mcp run plasma-mcpStart a new Claude Code session; the tools appear as mcp__plasma__*.
For other MCP clients, run the stdio command uv --directory /path/to/plasma-mcp run plasma-mcp.
For the theme tools, also install KDE Customizer:
uv tool install --editable /path/to/kde-customizerTools
The tier column refers to the permission tiers described below.
Settings
Tool | Tier | What it does |
| read | Read a KConfig value, e.g. |
| write | Write a KConfig value. Dry run by default. |
| write | Restore the most recent snapshot (settings or theme). |
Windows
Tool | Tier | What it does |
| read | Each window's id, app, title, desktops, geometry and active/minimized state, plus the virtual desktops. |
| write | Activate a window. It un-minimizes it and switches to its desktop. |
| write | Move a window to a virtual desktop, by name or 1-based number. |
| write | Tile it to the |
Theming (needs KDE Customizer)
Tool | Tier | What it does |
| read | The global theme, color scheme, Plasma style, icons and cursor in use. |
| read | The theme spec format. Agents read this before writing a theme. |
| read | Validate a |
| write | Build and apply a spec. Dry run by default. It shows the exact install script. |
Notifications
Tool | Tier | What it does |
| write | Show a notification ( |
| write | Close a notification by id. |
| read | Server info and whether Do Not Disturb is on. |
| private | Collect notifications from any app for up to 120 s. |
Media
Tool | Tier | What it does |
| read | MPRIS players with playback status and the current track. |
| write | Toggle play/pause on a player. |
Permissions
Tools are grouped into tiers. You choose which tiers are enabled in
~/.config/plasma-mcp.toml:
[tiers]
read = true # default: on
write = true # default: on (every write is previewable and undoable)
dangerous = false # default: off (e.g. replacing your panel layout)
private = false # default: off (reading other apps' notifications, e.g. chat messages)When a tool's tier is off, the call fails with an error that names the tier and this file.
Undo and snapshots
Every real write first copies the config files it can touch to
~/.local/state/plasma-mcp/snapshots/. undo_last restores the newest snapshot and
deletes it, so repeated calls step further back.
Restoring files alone doesn't change a desktop that's already running, so theme snapshots also record what was active: global theme, color scheme, Plasma style, cursor and icons. On undo, plasma-mcp re-applies those first, then copies the files back. A theme change and its undo leave your config byte-for-byte as it was. This was verified on a live desktop.
Two KDE details matter here:
A global theme's values live in
~/.config/kdedefaults/, not in the files you would expect. Snapshots include that folder.Undoing
apply_theme(layout=true)also restarts plasmashell to bring back your panels.
How it works
Settings:
kreadconfig6/kwriteconfig6.Windows: a KWin script can't return a value to whoever loaded it. So for each call, plasma-mcp exports a small D-Bus object, loads a one-shot script that calls back to it with JSON (
callDBus), then unloads the script. Seeplasma_mcp/kwin.py; new KWin features can reusekwin.run(js).Theming: shells out to KDE Customizer's
kdec(check,apply,ai-guide) rather than importing it, so the theme format and its install script stay in one place.Notifications:
org.freedesktop.Notifications. Watching uses a D-Bus monitor connection (BecomeMonitor) that only matchesNotifycalls.Media: MPRIS over the session bus.
Limitations
Plasma 6 only. The KWin scripting API changed between Plasma versions; no GNOME backend yet.
No synthetic keyboard or mouse input. On Wayland that needs ydotool, libei or the RemoteDesktop portal, and it is out of scope for now.
No screenshots yet. When they come, they will go through xdg-desktop-portal so you approve each one.
Window geometry updates asynchronously. After
tile_window, calllist_windowsagain about half a second later to see the new size.Fixed-size dialogs ignore tile and maximize.
Do Not Disturb. While it is on, only
criticalnotifications pop up. plasma-mcp never changes your Do Not Disturb setting.
Development
uv sync --extra dev
uv run pytestProject notes and conventions for coding agents:
CLAUDE.md.Every new tool must call
policy.require(<tier>), and every config write must go throughsnapshots.takebefore changing anything.Test write tools on throwaway windows (a Tk or
kdialogwindow you open yourself), never on the user's own windows.
License
MIT, see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to automate Linux desktop GUI by launching and interacting with Wayland applications in isolated virtual KWin sessions, or connecting to live desktops for collaborative automation.162 PyPI87MIT
- AlicenseNot gradedqualityCmaintenanceEnables an AI agent to see and control a Linux desktop via Wayland/Hyprland, providing screenshots, structured desktop state, pointer/keyboard input, semantic window/workspace tools, and a policy engine for safe execution.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to automate and observe Linux desktop GUIs on KDE Plasma 6 Wayland through isolated virtual sessions or live desktop connections, providing 30 tools for input, clipboard, accessibility tree inspection, screenshots, and window management.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control Linux desktops and compositors, including Hyprland/Wayland window management, PipeWire audio routing, systemd diagnostics and self-healing, notifications, screenshots, and optional agent memory.MIT