claude-systemd-mcp

claude-systemd-mcp

Read-only systemd inspection for Claude on Linux — list units, status, journal, failed units, unit files.

Category
访问服务器

README

Claude systemd

Read-only systemd inspection for Claude Desktop on Linux. Lets Claude answer the most common Linux ops question — "why is this service broken?" — without you copy-pasting systemctl and journalctl output by hand.

Seven tools cover unit listing, per-unit status, journal tailing, failed-unit hunting, unit-property inspection, raw unit-file display (including drop-in overrides), and queued-job inspection.

Strictly read-only in v0.1. No restart, enable, disable, or daemon-reload. Safe to enable on production hosts and shared systems. If you want destructive control, run those commands manually via claude-terminal-mcp.

Requirements

  • Linux with systemd (any modern Ubuntu/Debian/Fedora/Arch).
  • systemctl and journalctl on PATH (standard with systemd).
  • Read access to the journal for the units you care about. By default, system-wide journal access requires being in the systemd-journal or adm group; user-scope journals are always readable by their owner.

Install (Claude Desktop)

  1. Download the latest Systemd.mcpb from the Releases page.
  2. Settings → Extensions → Extension Developer → Install Extension → pick the .mcpb.
  3. Enable.

Tools

Tool What it answers
list_units What's running? What's loaded? Filter by type/state.
failed_units Anything broken right now?
unit_status Detailed status for one unit: active/sub state, enabled state, main PID, restart count, recent journal lines, fragment path, drop-in override paths.
unit_show Full property dump (Environment vars, ExecStart, Restart policy, dependencies — 100+ properties).
unit_cat Raw unit-file text plus drop-in overrides — equivalent to systemctl cat <unit>.
tail_journal Recent log entries with optional unit / time / priority filters.
list_jobs Currently-queued or running systemd jobs (rare; useful for stuck activations).

All tools support scope: "user" to inspect --user units. Default scope is system.

Example prompts

"Is anything in failed state right now?"failed_units

"Why is ollama.service not using the GPU? Show me its drop-in overrides and last 50 log lines."unit_cat ollama then tail_journal unit=ollama lines=50

"What did the journal say about errors and worse in the last 10 minutes?"tail_journal priority=3 since="10 minutes ago"

"Is nginx enabled at boot, and how many times has it restarted since the last boot?"unit_status nginx

Privacy policy

This extension runs entirely on your local machine and shells out only to systemctl and journalctl. No data leaves your machine. No network I/O. Read-only — cannot modify, restart, enable, disable, or reload anything.

The information visible to Claude includes:

  • Names, descriptions, and metadata of every system or user unit you query (or every loaded unit if you call list_units).
  • The full content of unit files and drop-in overrides (unit_cat) — these can contain Environment= lines with secrets if you've set them there. Do not store credentials in unit files if you intend to enable this extension.
  • Recent journal entries for queried units — including any messages services log, which may contain personally-identifying info, IP addresses, request paths, or stack traces.
  • Process IDs, restart counts, and runtime properties of services.

If your unit files or journals contain sensitive data and you don't trust the LLM endpoint, do not enable this extension.

Why no destructive operations?

A restart_unit / enable_unit / disable_unit set was deliberately left out of v0.1 because:

  1. They require root for system-scope units, which means either running Claude Desktop as root (bad) or configuring sudo rules (extension-specific friction).
  2. They're rarely needed in the workflow this extension actually serves — "why is X broken" is the 95% case.
  3. If you need to bounce a service, the existing claude-terminal-mcp gives you run_command sudo systemctl restart <unit> with the same sudo mechanics you'd use anywhere else, plus a confirmation step at the system prompt.

Keeping this extension read-only means it can be enabled on a production host, a shared workstation, or a customer machine without trust concerns. v0.2 may revisit this.

Troubleshooting

"systemctl is not installed" — This server is Linux-only. macOS and Windows do not run systemd.

"Permission denied" when reading journal — Add yourself to systemd-journal or adm: sudo usermod -aG systemd-journal $USER then log out and back in. Or call with scope: "user" to read only your own user-scope journal (no group needed).

Empty tail_journal results — Some distributions have rate-limited or volatile journals. Check Storage= in /etc/systemd/journald.confvolatile means the journal is wiped on reboot.

Development

Single ~400-line Node.js script, zero npm dependencies. Rebuild the .mcpb:

cd bundle-source
zip -j ../Systemd.mcpb manifest.json package.json server.js README.md LICENSE icon.png glama.json

License

MIT. See LICENSE.

Related

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选