Superuser

io.github.fitzyracing1由 GitHub 账号 fitzyracing1 发布v0.1.0更新于 Oct 30, 2026

Permission-gated superuser (sysadmin) MCP agent with enterprise guardrails and audit.

概览

AI 生成的概览

带权限门控的系统管理 MCP 服务器,让助手执行 shell 命令、查看系统状态并操作 GitHub,并配有审批与审计日志。

可以做什么
  • 查看主机状态:系统信息、各分区磁盘占用、按内存或 CPU 排序的进程
  • 在本机执行 shell 命令,受危险命令黑名单、按风险触发的审批和审计日志约束
  • 读取白名单仓库的 GitHub 仓库元数据并列出 issue
  • 在 GitHub issue 或 PR 上发表评论,需审批并开启写入开关
  • 报告当前护栏配置与 Cisco AI Defense 状态
适用场景
适合需要有人监督的本地系统运维场景:让助手检查机器健康状况、执行命令并操作 GitHub 仓库,同时每个动作都经过审批、检查和审计留痕。也适合需要可证明护栏而非无限制 root 权限的团队。
运行要求
需在本机以 Python 3.10+ 运行,从 git 安装(尚未发布到 PyPI),通过 stdio 通信。可选集成需凭据:Cisco AI Defense 的 AI_DEFENSE_INSPECTION_API_KEY,Duo 授权的 DUO_CLIENT_ID、DUO_CLIENT_SECRET 与 DUO_TOKEN_URL,Stripe 计费的 STRIPE_API_KEY,以及 GITHUB_TOKEN 和仓库白名单设置。SUPERUSER_HUMAN_OWNER 与 SUPERUSER_APPROVAL_AT 用于指定责任人和审批阈值。
安装前请注意
它赋予助手在本机真实执行 shell 命令的能力,README 称黑名单只是兜底而非主要控制。命令与响应会发送给 Cisco AI Defense 检查,成功调用会通过 Stripe 计量,第三方服务因此可见相关活动。GitHub 写入需 GITHUB_ALLOW_WRITES 与确认。需提供多个密钥(AI_DEFENSE_INSPECTION_API_KEY、DUO_CLIENT_SECRET、STRIPE_API_KEY、GITHUB_TOKEN);请勿将配置文件纳入版本控制,并使用最小权限的 GitHub 令牌。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Superuser,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Super

A permission-gated superuser agent exposed over the Model Context Protocol (MCP). It gives an AI agent real system-administration powers on this machine — running shell commands, checking system state, and acting on GitHub — while wrapping every action in guardrails: a dangerous-command denylist, a human-approval gate for risky operations, least-privilege GitHub access, an append-only audit log, and Cisco AI Defense runtime inspection of every tool call and response.

The design goal is the version of a "superuser agent" you can actually ship: powerful, but safe, auditable, and compatible with enterprise guardrails.

Landing site: https://fitzyracing1.github.io/super-landing/ (source: fitzyracing1/super-landing). The previous Pages site in this repo is preserved at tag site-v1 / branch site-archive.

Why it's built this way

An agent that can do anything as root is a liability, not a product. Buyers (and marketplace security reviews) expect scoping, approvals, and an audit trail. So capabilities here always pass through a single choke point — the Guard — which enforces, in order:

  1. Cisco AI Defense inspects the tool call (can block).
  2. Cisco Duo Agentic Identity authorizes the tool call per-policy (can block).
  3. Approval gate — anything at or above approval_required_at (default MEDIUM) needs an explicit confirm=true from a human.
  4. The operation runs.
  5. Cisco AI Defense inspects the response before it is returned (catches data leakage).
  6. Stripe meters the successful call (best-effort; never blocks).
  7. The outcome is written to the audit log as human owner -> agent -> tool -> action -> outcome.

This mirrors the enterprise model: your app owns scoping + approvals + local audit; Cisco AI Defense provides runtime threat inspection at the MCP layer; Cisco Duo Agentic Identity provides per-tool-call authorization tied to an accountable human owner; and Stripe turns metered tool calls into revenue.

