D-Bus MCP server — bridge Linux IPC into the Model Context Protocol
Project description
mcdbus
D-Bus MCP server — bridge Linux IPC into the Model Context Protocol.
Gives Claude (or any MCP client) native tool access to session and system D-Bus services through introspection-first discovery. No hardcoded service knowledge — the server discovers what's available on your bus at runtime.
Install
pip install mcdbus
# or
uvx mcdbus
Requires Python 3.11+ and a running D-Bus daemon (standard on any Linux desktop).
Add to Claude Code
claude mcp add mcdbus -- uvx mcdbus
With the notification confirmation fallback enabled:
claude mcp add -e MCDBUS_NOTIFY_CONFIRM=1 mcdbus -- uvx mcdbus
How it works
The server exposes D-Bus through a discovery workflow:
list_services → list_objects → introspect → call_method / get_property
Two buses are available:
- session — user desktop services (notifications, media players, KDE, portals)
- system — system services (systemd, NetworkManager, UDisks2, UPower, bluez)
Tools
Discovery
| Tool | Description |
|---|---|
list_services |
List well-known service names on a bus |
introspect |
Show interfaces, methods, properties, and signals for a D-Bus object |
list_objects |
Walk the object tree for a service (bounded BFS) |
Interaction
| Tool | Description |
|---|---|
call_method |
Call any D-Bus method and return the result |
get_property |
Read a single property value |
set_property |
Set a property value (requires confirmation) |
get_all_properties |
Read all properties on an interface |
Shortcuts
Pre-wired tools for common operations — no introspection needed:
| Tool | Description |
|---|---|
send_notification |
Send a desktop notification |
list_systemd_units |
List systemd units, with optional glob filter |
media_player_control |
Control MPRIS2 media players (play, pause, next, stop) |
network_status |
NetworkManager connection status |
battery_status |
Battery percentage and charging state via UPower |
bluetooth_devices |
Paired and discovered devices via bluez |
kwin_windows |
Open windows from KDE KWin |
Resources
| URI | Description |
|---|---|
dbus://{bus}/services |
Live list of service names |
dbus://{bus}/{service}/objects |
Object tree (max 200 nodes) |
dbus://{bus}/{service}/{path}/interfaces |
Interfaces at an object path |
Prompts
| Prompt | Description |
|---|---|
explore_service |
Guided walkthrough of a D-Bus service |
debug_service |
Diagnose issues with a service |
Confirmation model
Sensitive operations require explicit user approval before executing:
- System bus method calls — confirmed before execution
- Property mutations (
set_property) — confirmed on any bus
The server tries three confirmation methods in order:
- MCP elicitation — native protocol support (if the client implements it)
- Desktop notification — Approve/Deny buttons via
org.freedesktop.Notifications(opt-in, see below) - Proceed with warning — logs to stderr and allows the operation
Desktop notification fallback
When the MCP client doesn't support elicitation (most don't yet, including Claude Code), the server can fall back to desktop notifications with action buttons. The notification stays up for 60 seconds. No response is treated as a denial.
Enable with:
MCDBUS_NOTIFY_CONFIRM=1
Environment variables
| Variable | Default | Description |
|---|---|---|
MCDBUS_NOTIFY_CONFIRM |
unset | Enable desktop notification fallback for confirmation |
MCDBUS_REQUIRE_ELICITATION |
unset | Hard-fail if client doesn't support MCP elicitation (overrides notification fallback) |
MCDBUS_TIMEOUT |
30 |
D-Bus call timeout in seconds |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcdbus-2026.3.6.3.tar.gz.
File metadata
- Download URL: mcdbus-2026.3.6.3.tar.gz
- Upload date:
- Size: 98.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1158709d6110892b34d29a8fb00f14aa55738ff64f41eca5e9ea58af4bc1a2d3
|
|
| MD5 |
013d0edbe6658578c28606a6579cc4d7
|
|
| BLAKE2b-256 |
01028e91315c9409c04d2fc6985f345a1f0a51e8615666aac89d8d8f743ca189
|
File details
Details for the file mcdbus-2026.3.6.3-py3-none-any.whl.
File metadata
- Download URL: mcdbus-2026.3.6.3-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cab7ac96b4b1bfac25b441de7efe43a4c3b393971c9fe65053999624e5395d93
|
|
| MD5 |
bc051913c32949966e744f218f4009a5
|
|
| BLAKE2b-256 |
480ffec2882836b651189d400907089d9c9dcdc01bce0cb2292334eb8afe16de
|