io.github.crunchtools/systemd
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SYSTEMD_UNIT_DIR | No | Directory unit_file_write/remove operate on | /etc/systemd/system |
| DBUS_SYSTEM_BUS_SOCKET | No | D-Bus system bus socket path | /run/dbus/system_bus_socket |
| SYSTEMD_EXTRA_PROTECTED_UNITS | No | Comma-separated units added to the built-in denylist |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
MCP server for systemd unit management via D-Bus. Manages the full lifecycle of any systemd unit — not just Podman-managed containers: listing, status, start/stop/restart/reload, enable/disable/mask, writing and decommissioning unit files, journal queries, failed-unit and pending-job triage, timers, host info, and login sessions. A small denylist of core system units (dbus, sshd, networking, logind) cannot be stopped, disabled, masked, or removed.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| unit_list_toolC | List systemd units. |
| unit_status_toolB | Get curated status for a unit: active/sub/load state, PID, memory, CPU. |
| unit_show_toolB | Dump the full property set for a unit (dependencies, exec settings, cgroup, etc). |
| unit_start_toolC | Start a unit. |
| unit_stop_toolB | Stop a unit. Refused for units on the protected list. |
| unit_restart_toolB | Restart a unit. Refused for units on the protected list. |
| unit_reload_toolA | Ask a unit to reload its configuration without restarting. |
| unit_enable_toolC | Enable a unit to start on boot. |
| unit_disable_toolB | Disable a unit from starting on boot. Refused for units on the protected list. |
| unit_mask_toolA | Mask a unit so it cannot be started even manually. Refused for protected units. |
| unit_unmask_toolA | Unmask a previously masked unit. |
| daemon_reload_toolA | Reload systemd's unit file cache (equivalent to systemctl daemon-reload). |
| unit_file_write_toolA | Write a new unit file for setting up a service. Backs up any file it overwrites. Requires the host's unit directory (default /etc/systemd/system) to be bind-mounted into the container. Runs daemon-reload after writing. |
| unit_file_remove_toolA | Decommission a unit: stop, disable, optionally mask, back up and remove its file. Refused for units on the protected list. Best-effort on stop/disable — a unit that's already stopped or was never enabled doesn't block file removal. |
| journal_query_toolB | Query the journal — the main 2AM troubleshooting tool. |
| failed_units_toolA | List units currently in the 'failed' state — the first thing to check at 2AM. |
| list_jobs_toolA | List pending systemd jobs — reveals stuck starts/stops/reloads. |
| timer_list_toolA | List systemd timers with their next and last elapse times. A null next_elapse or last_trigger means systemd gave no renderable time: unset (the timer has not run yet), infinity (it will never fire again), or a value outside the renderable range. A timer whose properties could not be read at all carries an error field instead of the two times. |
| system_status_toolA | Get overall systemd manager state: running/degraded, failed and job counts. |
| hostinfo_toolA | Get host identity info: hostname, kernel, OS. |
| session_list_toolA | List logged-in sessions — who's on this box right now. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 21 tools
Each tool maps to a distinct systemctl verb or resource, and the descriptions clearly separate near-neighbors like unit_status (curated: state/PID/memory/CPU) vs unit_show (full property dump). The main soft spot is unit_file_remove_tool, which internally does stop/disable/mask and therefore overlaps with unit_stop/unit_disable/unit_mask, though it is framed as a composite decommission operation.
The dominant pattern is noun_noun_verb_tool (unit_start_tool, timer_list_tool, journal_query_tool), applied consistently across the unit lifecycle. A handful of outliers (hostinfo_tool, failed_units_tool, list_jobs_tool) flip to verb-first or drop the prefix, but they remain readable and unambiguous.
21 tools is on the heavy side, but systemd genuinely exposes this many orthogonal operations (unit lifecycle, timers, journal, jobs, sessions, host identity). Every tool maps to a real systemctl/journalctl capability rather than being filler.
Full unit lifecycle is covered: write/remove, start/stop/restart/reload, enable/disable, mask/unmask, plus diagnostics (status, show, failed units, jobs, timers, journal, daemon-reload). Minor gaps exist — no way to read a unit file's raw contents (unit cat), no journal follow/live tail, and no drop-in override editing — but agents can work around these via unit_show and journal_query.