
Proxy AIops
io.github.AIops-tools由 GitHub 账号 AIops-tools 发布v0.13.0更新于 Oct 30, 2026
Governed Traefik + Caddy + HAProxy ops: routes, upstreams, certs, 5xx RCA. 28 tools.
概览
面向 Traefik、Caddy 和 HAProxy 反向代理的受审计运维服务器:读取路由、上游、证书与流量,执行 RCA 分析,并进行受管控的配置写入。
- 可以做什么
- 以相同工具名查看 Traefik、Caddy、HAProxy 的状态、入口点、路由、服务、上游、中间件与 TLS 证书
- 读取流量与错误计数,快照并搜索实时配置树
- 运行启发式分析:后端健康 RCA、证书到期扫描、5xx 错误率 RCA、路由冲突检测
- 对 Caddy 配置执行受管控写入(设置、删除、整体加载),对 HAProxy 运行时服务器状态与权重写入,均支持 dry-run 预览
- 列出并应用已记录的可逆写入撤销描述符
- 适用场景
- 适合需要诊断或运维混合反向代理边缘的场景,例如排查上游为何不可用、哪些证书即将过期、5xx 错误来自哪里、哪些路由被遮蔽,并且希望每次调用都写入审计数据库。
- 运行要求
- 需在本地安装 Python 包 proxy-aiops(uv tool、pipx 或 uvx),以 stdio 方式运行。需通过 init 向导生成列出目标平台与 base URL 的配置文件。HAProxy 需要 Data Plane API 凭据;Traefik 与 Caddy 仅在启用 Basic 认证时需要密码。加密密钥库由 PROXY_AIOPS_MASTER_PASSWORD 解锁,MCP 客户端必须显式设置。需要能访问各代理的管理 API。
安装
在 SourceWeft 中
- 打开 控制台中的 Proxy AIops,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Proxy AIops
Audit availability: Real writes require a committed
pendingaudit row and stop before contacting the platform if storage is unavailable. Reads and previews may continue with a warning; new audit rows store outcome summaries rather than full responses.
Governed, audited AI-ops for Traefik, Caddy and HAProxy reverse proxies / load balancers — for AI agents (via MCP) and humans (via CLI).
Disclaimer: Community-maintained open-source project. Not affiliated with, endorsed by, or sponsored by Traefik Labs, the Caddy project, HAProxy Technologies, or the HAProxy project. Traefik, Caddy and HAProxy are trademarks of their respective owners. MIT licensed.
proxy-aiops speaks to three proxy platforms behind one MCP server — Traefik
(its API under /api/..., metrics-text counters via /metrics), Caddy (the
admin API, default localhost:2019) and HAProxy (the Data Plane API v2 under
/v2/..., HTTP Basic auth) — with the same tools working on all three. Each
target in the config names its own platform; a name-keyed platform registry
selects the API shape (auth + resource paths), and an explicit support matrix
raises teaching errors for ops a platform genuinely cannot do — e.g. Traefik
writes point you at its providers (file, container labels, orchestrator CRDs), never
a silent no-op.
Every tool runs through a built-in governance harness (vendored, zero external dependency): audit log, token/call budget with runaway circuit-breaker, descriptive risk-tier labelling, undo-token recording, and output sanitisation.
Why this exists
- One server, three proxies — Traefik, Caddy and HAProxy in a mixed edge, spoken to through identical tool names. Adding another proxy later is a new platform descriptor, not a rewrite.
- Read the whole edge — version, entrypoints/listeners, routes (routers / caddy routes / frontends) with parsed hosts+paths, services and server-level upstream health, middlewares, TLS domain inventory, traffic/error counters, and the live config tree (snapshot + search).
- Flagship RCA analyses — transparent heuristics that show their numbers,
never a black-box verdict:
backend_health_rca(down upstreams → cause class L4/L6/L7/DNS/maint + action),cert_expiry_sweep(days-to-expiry buckets + per-platform renewal hints),error_rate_rca(5xx share vs the fleet baseline, dominant code → 502/503/504/500 cause), androute_conflict_analysis(shadowed routes, dead routes, redirect loops). - Governed writes — caddy config
set/delete/ fullload(the prior subtree/config is fetched first, so the recorded undo replays a real restore) and haproxy runtime serverstate(ready/drain/maint) andweight(undo restores the prior value) — all withdry_runpreviews; delete/load are risk=high with double confirmation at the CLI.
What this tool does, and does not, decide
It delivers proxy operations — reads and writes — accurately and efficiently, and records every one of them. It does not decide whether a write is allowed to happen. That is the agent's judgement, or the permission of the account you connect it with: give the HAProxy Data Plane API a read-only role, or scope down the Traefik/Caddy admin API you point it at, and the writes fail at the server — the place that actually owns the permission.
So there is no read-only switch, no policy file, no approval gate to configure.
The one thing the tool guarantees is that nothing is silent: every call, over
MCP and over the CLI alike, lands an audit row in ~/.proxy-aiops/audit.db,
and reversible writes still capture their before-state and record an inverse.
Each tool declares a
risk_level, kept in agreement with its[READ]/[WRITE]documentation tag by a test, and carried into the audit row as a descriptive tier — so a reviewer can see at a glance that a row was a high-risk delete. It is a label, not a gate.
Running a smaller / local model? See agent-guardrails.md — it lists the guardrails this tool now enforces for you (so you don't spend prompt budget restating them) and gives a ready-made system prompt for what's left.
Tool inventory (28 tools)
Reversible writes record an inverse undo descriptor built from the real fetched
before-state (set_config_value restores the prior subtree; delete_config_path
re-creates it; load_config re-loads the snapshotted config; server state/weight
restore the prior value). The undo params match each tool's own signature, so the
descriptor replays as-is.
Per-platform support matrix
Unsupported combinations raise a teaching error that says what to use instead — never a silent empty result.
Install
Quick start
As a Claude Code plugin
One install gives an agent both the skill and the MCP server:
The MCP server is fetched with uv and pinned to the
package version this plugin declares, so an audit row can be traced back to the
code that wrote it. Credentials are still configured with proxy-aiops init — see below.
As an OpenClaw plugin
The same bundle is published on ClawHub, where one install delivers the skill and its MCP server together:
Restart the OpenClaw gateway afterwards so it loads the plugin. The MCP server is
fetched with uv, pinned to this exact release, so
uvx has to be on PATH — without it the skill still installs but reports
Visible to model: no. Credentials are configured exactly as below.
As a CLI or standalone MCP server
Run the MCP server (stdio) for an agent:
MCP client config
Env-block caveat: the
envblock is only needed when a credential is stored (haproxy always; traefik/caddy only behind Basic auth). MCP clients do not inherit your shell profile — setPROXY_AIOPS_MASTER_PASSWORD(andPROXY_AIOPS_CONFIG/PROXY_AIOPS_HOMEif you relocated them) explicitly in the client config, or the server cannot unlocksecrets.enc.
Configuration
~/.proxy-aiops/config.yaml (non-secret connection details only):
The secret — the HAProxy Data Plane API password, or an optional Basic-auth
password in front of Traefik/Caddy — is stored encrypted in
~/.proxy-aiops/secrets.enc (Fernet + scrypt-derived key), never plaintext on
disk. Traefik and Caddy commonly run unauthenticated on localhost, so their
secret is optional (like a local socket); HAProxy's is required. Set it with
proxy-aiops secret set <target> or the init wizard. The store is unlocked by
a master password from PROXY_AIOPS_MASTER_PASSWORD (non-interactive/MCP/CI) or
an interactive prompt (CLI on a TTY). A legacy plaintext env var
PROXY_<TARGET>_SECRET is honoured as a fallback (migrate with
proxy-aiops secret migrate).
Governance
Every MCP tool — and every CLI write, which routes through the same governed
functions — passes through @governed_tool. It records; it does not authorize
(see above).
- Audit — every call is logged to
~/.proxy-aiops/audit.db(tool, params with secrets redacted, status, duration, risk tier, and any operator-supplied approver/rationale). The CLI writes the same row the MCP path does — there is no unaudited entry point. - Budget / runaway guard — a safety backstop, not an authorization gate:
per-process token/call caps and a repeat-call circuit breaker stop a stuck agent
from burning unbounded calls/time (
PROXY_MAX_TOOL_CALLS,PROXY_RUNAWAY_MAX, …; disable the breaker withPROXY_RUNAWAY_MAX=0). - Undo recording — reversible writes record an inverse descriptor to
~/.proxy-aiops/undo.dbfrom the fetched before-state (recording only; an external orchestrator executes it). Undo params match the target tool's own signature, so the descriptor replays as-is. - Risk tier — a descriptive label on the audit row derived from
risk_level; it gates nothing. - Sanitisation — all proxy-returned text is bounded + control-character sanitised before it reaches the agent.
Platform support & verification status
- Platforms: Traefik (API + /metrics), Caddy (admin API), HAProxy (Data Plane API v2).
- Test coverage: behaviour is validated against mocked JSON/metrics responses —
every module imports, every MCP tool carries the governance marker, the four flagship
analyses are unit-tested against synthetic telemetry, the support matrix is asserted
to raise teaching errors (never a silent no-op), and reversible writes are asserted to
record the correct inverse undo descriptor. The concrete REST paths are modelled from
each project's public API and have not yet been exercised against a live proxy. See
docs/VERIFICATION.md for the checklist a live run must
satisfy. All three platforms are free and self-hostable (a small container-compose lab
with traefik + caddy + haproxy/dataplaneapi is a one-evening setup), and
proxy-aiops doctor— a health/info probe per platform — is the fastest live check. - Routing note: this tool operates reverse proxies / load balancers. Do NOT use it for firewall rules — use firewall-aiops.
- Missing a capability? Open an issue or PR at github.com/AIops-tools/Proxy-AIops — contributions and feedback welcome.
License
MIT — see LICENSE.
来源:README.md,提交 2e83573
工具
0版本历史
5- v0.13.0最新Oct 30, 2026
- v0.12.0Oct 15, 2026
- v0.10.0Oct 15, 2026
- v0.9.4Sep 17, 2026
- v0.9.3Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分