
Cirdan
io.github.adanb13由 GitHub 账号 adanb13 发布v0.9.0更新于 Oct 25, 2026
AI infrastructure cartographer & MCP server: fingerprints, graphs & watches live infra for agents
概览
Cirdan 是一个值班修复代理,其 MCP 服务器为助手提供六个只读工具,用于列出、解释和查看事件与服务日志。
- 可以做什么
- 列出并解释事件,附带基于事件库和审计记录的证据说明(list_incidents、explain_incident、get_audit)。按注册服务名或别名获取近期错误、日志和运行状态,并自动定位对应的容器或 Pod。返回内容均经过脱敏。Cirdan 产品本身还会在隔离运行器中复现告警故障、由编码代理修复代码、验证修复并创建拉取请求,但这些修复动作由 CLI 和守护进程驱动,而非这些 MCP 工具。
- 适用场景
- 适合让编码助手在不离开对话的情况下查询生产环境出了什么问题、阅读事件解释,或拉取 cirdan.yaml 中已注册服务的日志和状态。如果只需要修复流程本身,则不必安装,因为它通过 CLI 和守护进程运行。
- 运行要求
- 以本地 stdio 进程运行,可通过 npx @cirdanops/cli serve-mcp 或 PyPI 包 cirdanops 配合 uvx 启动。需要已配置的 Cirdan 安装:包含 services: 注册表的 cirdan.yaml,实时日志和状态还需要运行中的守护进程。CLI 模式依赖已登录的 gh 以及 Claude Code 或 Codex CLI;API 模式使用加密存储的提供商密钥和 GitHub App。沙箱修复需要 Docker 或 kubectl。
安装
在 SourceWeft 中
- 打开 控制台中的 Cirdan,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Cirdan
[PyPI] [npm] [npm installs] [Python] [Downloads] [CI] [License] [Stars]
Cirdan is an on-call software repair agent. A production alert fires — Grafana,
Alertmanager, or Slack. Cirdan resolves the affected service and its repo from the
explicit services: registry in cirdan.yaml, reproduces the failure in an isolated
runner (Docker Compose or Kubernetes), has a coding agent fix the code — your own
logged-in Claude Code / Codex CLI, or an API provider — re-verifies the fix against
the pinned reproduction probe and the repo's test suite, and opens a verified pull
request. When policy allows, it merges, deploys, and verifies production recovery,
stopping at manual_required with full evidence when recovery fails.
The job it does: when an alert fires at 3am for a code-shaped failure, a verified fix PR (or a completed deploy plus recovery confirmation) is waiting instead of a page.
Cirdan is deliberately not an infrastructure mapper, a topology explorer, an observability dashboard, a generic agent launcher, or a ChatOps bot. It repairs the services you register — nothing is discovered, and nothing is repaired implicitly.
Quickstart
cirdan setup walks one short path and shows a readiness banner that flips to
"Ready to repair" only when this install can actually fix something:
- Choose a pathway — Use the CLI (the tools already logged in on this machine) or Use the API (managed credentials + a GitHub App). See Two ways to run.
- Connect an alert source — a Grafana webhook (+ HMAC), native Alertmanager intake, or Slack.
- Select repair repositories — in Source Code Connection, Cirdan lists the
repos your
ghlogin can push to; pick which ones it may repair. Only selected repositories are ever repaired. - Prove routing — the Alert routing step synthesizes a sample alert (or takes a real payload you paste) and must show it resolving to a selected repository and routing to a code-repair pipeline.
- Start the daemon and post a demo alert:
The runnable demo in examples/demo/ wires this end to end. The
same checklist is available headlessly — cirdan status --checks prints the identical
table and exits 1 until the install is ready. Useful setup flags:
cirdan setup --terminal— the text step flow instead of the UIcirdan setup --all— run every step without prompting (scripts / CI)cirdan setup --system— machine-level scope in~/.cirdaninstead of a repo
Install
From PyPI (recommended):
Without Python — npm / Homebrew / curl:
These ship a self-contained binary — no Python 3.11+ required. Supported: macOS (arm64), Linux x64/arm64 (glibc), Windows x64. On Intel Macs, Alpine/musl, or other platforms, use the PyPI install above.
Then set it up in one command (see Quickstart):
Both open the same guided setup: choose a pathway, connect an alert source + GitHub, select repair repositories, prove routing, and start the always-on daemon.
Targeted installs: cirdanops[mcp], cirdanops[api], cirdanops[slack],
cirdanops[agent], cirdanops[github-app], cirdanops[secrets], or combinations
like cirdanops[api,mcp]. The sandbox runners need no extras — they use the
docker/kubectl CLIs already on your PATH.
Prerequisites by platform (Python 3.11+ and uv or pipx):
Docker (no Python needed):
(or docker compose up with the provided docker-compose.yml)
From source (latest unreleased):
Two commands are installed:
Local development (from a clone)
Contributors work from a clone with an editable virtualenv, so changes to the
working tree take effect immediately — no reinstall between edits. make install
creates .venv and installs the package (distribution name cirdanops) editable with
the [all,dev] extras — every runtime feature plus the test toolchain:
Requires Python 3.11+. The manual two-line equivalent works on a standard Python;
make install additionally handles the pip-less-venv case (it falls back to
python3 -m venv --without-pip and bootstraps pip into the venv).
The editable install puts both console scripts in .venv/bin, running working-tree
code with no rebuild:
Common Make targets (make help lists them all):
On a headless box with no OS keyring, storing credentials during
cirdan setupneeds a master key in the environment first:export CIRDAN_MASTER_KEY=$(.venv/bin/python -c 'import os,base64;print(base64.b64encode(os.urandom(32)).decode())').
Two ways to run: Use the CLI / Use the API
The first setup screen picks a deployment posture (deployment_mode: in
cirdan.yaml), which gates everything after it:
Use the CLI (cli, the default) — Cirdan runs with the tools already logged in on
this machine. GitHub writes go through your gh auth login; the coding agent is a
detected, logged-in Claude Code or Codex CLI, spawned headless inside the isolated
repair workspace; the sandbox runner is your local Docker (or kubectl). The happy path
needs no stored keys and no GitHub App — an env-var API key and a GitHub App
remain available behind explicitly labeled "Advanced" toggles.
Use the API (api) — headless and managed, for shared/enterprise deployments.
Provider API keys are stored encrypted (cirdan secret; AES-256-GCM), GitHub writes
go through a GitHub App (guided manifest onboarding) with short-lived per-repo
installation tokens, and the enterprise security profile is derived automatically:
inherited gh auth and host-spawned CLI agents are refused at config load.
Both pathways end at the same readiness contract — the setup UI banner and
cirdan status --checks render the same table: repair repositories selected (each with a
resolvable repo) · an alert source connected · a routing proof (a sample or live
alert demonstrably resolved to a selected repository and routed to a code pipeline) ·
remediation.mode ∈ {develop, deliver} · a live-probed coding agent · a verified
GitHub write path including access to each selected repo · git on PATH · a
working sandbox runner · the daemon running. Every red row shows the exact fix
command or the setup step that resolves it.
Legacy configs load forever: deployment_mode: single-user reads as cli,
business as api, and the file text migrates on the next setup save.
Configuration
cirdan setup writes cirdan.yaml for you; everything is also hand-editable — see
cirdan.yaml.example. The heart of the file is the
services: registry: the explicit list of services Cirdan may repair, how alerts
resolve to them, and where their code lives.
Alerts resolve to a service by an explicit cirdan_node label, then match_labels,
then a ladder of common labels (service, service_name, app, job,
deployment, statefulset, pod, container, the host of instance,
annotations.service, alertname) matched against names + aliases. There is no
implicit default: an alert that matches nothing opens a triage incident and never
auto-repairs "the only registered repo".
Routing policy. Every alert source flows through one first-match-wins policy:
With no matching rule, an alert that resolves to a registered service with a
resolvable repo defaults to reproduce_and_pr_only at qualifying severity
(responder.severities, default high/critical); everything else fails safe to
triage_only. Pipelines, by decreasing depth: full_remediation ·
reproduce_and_pr_only · lightweight_pr_only · triage_only.
Safety gates (under source_hosts.github and remediation):
A failed deploy or failed production verification stops the delivery at
manual_required, with the failure evidence notified and audited — Cirdan stops
at manual intervention (automatic rollback is deliberately deferred).
Commands
Always ON
The daemon runs supervised loops — access refresh, alert ingestion + incident
detection, delivery, PR-checks watching, @cirdan comment handling, and the Slack
inbox (plus the Socket Mode client and webhook wakers, as configured). A crashing
loop logs and restarts; it never takes the daemon down.
One instance per scope: a second cirdand serve (or cirdan watch) against the same
scope is refused with the running pid. cirdan status / cirdan stop (also available
on cirdand) inspect and shut it down.
Agent integration
Cirdan is also a tool surface for your coding agents: the same engine behind the CLI
is exposed over MCP with exactly six read/evidence tools — list_incidents,
explain_incident, get_recent_errors, get_logs, get_state, and get_audit.
get_logs and get_state take a registered service name (or alias) from
services: and resolve the live container/pod themselves. Everything returned is
redacted.
cirdan install --project is a guided setup that leaves Cirdan running the repair
loop, not just documented:
- detects the agents on your machine (claude/codex/cursor/gemini/vscode/windsurf/opencode/goose config or CLIs) and writes instruction files for exactly those (plus generic
AGENTS.md) - registers the MCP server in
.mcp.json - arms the incident responder so daemon alerts route to your agent
- starts the always-on daemon (detached;
cirdand status/cirdand stop)
Steps 3–4 are prompted (default yes) or driven by flags for scripts:
--responder/--no-responder, --daemon/--no-daemon, --all-platforms. Re-run any of
it later with cirdan setup, which shows each step's current state and only proposes
what's missing. Installs are idempotent and never touch content outside Cirdan's own
marker block.
Supported agents. First-class auto-registration (native instruction file + MCP where the agent supports a writable config) covers Claude Code, Codex, Cursor, Gemini, VS Code (+ GitHub Copilot), Windsurf, Roo Code, Cline, opencode, and Goose. Any other agent works through the generic AGENTS.md + .agents/skills/cirdan/SKILL.md. Auto-detection finds claude/codex/cursor/gemini/vscode/windsurf/opencode/goose; pass --platform roo or --platform cline explicitly (they're VS Code extensions with no CLI to detect, and Cline keeps MCP config in editor storage, so add that one through its UI).
For any MCP client not listed, register Cirdan by hand — no Python required:
HTTP API
With the [api] extra, cirdand serve --http exposes /health, /incidents,
/incidents/{id}, /incidents/{id}/explain, /audit, the alert intake under
/v1/ingest/{grafana|alertmanager|…} (plus /v1/ingest/slack/events and a
signature-verified /v1/ingest/github webhook waker), /v1/slack/interactions, a
minimal OTLP/HTTP JSON receiver at /v1/logs, and the setup UI + API under /setup.
Add --mcp to mount the MCP server at /mcp. State-changing routes are guarded —
see SECURITY.md.
Upgrading
Nothing happens automatically — PyPI is pull-only, so an installed version keeps working as-is until you upgrade. New installs always get the latest release. Upgrading is one command, matching however you installed:
Two operational notes: existing cirdan-out/ artifacts and the SQLite store are compatible across releases so far (a schema-version key + migration will land before 1.0). And the CLI prints a single dim line on stderr when a newer release exists (checked at most once a day, interactive terminals only) — silence it with CIRDAN_NO_UPDATE_CHECK=1.
Upgrading from the mapping releases (≤ 0.9)
Cirdan committed to a single product: the repair workflow. The infrastructure-mapping surface — the graph/exploration commands, runtime profiles, and their artifacts — was removed. Removed commands and what replaces them:
Old configs keep loading: adapters:, enrich:, and profile: keys are accepted and
ignored (profile warns once — Cirdan always runs the repair workflow), and
deployment_mode: single-user/business normalize to cli/api. The [map] and
[terraform] extras are gone from packaging. Old artifacts (infra.graph.json,
INFRA_REPORT.md, infra.html, fingerprint.json, …) simply stop being written —
Cirdan never deletes your files.
Security
Cirdan mirrors the access of the process it runs in and never escalates; everything it writes is redacted and audited. The two postures draw different trust boundaries: "Use the CLI" runs your own logged-in tools with your own permissions, while "Use the API" enforces the enterprise profile (GitHub App + stored keys, no host CLIs). Details — including network behavior and why PRs can only ever target the configured repo — in SECURITY.md.
License
Apache-2.0
来源:README.md,提交 d778cfa
工具
0版本历史
1- v0.9.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分