mcp-systemd-crunchtools

v0.4.0
mcp-systemd-crunchtools Checked 1 day ago Published 7 days ago

MCP server for systemd unit management via D-Bus

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

unit_list_tool Unit List Tool

List systemd units.

ParameterTypeDescription
all_unitsbooleanInclude inactive/dead units (default shows only active/failed)
modestring"loaded" for units currently loaded in memory, "files" for all installed unit files (includes units not currently loaded)
patternGlob pattern to filter unit names (e.g. "mcp-*.service")

unit_status_tool Unit Status Tool

Get curated status for a unit: active/sub/load state, PID, memory, CPU.

ParameterTypeDescription
unit_name *stringSystemd unit name (e.g. "acquacotta.crunchtools.com.service")

unit_show_tool Unit Show Tool

Dump the full property set for a unit (dependencies, exec settings, cgroup, etc).

ParameterTypeDescription
unit_name *stringSystemd unit name

unit_start_tool Unit Start Tool

Start a unit.

ParameterTypeDescription
unit_name *stringSystemd unit name

unit_stop_tool Unit Stop Tool

Stop a unit. Refused for units on the protected list.

ParameterTypeDescription
unit_name *stringSystemd unit name

unit_restart_tool Unit Restart Tool

Restart a unit. Refused for units on the protected list.

ParameterTypeDescription
unit_name *stringSystemd unit name

unit_reload_tool Unit Reload Tool

Ask a unit to reload its configuration without restarting.

ParameterTypeDescription
unit_name *stringSystemd unit name

unit_enable_tool Unit Enable Tool

Enable a unit to start on boot.

ParameterTypeDescription
unit_name *stringSystemd unit name

unit_disable_tool Unit Disable Tool

Disable a unit from starting on boot. Refused for units on the protected list.

ParameterTypeDescription
unit_name *stringSystemd unit name

unit_mask_tool Unit Mask Tool

Mask a unit so it cannot be started even manually. Refused for protected units.

ParameterTypeDescription
unit_name *stringSystemd unit name

unit_unmask_tool Unit Unmask Tool

Unmask a previously masked unit.

ParameterTypeDescription
unit_name *stringSystemd unit name

daemon_reload_tool Daemon Reload Tool

Reload systemd's unit file cache (equivalent to systemctl daemon-reload).

unit_file_write_tool Unit File Write Tool

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.

ParameterTypeDescription
content *stringFull contents of the unit file
unit_name *stringBare unit file name (e.g. "myapp.service")
enablebooleanEnable the unit after writing
startbooleanStart the unit after writing

unit_file_remove_tool Unit File Remove Tool

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.

ParameterTypeDescription
unit_name *stringBare unit file name
maskbooleanAlso mask the unit so nothing can start it again by mistake

journal_query_tool Journal Query Tool

Query the journal — the main 2AM troubleshooting tool.

ParameterTypeDescription
bootBoot offset (0 = current boot, -1 = previous boot, ...)
linesintegerNumber of log lines to return (default: 100)
patternFilter messages by regex pattern (journalctl -g)
priorityMinimum priority: emerg/alert/crit/err/warning/notice/info/debug or 0-7
sinceShow entries since this time (e.g. "1 hour ago", "YYYY-MM-DD HH:MM:SS")
unitRestrict to one unit (omit for the whole system journal)
untilShow entries until this time

failed_units_tool Failed Units Tool

List units currently in the 'failed' state — the first thing to check at 2AM.

list_jobs_tool List Jobs Tool

List pending systemd jobs — reveals stuck starts/stops/reloads.

timer_list_tool Timer List Tool

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_tool System Status Tool

Get overall systemd manager state: running/degraded, failed and job counts.

hostinfo_tool Hostinfo Tool

Get host identity info: hostname, kernel, OS.

session_list_tool Session List Tool

List logged-in sessions — who's on this box right now.