Skip to main content

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:

  1. MCP elicitation — native protocol support (if the client implements it)
  2. Desktop notification — Approve/Deny buttons via org.freedesktop.Notifications (opt-in, see below)
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcdbus-2026.3.6.1.tar.gz (100.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcdbus-2026.3.6.1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file mcdbus-2026.3.6.1.tar.gz.

File metadata

  • Download URL: mcdbus-2026.3.6.1.tar.gz
  • Upload date:
  • Size: 100.0 kB
  • 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

Hashes for mcdbus-2026.3.6.1.tar.gz
Algorithm Hash digest
SHA256 9fadbaa7956b4158b5559b0369c658e45f11bb30929360da0587672728c078ef
MD5 c8ea8722ce2ef4a710d6163fa9e12e01
BLAKE2b-256 0cdd6e1743fc2eecc2b57be5485fbcf224ee75b828e811398a4a66a877f2b3a9

See more details on using hashes here.

File details

Details for the file mcdbus-2026.3.6.1-py3-none-any.whl.

File metadata

  • Download URL: mcdbus-2026.3.6.1-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

Hashes for mcdbus-2026.3.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 529d434fe29d43de78209a5a4395d31484ea8c3dc3fdaac0b0b380e520e67a44
MD5 3ed109071a1aa5039146ae630edbcc76
BLAKE2b-256 b00489194cc3baef82b6b8d72a7bc2c117b083d57fde0e0d8edf5c1d283eba19

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page