Cisco Duo Agentic Identity (authorization)

Duo follows a "Duo decides, the gateway enforces" model. This agent registers as a non-human identity, authenticates via the OAuth 2.1 client-credentials grant (with an RFC 8707 resource indicator), and authorizes every tool call either by matching the tool's required scope against what Duo granted, or by calling an explicit Duo decision endpoint. Set DUO_ENABLED=true plus DUO_TOKEN_URL / DUO_CLIENT_ID / DUO_CLIENT_SECRET (see .env.example). When Duo is not configured, calls are allowed but flagged governed: false; in enforce mode authorization errors fail closed.

Stripe usage-based billing (monetization)

Each authorized, successful tool call emits a Stripe meter event (v2 billing meter events API), so the agent can be sold per-action. Configure a meter in Stripe, then set STRIPE_ENABLED=true, STRIPE_API_KEY, STRIPE_CUSTOMER_ID, and STRIPE_METER_EVENT_NAME. Per-tool weights let higher-risk actions cost more. Billing is best-effort: metering failures are logged and never block or fail the tool call (results are annotated billed: true|false).

Tools

ToolRiskNotes
system_statusLOWHost, CPU, memory, uptime
disk_usageLOWPer-partition disk usage
list_processesLOWTop processes by memory/cpu
run_commandHIGH*Shell command; denylist + approval + audit
github_get_repoLOWRepo metadata (allowlisted repos only)
github_list_issuesLOWIssues for an allowlisted repo
github_create_issue_commentHIGHWrite; needs approval + GITHUB_ALLOW_WRITES
security_status—Reports the active guardrail configuration

* run_command is LOW risk only when its base command is in command_allowlist; otherwise HIGH (requires confirm=true).

Install

Not yet on PyPI. Install straight from git:

bash
pip install "superuser @ git+https://github.com/fitzyracing1/Super.git"pip install "superuser[all] @ git+https://github.com/fitzyracing1/Super.git"   # + Cisco AI Defense + Stripe SDKs

From a clone:

Requires Python 3.10+.

bash
pip install -e .              # core agent (Duo authz uses requests; no extra dep)pip install -e '.[security]'  # + Cisco AI Defense SDK (cisco-aidefense-sdk)pip install -e '.[billing]'   # + Stripe SDK (usage-based billing)pip install -e '.[all]'       # security + billingpip install -e '.[dev]'       # + pytest / ruff

Configure

Copy .env.example to .env (or use a YAML file — see superuser.example.yaml) and set values. Key settings:

  • SUPERUSER_HUMAN_OWNER — the human accountable for the agent's actions.
  • SUPERUSER_APPROVAL_AT — risk threshold for the approval gate (LOW…CRITICAL).
  • AI_DEFENSE_* — Cisco AI Defense credentials/mode (see below).
  • DUO_* — Cisco Duo Agentic Identity authorization (see below).
  • STRIPE_* — Stripe usage-based billing (see below).
  • GITHUB_TOKEN, GITHUB_ALLOWED_REPOS, GITHUB_ALLOW_WRITES — least-privilege GitHub.

For a full console-value → env-var mapping for all three services, see docs/INTEGRATIONS.md.

Cisco AI Defense

Install the SDK (pip install 'superuser[security]') and provide credentials:

  • Explicit inspection of this server's own tool calls/responses: set AI_DEFENSE_INSPECTION_API_KEY.
  • Runtime protection (agentsec.protect() auto-patches LLM + MCP clients): set AI_DEFENSE_API_MODE_LLM_ENDPOINT + AI_DEFENSE_API_MODE_LLM_API_KEY, or point AI_DEFENSE_AGENTSEC_CONFIG at an agentsec.yaml (see agentsec.example.yaml).
  • AI_DEFENSE_MODE: enforce (block), monitor (log only), or off.

