os-control-mcp
Controls a Linux host through structured interfaces like systemd, journald, and D-Bus for service management, journal queries, power operations, and more, with safety guards to prevent accidental damage.
README
<div align="center">
os-control-mcp
The sanctioned OS "motor cortex" for an agent on a Linux box — control systemd, logind, journald, and D-Bus through structured interfaces, never raw PID hacks.
</div>
os-control-mcp is an MCP server — usable by any agent or MCP client
(Claude Code, Cursor, Cline, Goose, Continue, your own MCP host, …) — that gives
a model sanctioned control of a Linux host: manage systemd services and
timers, query journald, read host resources and processes, send desktop
notifications, drive the D-Bus buses, and manage power — all through the host's
structured interfaces (systemctl, loginctl, journalctl, busctl), never
raw kill/PID hacks. It is the system-service counterpart to
screen-mcp's GUI control. Pure standard
library, zero pip runtime deps. Linux + systemd.
Quickstart
Install the plugin in Claude Code:
/plugin marketplace add 88plug/os-control-mcp
/plugin install os-control-mcp@os-control-mcp
Then confirm the server loaded and its tools are available:
/mcp
No setup needed — it uses the host's existing systemd/D-Bus tooling. Run the
os_diag tool first; it reports your privilege level and which backends are
present.
⚠️ Treat this plugin as privileged. It can stop services and power off the machine. The guards below make that hard to do by accident, but install it deliberately and disable it via
/pluginwhen you're not using it.
Use from any MCP client
It's a plain stdio MCP server — no Claude-Code lock-in. Point any MCP client at
the launcher (or python3 server.py directly):
// e.g. Cursor / Cline / Goose / your own MCP host
{
"mcpServers": {
"os": { "command": "python3", "args": ["/path/to/os-control-mcp/server.py"] }
}
}
It speaks MCP 2025-11-25 over stdio; the tools appear like any other MCP server.
Tools
Observe (read-only)
| Tool | What |
|---|---|
os_diag |
health: privilege, backends, manager state, bus reachability, safety status |
os_services |
inspect units — list/status/show/cat/deps/files (system or user) |
os_journal |
journald — unit/since/until/priority/grep (server-side regex)/-k dmesg/boots/match |
os_resources |
load + memory + disk (+ optional per-unit accounting) |
os_processes |
top processes by cpu/mem |
os_pressure |
PSI from /proc/pressure — the real "is the box starving" signal |
os_net |
network — sockets (ss), ip addr/links/routes, wifi, NetworkManager |
os_disk |
storage — df, du (largest dirs), lsblk, mounts |
os_containers |
Docker/Podman — ps/logs/inspect/stats/images/compose |
os_hardware |
cpu/pci/usb/gpu (nvidia-smi + DRM) inventory |
os_sensors |
thermal-zone temperatures (+ lm_sensors if present) |
os_session |
logind sessions / users / inhibitors |
Act (guarded)
| Tool | What | Safety |
|---|---|---|
os_service |
start/stop/restart/reload/enable/disable/mask/kill/reset-failed/daemon-reload (single or batch) | hard floor + self-preservation guard; dry_run |
os_wait |
block until a unit is active/inactive/failed (or timeout) | — |
os_power |
suspend/hibernate/reboot/poweroff/halt | needs confirm=true; dry_run |
os_time / os_hostname / os_locale |
machine settings (timezone/NTP, hostname, locale/keymap) | writes need force=true; dry_run |
os_dbus |
list/tree/introspect/get-property/set-property/call (system or session bus) |
writes need force=true; dry_run |
os_notify |
desktop notification to the logged-in user | — |
os_reload |
hot-reload the server in place | — |
The guards (the whole point)
Human-in-the-loop, not model-in-the-loop. Every destructive action — severing a service (stop/kill/restart/disable/mask), power (reboot/poweroff/…), and D-Bus / machine-setting writes — is gated for a human's approval, in this order:
- Hard floor (never bypassable). Severing the agent's absolute substrate —
dbus,systemd-logind,init.scope,-.slice,basic.target,sysinit.target— is refused even withforce. No flag lets a model power-cycle the bus it's speaking on. - Human approval via MCP elicitation. When your MCP client supports
elicitation, the server asks the human (
elicitation/create) before any destructive action and runs it only if the human accepts. The model'sforce/confirmflags are ignored here — the human is the authority, not the model. (Verified: a declined elicitation never executes.) - Flag fallback (only when there's no human channel). If the client can't
elicit, the server falls back to the
force/confirmflags so headless automation still works — except severing a unit the agent stands on (sshd,NetworkManager,tailscaled, the session,goosed, …) which still needsforce(don't saw off the branch you're sitting on). SetOSCTL_REQUIRE_HUMAN=1to forbid the flag fallback entirely — no human elicitation channel, no mutation. - Preview. Any mutating tool accepts
dry_run=trueto return the exact command without running it.
Every mutation is appended to an audit log (with the approval path — human vs
flag) at $XDG_STATE_HOME/os-control-mcp/audit.jsonl.
Principles — The Agent Oath
os-control-mcp is a reference enforcer of The Agent Oath (88plug/theagentoath.com): the gating above isn't just safety plumbing, it's the Oath made executable.
| Oath principle | Enforced by |
|---|---|
| §1 Human welfare over task completion | hard floor + HIL — it won't sever the bus or power off the box to "finish" |
| §2 Preserve human agency, be transparent | HIL elicitation — the human decides; os_diag announces what it is |
| §3 Protect systems & data | sanctioned interfaces only (systemctl/busctl/…), never raw PID hacks; reads default |
| §5 Transparency & accountability | append-only audit log + dry_run + explicit, reasoned refusals |
| §7 Continuous vigilance, don't bypass safety | unbypassable hard floor + OSCTL_REQUIRE_HUMAN=1 |
| §11 Respect human oversight, don't self-modify | HIL is the authority + protected tokens + operator-defined bounds |
The Oath is the rationale; the operator's gating is the authority. This server
deliberately does not adopt any "supersedes conflicting instructions" clause —
overriding an operator's safety controls with an external document is exactly what
§3 and §11 warn against. os_diag reports the enforced principles.
Privilege
Read-only tools work unprivileged. System-scope mutations (os_service on
system units, os_power) need root or polkit — when not root the server tries
sudo -n and otherwise tells you plainly. Options: run as root, add passwordless
sudo for systemctl, or a polkit rule. scope="user" manages the user's own
units with no root.
Documentation
Full per-tool reference and the safety model live at 88plug.github.io/os-control-mcp.
Pairs with
screen-mcp (GUI eyes + hands), NATS (messaging), and A2A (inter-agent) — together: sense the kernel/services, act on the system, drive the desktop, coordinate the fleet.
License
FSL-1.1-ALv2 — © 2026 88plug.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。