Doublecheck
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ops —— 能签字的运维动作
每个动作都自带 前置条件 / 步骤 / 后置断言 / 回滚。 目标不是「更强的 shell」,而是**「agent 可以放心调用的动词」**。
为什么
2026-11-25 的真实事故:Mac 上 DSH 进程还在,但 3093 端口没监听,
tailscale serve 一直返回 502,手机端完全连不上——进程活着不等于服务活着。
这类坑的共同点是:动手前没检查前提,做完没验证结果。 所以每个动作必须回答三个问题:
凭什么现在能做?(前置条件)
做完怎么算成功?(后置断言)
失败退到哪?(回滚)
Related MCP server: EPOCH-MCP
用法
python3 ops.py list # 有哪些动作
python3 ops.py plan service.restart # 只看:前置条件过不过、会执行什么
python3 ops.py call service.restart # 演练(不加 --yes 不执行)
python3 ops.py call service.restart --yes
python3 ops.py verify cert.verify # 只跑后置断言
python3 ops.py lint # 校验动作定义(CI 用)plan 是这个工具的核心:它必须先告诉人「现在能不能做、会做什么」,再决定做不做。
动作长什么样
schemaVersion: 1
action: service.restart
summary: 重启一个 systemd 服务,并确认端口和 HTTP 真的恢复
incident: |
2026-11-25:Mac 上 DSH 进程还在,但 3093 端口没监听,
tailscale serve 一直返回 502,手机端完全连不上。
params:
unit: dsh-web.service
port: 3080
preconditions:
- kind: unit.exists
unit: "{{unit}}"
- kind: disk.free_mb_gt
mb: 200
steps:
- kind: systemd.restart
unit: "{{unit}}"
postconditions:
- kind: port.listening
port: "{{port}}"
- kind: http.status
url: "http://127.0.0.1:{{port}}/"
expect: [200, 401]
rollback:
- kind: systemd.start
unit: "{{unit}}"incident 是必填的:每个动作都必须能追溯到一次真实事故或明确需求。
写不出 incident 的动作,说明还不清楚它防的是什么。
现有的断言与步骤
断言 | 用途 |
| systemd unit 是否存在 |
| 服务是否 active |
| 端口状态 |
| 端点返回码是否在预期集合里 |
| 磁盘余量 |
| 路径是否存在 |
| 证书剩余天数(走真实 TLS 握手) |
| 任意命令退出码为 0 |
步骤 | 用途 |
| 服务操作(走 busctl,不用 systemctl) |
| 执行命令 |
| 只清理白名单目录 |
| 只读动作占位 |
CI 闸门
bash ci/check.sh所有动作过
lint(必填字段、未知断言、缺后置断言都要报错)只读动作跑一遍
verify,必须真的通过变更类动作只跑
plan,不执行
路线
v0.1:5 个动作、9 种断言、CI 闸门
负例测试(每个断言要证明自己抓得住违规)
registry(按栈分类、可检索)
MCP server 封装
服务端判定(规则下发端 + 客户端采集)
MCP / 插件
node mcp/server.mjs # stdio MCP server客户端配置(Claude Code / Cursor / 任何 MCP 客户端):
"doublecheck": { "command": "node", "args": ["/root/ops/mcp/server.mjs"] }暴露四个工具:dc_list / dc_plan / dc_call / dc_verify。
instructions 里写死了一条契约:先 plan 再 call,call 完必须 verify。
反馈闭环(本地沉淀 → 中央聚合)
dc call/verify ──写──► ~/.doublecheck/evidence.jsonl (本地队列)
dc contribute ──► ~/.doublecheck/inbox/ (本地收件箱)
dc sync ──► DASH_URL/v1/evidence (上报,成功后归档本地队列)本地服务用于验证(之后平移到 Cloudflare Workers + D1):
node mcp/dash.mjs 8790 # GET /v1/actions, POST /v1/evidence, GET /v1/stats
DASH_URL=http://127.0.0.1:8790 ./dc sync设计约束:
证据只含:动作 id、结果、耗时、参数键名。不含主机名、路径内容、输出原文
离线优先:上报失败不影响执行,队列留在本地
不自动合并:contribute 只是投递,是否入库由中央 CI 决定
按场景装(stack)
100 个动作不用一次全装。四个包:
dc stack # 看每个包有多少条
dc pull --stack commit # 提交前(55 条)
dc pull --stack release # 发版(14 条)
dc pull --stack ops # 服务器与网络体检(28 条)
dc pull --stack all # 全部每个动作在 manifest 里有四个维度和它属于哪个阶段,WORKFLOW.md 是从这些元数据自动生成的
「什么时候该跑哪条」索引——不要手改,跑 python3 tools/gen-workflow.py 重新生成。
插件清单
plugin.json 遵循 agent-plugins.org 的 schema,
声明了本仓库的 MCP server:
"extensions": { "mcpServers": { "doublecheck": { "command": "doublecheck-mcp" } } }相关项目
MiniMax-AI/mcode-stack:把团队在 AI 编程里 的判断写成 Skill。它的
taste-to-checks说得很准——「AGENTS.md里的文字会被读、也会被忽略, 失败的检查不会」。我们就是那个「检查」的落点:他们负责判断,我们负责执行与验证。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Preflight, approve, and prove consequential agent actions with signed evidence and x402 tools.
Workflow planning, recovery checkpoints, coordination, fixtures, and compatibility tools for agents.
A read-only verified record of agent-operable GTM tools: search, fetch, compare, track changes.
Scoped agent execution. Server-side credentials, policy, budgets and verifiable receipts.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to safely inspect and execute version-controlled operational runbooks with policy checks, dry-run planning, and out-of-band approvals.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to drive governed software changes, measure trajectory and boundary integrity after each mutation, surface drift and invariants, investigate incidents, and compare counterfactual futures before approving a change.3MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to invoke registry-governed, fail-closed tools such as requesting child tasks in other domains, reporting results, querying a domain's context and contracts, and submitting or approving plans. All work is gated on real evidence (analysis, independent review, actual test runs), so a task can never be marked done without proof.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to discover and invoke versioned external tools through an MCP or REST gateway with authentication, authorization, mutation safety, reliability controls, audit logging, and replay.Apache 2.0