If the SDK is not installed or no credentials are set, the agent still runs but every result is annotated protected: false / UNPROTECTED — the gap is never silent. In enforce mode, inspection errors fail closed (the call is blocked); in monitor mode they fail open (logged, allowed).

Environment variables

AreaVariables
CoreSUPERUSER_CONFIG, SUPERUSER_HUMAN_OWNER, SUPERUSER_APPROVAL_AT, SUPERUSER_COMMAND_TIMEOUT, SUPERUSER_AUDIT_LOG
Cisco AI DefenseAI_DEFENSE_ENABLED (default true; set false for local dev), AI_DEFENSE_MODE, AI_DEFENSE_INSPECTION_API_KEY, AI_DEFENSE_API_MODE_LLM_ENDPOINT, AI_DEFENSE_API_MODE_LLM_API_KEY, AI_DEFENSE_AGENTSEC_CONFIG
Cisco DuoDUO_ENABLED, DUO_MODE, DUO_AGENT_ID, DUO_TOKEN_URL, DUO_CLIENT_ID, DUO_CLIENT_SECRET, DUO_AUTHORIZATION_URL, DUO_RESOURCE, DUO_SCOPES
StripeSTRIPE_ENABLED, STRIPE_API_KEY, STRIPE_CUSTOMER_ID, STRIPE_METER_EVENT_NAME, STRIPE_DEFAULT_VALUE
GitHubGITHUB_TOKEN, GITHUB_ALLOWED_REPOS, GITHUB_ALLOW_WRITES, GITHUB_API_URL

With no keys set the server still runs: Duo and Stripe are off by default, and Cisco AI Defense runs unprotected (clearly flagged) if the SDK/keys are missing.

Run

bash
# Validate configuration and print guardrail/Cisco status, then exit:superuser --check
# Start the MCP server (stdio transport, for MCP clients like Cursor/Claude):superuser# or: python -m superuser

Register with an MCP client

Example client config (stdio):

json
{  "mcpServers": {    "superuser": {      "command": "superuser",      "env": {        "SUPERUSER_HUMAN_OWNER": "[email protected]",        "AI_DEFENSE_MODE": "enforce",        "AI_DEFENSE_INSPECTION_API_KEY": "..."      }    }  }}

Test

bash
pytest

Security notes

  • The dangerous-command denylist is a backstop, not the primary control. The primary controls are Cisco AI Defense inspection and the approval gate.
  • GitHub access fails closed: no token or an empty repo allowlist means no access. Use a fine-grained, least-privilege token.
  • Secrets are redacted in the audit log. Keep .env / *.yaml config files out of version control (already in .gitignore).

License

Apache-2.0.

Plans

This project is free, and its license stays as is. Support it through GitHub Sponsors:

  • Free: use the code, community support.
  • Pro ($49/month): priority issues and support.
  • Team ($199/month): priority support for your team plus early access.

来源:README.md,提交 b223270

工具

8

system_status

Report host, CPU, memory, and uptime for this machine.

无需输入参数。

disk_usage

Report disk usage per mounted partition.

无需输入参数。

list_processes

List top processes. sort_by is 'memory' or 'cpu'.

输入参数limitsort_by

run_command

Run a shell command on this machine. Non-allowlisted commands are HIGH risk and require confirm=true. Commands matching the dangerous-command denylist are always rejected, and every call is inspected by Cisco AI Defense and written to the audit log.

输入参数command必填confirmtimeout

github_get_repo

Get metadata for an allowlisted repo (e.g. 'owner/name').

输入参数repo必填

github_list_issues

List issues for an allowlisted repo.

输入参数repo必填limitstate

github_create_issue_comment

Comment on an issue/PR. Write action: requires confirm=true and GITHUB_ALLOW_WRITES.

输入参数body必填repo必填confirmissue_number必填

security_status

Report the agent's guardrail configuration and Cisco AI Defense status.

无需输入参数。

版本历史

1
  1. v0.1.0最新Oct 22, 2026

评分

已满足适用检查项的 80%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。