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".
GNOME (beta): the same server also runs on GNOME. It detects the desktop at startup
and offers the tools that desktop supports. See GNOME.
Questions, ideas or something to show? Join the
Discussions. Bugs go in
Issues.
Contents
- Requirements
- Install
- Tools
- GNOME
- Permissions
- Undo and snapshots
- How it works
- Limitations
- Development
Requirements
- KDE Plasma 6 (tested on Plasma 6.8, Wayland, CachyOS)
- Python 3.12+ and uv
kreadconfig6 / kwriteconfig6 and the plasma-apply-* tools, which ship with Plasma
- Optional: KDE Customizer (
kdec on your
PATH), required only for the theme tools
Install
From a release
Install the MCP server as a user tool:
uv tool install plasma-mcp
The executable will be available as plasma-mcp.
Register it with Claude Code:
claude mcp add --scope user plasma -- plasma-mcp
For another MCP client, configure it to run plasma-mcp over stdio.
From source
git clone https://github.com/RJCogburn/plasma-mcp.git
cd plasma-mcp
uv sync
Register it with Claude Code for all your projects:
claude mcp add --scope user plasma -- uv --directory /path/to/plasma-mcp run plasma-mcp
Start 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.
Theme tools (optional)
Either install method needs KDE Customizer for the theme tools:
uv tool install git+https://github.com/RJCogburn/kde-customizer
Upgrading
uv tool upgrade plasma-mcp
Tools
The tier column refers to the permission tiers described below.
Settings
| Tool |
Tier |
What it does |
get_setting |
read |
Read a KConfig value, e.g. kwinrc / Windows / FocusPolicy. Nested groups use /. |
set_setting |
write |
Write a KConfig value. Dry run by default. |
undo_last |
write |
Restore the most recent snapshot (settings or theme). |
Windows
| Tool |
Tier |
What it does |
list_windows |
read |
Each window's id, app, title, desktops, geometry and active/minimized state, plus the virtual desktops. |
focus_window |
write |
Activate a window. It un-minimizes it and switches to its desktop. |
move_to_desktop |
write |
Move a window to a virtual desktop, by name or 1-based number. |
tile_window |
write |
Tile it to the left / right / top / bottom half, maximize or unmaximize. |
Theming (needs KDE Customizer)
| Tool |
Tier |
What it does |
current_theme |
read |
The global theme, color scheme, Plasma style, icons and cursor in use. |
theme_guide |
read |
The theme spec format. Agents read this before writing a theme. |
check_theme |
read |
Validate a .toml theme spec (contrast, missing installed themes). |
apply_theme |
write |
Build and apply a spec. Dry run by default. It shows the exact install script. layout=true also replaces panels and needs the dangerous tier. |
Notifications
| Tool |
Tier |
What it does |
notify |
write |
Show a notification (low / normal / critical). Returns its id. |
close_notification |
write |
Close a notification by id. |
notification_status |
read |
Server info and whether Do Not Disturb is on. |
watch_notifications |
private |
Collect notifications from any app for up to 120 s. |
Media
| Tool |
Tier |
What it does |
media_status |
read |
MPRIS players with playback status and the current track. |
media_play_pause |
write |
Toggle play/pause on a player. |
Power
| Tool |
Tier |
What it does |
power_status |
read |
AC or battery, the lid, laptop batteries, wireless peripherals (mouse, keyboard, headset) and the power profile. |
set_power_profile |
write |
Switch between power-saver, balanced and performance. Dry run by default. The response names the previous profile (it isn't a config file, so undo_last doesn't cover it). |
Global shortcuts
| Tool |
Tier |
What it does |
list_shortcuts |
read |
Every global shortcut with current and default keys. Search by text, by key (key="Meta+E" answers "what uses Meta+E?") or by component. |
set_shortcut |
write |
Set or remove (keys=[]) an action's keys. Refuses keys another action already uses. Dry run by default. |
invoke_shortcut |
dangerous |
Trigger an action directly, without simulating a key press. Dry run by default. |
Keys use the names System Settings shows, such as Meta+Ctrl+A, Meta+Shift+Left or
Volume Up. Super and Win are accepted for Meta. invoke_shortcut is in the
dangerous tier because some actions log out, shut down or close windows without asking.
Clipboard
| Tool |
Tier |
What it does |
get_clipboard |
private |
The current clipboard text. |
clipboard_history |
private |
Recent clipboard entries, newest first. |
set_clipboard |
write |
Put text on the clipboard. Dry run by default. The previous contents stay in clipboard history. |
Clipboards often hold passwords and private messages, so reading needs the private tier.
Password managers mark secrets so Klipper never records them; plasma-mcp never sees those.
Panels and widgets
| Tool |
Tier |
What it does |
list_panels |
read |
Panels (screen, location, height, alignment, hiding, length mode, floating) with their widgets in on-screen order, plus the desktops and their widgets. |
list_widget_types |
read |
Installed widget plugins, e.g. org.kde.plasma.digitalclock. search filters. |
get_widget_config |
read |
A widget's options in one config group (e.g. Appearance). |
add_widget |
dangerous |
Add a widget to a panel (at the end or before another widget) or to a desktop. Dry run by default. |
remove_widget |
dangerous |
Remove a widget. Dry run by default. |
set_panel |
dangerous |
Change a panel's location, height, alignment, hiding, length mode or floating. Dry run by default. |
add_panel |
dangerous |
Create a panel on a screen with a list of widgets. Dry run by default. |
remove_panel |
dangerous |
Remove a panel and its widgets. Dry run by default. |
set_widget_config |
dangerous |
Set one widget option, e.g. a clock's showSeconds. Dry run by default. |
Panel changes are in the dangerous tier because undoing them restarts plasmashell (your
panels disappear for a second or two). They are still snapshotted and undoable.
Events
| Tool |
Tier |
What it does |
subscribe_events |
read (notifications: private) |
Start buffering events of the given kinds in the background. Returns a cursor. |
poll_events |
read |
Events after cursor, oldest first, plus the next cursor. wait_seconds (up to 120) waits for the first event. |
unsubscribe_events |
read |
Stop listening (all kinds when none are given). |
| Kind |
Events |
windows |
window_opened, window_closed, window_focused (with the window's id, app, title, geometry) |
desktops |
desktop_switched, desktop_added, desktop_removed, desktop_renamed |
media |
playback (Playing / Paused / Stopped), track, player_opened, player_closed |
config |
config_changed: which KConfig file, groups and keys changed (names only, no values) |
screen |
screen_locked, screen_unlocked |
notifications |
notification from any app (app, summary, body, urgency). Needs the private tier. |
clipboard |
clipboard_changed with the new text (first 2000 characters). Needs the private tier. |
power |
on_battery, on_ac, battery_level (every 5%), battery_state, battery_warning, device_added, device_removed, profile_changed, lid_closed, lid_opened, suspending, resumed, shutting_down |
An agent subscribes once and then polls in a loop, for example: "subscribe to windows and
media, then tell me when a new window opens". Events are kept until they're read, so
nothing is lost between calls. The buffer holds the last 1000, and poll_events reports
missed if older ones were dropped.
GNOME
On GNOME (detected from XDG_CURRENT_DESKTOP), plasma-mcp offers 26 tools. Media,
notifications (Do Not Disturb = GNOME's notification banners off), power, events and
undo_last work as on KDE. These tools have GNOME versions: