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 分

    請在儲存庫或註冊中心條目中宣告授權條款。