1. Conduid
  2. Developer Tools
  3. Systemd MCP
MCP server · Developer Tools

Systemd MCP

mcp server for systemd

Unclaimed MIT devtools
59Fair

Scored 12 days ago · breakdown

About Systemd MCP

Systemd MCP is an MCP server published by openSUSE in the Developer Tools category: mcp server for systemd.

The repository has 10 stars and 8 forks, with the last commit 6 days ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/openSUSE/systemd-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Systemd MCP

Powered by Claude · Grounded in docs

I know everything about Systemd MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 5 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.3.5v0.3.5 · 24 Sep 2026fixed issues with log retrieval allow local connected users to access logs and services in the same way as if running `systemctl` or `journalctl`
v0.3.4v0.3.4 · 4 May 2026check for availability of man binary
v0.3.3v0.3.3 · 30 Apr 2026v0.3.3 allow man page sections like 3p1 call authorization before file access
v0.3.2v0.3.2 · 24 Apr 2026valid json schemas for listing unit files testing list unit input schema via bats
v0.3.1v0.3.1 · 31 Mar 2026make tests more versatile check if user has access to system-log via group before triggering gatekeeper

README

Model Context Protocol (MCP) for systemd

Test Status Build Status Release Status

The server directly connects to systemd via its C API and so doesn't need systemctl to run.

Installation

Compile directly with

  go build -o bin/systemd-mcp systemd-mcp.go
  go build -o bin/gatekeeper gatekeeper/main.go

or use the provided Makefile:

  make build

and install with

  sudo make install

The make install command installs:

  • systemd-mcp to /usr/bin/systemd-mcp
  • gatekeeper to /usr/sbin/gatekeeper
  • Systemd units for gatekeeper.service and gatekeeper.socket
  • Polkit policy for gatekeeper

Security

Stdio Transport (Polkit/DBus)

When running over Stdio (default), systemd-mcp uses polkit for authorization. The process runs as the current user.

  • Unit Management: Operations like starting or stopping units trigger a polkit request for org.freedesktop.systemd1.manage-units.

  • Log Access: systemd-mcp tries to open the whole journal in this order:

    • If running as root or in the same group as the directory /var/log/journal, all journal files are accessible.
    • Else systemd-mcp connects to the gatekeeper via /run/gatekeeper/gatekeeper.socket. This triggers a polkit request for com.suse.gatekeeper.readlog.
    • If the gatekeeper isn't usable, only the journal files readable by the current user (e.g. its own user-<uid>.journal files) are used. The log output contains a hint about this reduced access.

    Read operations over the stdio transport are always authorized, as the calling user runs the server itself; only write operations still trigger a polkit request.

HTTP Transport (OAuth2)

When running over HTTP (using --http), systemd-mcp uses OAuth2 for authorization. You must specify an OAuth2 controller address using --controller.

  • OAuth2 Configuration:
    • Audience: systemd-mcp-server
    • Supported Scopes:
      • mcp:read: Allows read-only access (e.g., listing units, reading logs).
      • mcp:write: Allows write access (e.g., starting/stopping units).

If the HTTP server is started as root or in the journal group, it accesses the whole journal directly. Otherwise the gatekeeper is used for log access, provided gatekeeper.socket is available; if it isn't, only the journal files readable by the current user are shown.

HTTP Transport with authentication

For debugging purposes, the --noauth flag can be used to access the MCP server without authentication. To ensure this is intentional, the flag must be set exactly to ThisIsInsecure.

Self-signed certificates

To run the server in HTTP mode with TLS, you need a certificate and a key. You can generate self-signed certificates for local testing with:

  make certs

Command-line Options

Flag Shorthand Description Default
--http If set, use streamable HTTP at this address, instead of stdin/stdout. ""
--skip-tls-verify Skip TLS certificate verification for outbound requests (e.g. to OAuth2 controller). false
--controller OAuth2 controller address (required for HTTP mode unless --noauth is used). ""
--logfile If set, log to this file instead of stderr. ""
--verbose -v Enable verbose logging. false
--debug -d Enable debug logging. false
--log-json Output logs in JSON format (machine-readable). false
--list-tools List all available tools and exit. false
--allow-write -w Authorize write to systemd. false
--allow-read -r Authorize read to systemd. false
--enabled-tools A comma-separated list of tools to enable. Defaults to all tools. all
--timeout Set the timeout for polkit authentication in seconds. 5
--noauth Disable authorization. Must be set to ThisIsInsecure. Mutually exclusive with --controller. ""
--toon Use token optimized object notation for tool output. false
--cert-file Path to server certificate file (PEM format) for TLS. Requires --key-file. ""
--key-file Path to server private key file (PEM format) for TLS. Requires --cert-file. ""
--version Print the version and exit. false

Required Flag Combinations

  • HTTP Mode: Requires either --controller OR --noauth=ThisIsInsecure.
  • TLS: Both --cert-file and --key-file must be provided together.
  • Authentication: --noauth and --controller are mutually exclusive.

Functionality

Following tools are provided:

  • list_units: List systemd units. Filter by states (e.g. running, failed) or patterns. Can return detailed properties. Use mode='files' to list all installed unit files.
  • change_unit_state: Change the state of a unit or service (start, stop, restart, reload, enable, disable).
  • check_restart_reload: Check the reload or restart status of a unit. Can only be called if the restart or reload job timed out.
  • list_log: Get the last log entries for the given service or unit.
  • get_file: Read a file from the system. Can show content and metadata. Supports pagination for large files.
  • get_man_page: Retrieve a man page. Supports filtering by section and chapters, and pagination.

Testing

For testing purposes the test client ./test/main.go is provided. Also there are several unit tests including systemd_test.go which tests authentication with oauth2 using a keycloak container.

README fetched from the repository 5 days ago. The original is authoritative.

Questions

About Systemd MCP

How do I install Systemd MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Systemd MCP safe to use with an AI agent?

Its trust score is 59 out of 100 (fair). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Systemd MCP still maintained?

Yes — the latest release is v0.3.5 (24 Sep 2026), and the last commit was 6 days ago. The repository has 10 stars.