Introducing kde-workspace-mcp: control your Plasma desktop from any AI assistant

AI assistants are good at answering questions, but most of them live in a bubble: they can tell you how to rename a virtual desktop or switch to a dark color scheme, they just can’t do it. kde-workspace-mcp is a first step towards closing that gap for KDE Plasma users.

What is it?

kde-workspace-mcp is an MCP server for the KDE Plasma workspace.

MCP, the Model Context Protocol, is an open standard that lets an AI client discover and call « tools » exposed by a server. The client (a chat application, an IDE, an agent…) asks the server which tools it offers, and the language model can then decide to call them when it needs to read some information or perform an action.

kde-workspace-mcp exposes your desktop as a set of such tools. With it, an assistant can:

  • read information about your workspace: how many virtual desktops you have and which one is current, your activities, the installed color schemes and themes, whether the screen saver is active, what is in your clipboard…
  • configure your workspace: create, rename or remove virtual desktops, switch activity, apply a color scheme, a Plasma theme or a cursor theme, lock the screen, show the desktop, fill or clear the clipboard…

Instead of following a list of instructions in System Settings, you can just say « I need two more virtual desktops, call them Mail and Code » and let the assistant do it.

Built on D-Bus

There is no magic and no screen scraping here. Plasma already exposes most of its functionality through D-Bus, the inter-process communication system used by the Linux desktop. kde-workspace-mcp simply translates MCP tool calls into calls to these existing services:

  • KWin for virtual desktops and « show desktop »,
  • the activity manager (kactivitymanagerd) for activities,
  • the screen locker for the screen saver and screen locking,
  • Klipper for the clipboard,
  • the standard plasma-apply-colorscheme, plasma-apply-desktoptheme and plasma-apply-cursortheme commands for appearance.

This has a nice consequence: the server does nothing your desktop doesn’t already allow. It uses the same public interfaces as Plasma’s own components, so changes show up immediately, exactly as if you had made them yourself.

What it can do today

The current version ships around thirty tools, grouped by category:

CategoryExamples of tools
Virtual desktopscount, create, rename, remove, switch
Activitieslist, create, rename, set description, switch, next/previous, remove
Screen saverget state, activate, lock the screen
Window managershow the desktop / restore windows
Appearancelist and apply color schemes, Plasma themes and cursor themes
Clipboardread, replace, read the history, clear the history

You can print the full list at any time with:

kdeworkspacemcp --list-tools
Output of kdeworkspacemcp --list-tools, showing the tools grouped by category
The tools listed by kdeworkspacemcp --list-tools

You stay in control

Giving an AI the ability to change your desktop raises an obvious question: what if it does something you didn’t want?

kde-workspace-mcp separates tools in two groups:

  • Read-only tools (listing desktops, reading the clipboard, listing themes…) run directly.
  • Tools that modify the workspace ask for your approval first. A notification pops up showing the name of the tool and its arguments, and you accept or reject the call. If you reject or dismiss it, or don’t answer within 60 seconds, the call is refused. Only one confirmation is shown at a time, so you are never flooded with requests.

You will see this notification in action in the KAIChat example below.

If you trust your setup and find the confirmations annoying, you can turn them off (AskModify=false in the [General] group of kdeworkspacemcprc), but they are on by default.

The server also listens on a local URL (for example http://127.0.0.1:8080/mcp), so it is meant to be used from your own session.

Setting it up

The server integrates with Plasma like any other KDE component:

  1. Open System Settings and go to the KDE Workspace MCP Server module.
  2. Enable the server and choose its URL.
  3. That’s it: the server starts at login, and saving new settings reloads it.

Only one instance runs per session. You can also start it by hand on a given URL, which is handy for testing:

kdeworkspacemcp --url http://127.0.0.1:8080/mcp

Use it from KAIChat… or any MCP client

kde-workspace-mcp speaks standard MCP over the Streamable HTTP transport (provided by the KTextAddons MCP protocol library). It is not tied to a specific application.

KAIChat, KDE’s AI chat application, can connect to MCP servers: add the kde-workspace-mcp URL to its MCP server list, and your conversations can now act on your desktop. Ask « Which activities do I have? », « Switch to the Breeze Dark color scheme » or « Put this text in my clipboard », and the model will pick the right tool.

The kde-workspace-mcp tools in the KAIChat tool menu, grouped by category
The kde-workspace-mcp tools in KAIChat: each one can be enabled or disabled

But because MCP is an open protocol, any other MCP client that supports the Streamable HTTP transport can use it too: other desktop assistants, coding agents, or your own scripts. You choose the client and the model you like; the desktop integration is the same.

A real example in KAIChat

Let’s ask KAIChat: « I need two more virtual desktops, call them Mail and Code ». The model understands that it has to call virtual_desktop_create twice. Before running a tool, KAIChat itself asks for permission, showing the server, the tool and its arguments (you can also allow the server permanently):

KAIChat asking whether to run the virtual_desktop_create tool with the name Mail
KAIChat asks before running virtual_desktop_create

Then kde-workspace-mcp asks too, with its own notification on the desktop. This second confirmation comes from the server, so it is there whatever MCP client you use:

Notification from kde-workspace-mcp asking to confirm Create Virtual Desktop with the name Mail
The confirmation notification from kde-workspace-mcp

Once the calls are accepted, the desktops are created and the assistant confirms it:

KAIChat answering that the Mail and Code virtual desktops were added
The two virtual desktops are created

And if we ask for the list of virtual desktops, the assistant calls the read-only virtual_desktop_get_count tool, with no confirmation needed, and the new desktops are there:

KAIChat listing the virtual desktops: Bureau 1, Bureau 2, Mail and Code
The new list of virtual desktops

Test it with KMcpClientInspector

Want to see what the server exposes before plugging an AI into it? KMcpClientInspector is a KDE application to inspect and debug MCP servers. You can read more about it in the KMcpClientInspector 0.3 release announcement.

Point it at the server URL and you can:

  • browse the list of tools with their descriptions and parameters,
  • call a tool manually with your own arguments,
  • look at the raw responses.

It is the best way to understand what the assistant will « see », and to check that everything works on your system — try virtual_desktop_get_count or plasma_color_scheme_list and watch the answer come back. Call a modifying tool, and you will see the confirmation notification appear.

Why it matters

A few reasons why this is more than a gadget:

  • Natural language as a new interface. Some tasks are faster to say than to click: « create an activity for my conference talk and switch to it », « how many desktops do I have and what are they called? ».
  • Accessibility. For people who find it hard to navigate many settings pages, a conversational way to configure the desktop can be a real help.
  • Context for the assistant. An assistant that can see your clipboard history or your current activity can give more relevant answers, without you copying and pasting things around.
  • Open and local. It relies on open standards (MCP, D-Bus), runs in your session, works with the client and the model of your choice, and asks before changing anything.
  • Plasma becomes AI-ready without being AI-dependent. Nothing changes for users who don’t want it; the server is opt-in and the desktop works exactly as before.

Just the first step

This is a first version, focused on a solid base: the D-Bus integration, the MCP server, the confirmation mechanism and the System Settings module. There is a lot more that could be done in the future, for example:

  • covering more of Plasma: windows, notifications, audio, power management, display settings, wallpapers…
  • giving more information about the current state of the desktop,
  • refining permissions, so you can decide which tools are allowed and which always require confirmation.

Feedback, ideas and contributions are very welcome. The project is developed on invent.kde.org/system/workspace-mcp-server, and testing it with KAIChat, KMcpClientInspector or your favorite MCP client is the best way to help shape what comes next.

Add a Comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *