Skip to content

Resources

mcdbus exposes three MCP resource templates that provide read-only snapshots of D-Bus structure. Resources use a dbus:// URI scheme and return plain-text, newline-separated data.

Resources are best for loading context into a conversation. An MCP client can attach a resource URI and the server returns the current state as a text block. Resources are stateless, read-only, and produce compact output suitable for context windows.

Tools are better for interactive exploration where you need formatted output, progress reporting, filtering options, or write operations. The list_services tool, for example, returns a Markdown-formatted list with a count header, while the dbus://{bus}/services resource returns raw service names one per line.

Use resources when you want to seed a conversation with structural context. Use tools when you need to drill into specifics or take action.


Live list of well-known service names on a D-Bus bus.

ParameterTypeDescription
busstring"session" or "system"

Queries org.freedesktop.DBus.ListNames on each access. Unique connection names (those starting with :) are filtered out. The result is sorted alphabetically.

Newline-separated list of well-known service names.

org.freedesktop.DBus
org.freedesktop.Notifications
org.freedesktop.portal.Desktop
org.kde.KWin
org.mpris.MediaPlayer2.firefox
dbus://session/services
dbus://system/services

Object tree for a D-Bus service, produced by a bounded breadth-first walk.

ParameterTypeDescription
busstring"session" or "system"
servicestringWell-known service name
LimitValue
Maximum nodes200
Maximum depth15

These limits are tighter than the list_objects tool (which allows 500 nodes and depth 20) because resources are intended for context loading, not exhaustive enumeration.

Newline-separated, sorted list of object paths.

/
/org/freedesktop/Notifications
dbus://session/org.freedesktop.Notifications/objects
dbus://system/org.freedesktop.systemd1/objects

List of interfaces available at a specific D-Bus object path.

ParameterTypeDescription
busstring"session" or "system"
servicestringWell-known service name
pathstringURL-encoded object path

The path segment must be URL-encoded. Forward slashes become %2F. The server automatically URL-decodes the path and prepends a leading / if one is missing after decoding.

Object pathEncoded path segment
/org/freedesktop/Notifications%2Forg%2Ffreedesktop%2FNotifications
/%2F

Newline-separated list of interface names, including standard D-Bus interfaces.

org.freedesktop.DBus.Peer
org.freedesktop.DBus.Introspectable
org.freedesktop.DBus.Properties
org.freedesktop.Notifications
dbus://session/org.freedesktop.Notifications/%2Forg%2Ffreedesktop%2FNotifications/interfaces