agent-gate
An MCP server that enforces fail-closed deterministic checks, independent refute-first review, and tamper-evident hash-chained receipts for AI agent outputs before claiming completion.
README

agent-gate
An MCP server that lets an AI agent gate its own work before it claims "done" — deterministic checks → independent refute-first review → a tamper-evident honest receipt.
Agents that grade their own homework ship slop. agent-gate turns that discipline into tools an agent must actually pass: a fail-closed checklist and an append-only, hash-chained receipts ledger. It's Fleet Mode — my agent-orchestration doctrine — made into a runnable tool. Receipts over hype, enforced by the data structures.
agent: "done!" → verify_gate(evidence) → { passed: false, blocking: ["independent_refute_review", "no_secrets"] }
Why
The expensive failures in agent systems are the silent ones: a model update degrades output, a change quietly breaks a workflow, an agent declares success while the work is wrong. The fix isn't a smarter model — it's a gate the agent can't talk its way past:
- Fail-closed. A check counts as satisfied only if it's explicitly true. Missing proof is not proof. (Mirrors a promotion gate, not a vibe check.)
- Tamper-evident receipts. Every decision is recorded as
(decision, metric, value, verdict)linked into a sha256 chain. Edit or delete any past receipt andverify_chain()returns false. The honest log is enforced by the structure, not by good intentions. - Human-gated by default. "Any irreversible/outward act got human approval" is a required check — agents draft, humans approve.
Tools (over MCP)
| Tool | What it does |
|---|---|
gate_checklist(name="ship") |
Returns the checklist the agent must satisfy before claiming done. |
verify_gate(evidence, name="ship") |
Evaluates evidence fail-closed → {passed, blocking}. |
record_receipt(decision, metric, value, verdict) |
Appends an honest, hash-chained receipt; returns it. |
read_receipts() |
Returns every receipt + whether the chain is intact. |
The default ship gate encodes Fleet Mode: deterministic_checks_pass, independent_refute_review, no_secrets, human_gated_if_irreversible, honest_receipt_logged.
Install & wire into an MCP client
pip install -e . # or: pip install agent-gate
Add it to your MCP client (Claude Desktop / Claude Code) config:
{
"mcpServers": {
"agent-gate": { "command": "python", "args": ["-m", "agent_gate.server"] }
}
}
Now your agent can call verify_gate(...) before it tells you it's finished — and you get a tamper-evident trail of what it decided. Receipts persist to ~/.agent-gate/receipts.jsonl (override with AGENT_GATE_LEDGER).
Use it directly (no MCP client needed)
from agent_gate.gate import DEFAULT_SHIP_GATE
from agent_gate.ledger import Ledger
res = DEFAULT_SHIP_GATE.evaluate({
"deterministic_checks_pass": True,
"independent_refute_review": True,
"no_secrets": True,
"human_gated_if_irreversible": True,
# honest_receipt_logged missing → fail-closed
})
print(res.passed, res.blocking) # False ['honest_receipt_logged']
led = Ledger("receipts.jsonl")
led.append(decision="ship v0.1", metric="tests", value="17", verdict="shipped")
print(led.verify_chain()) # True (until someone edits the log)
Design
- Tested, dependency-free core.
agent_gate/gate.py(fail-closed checklist) andagent_gate/ledger.py(hash-chained receipts) are pure stdlib — fast to read, fast to trust.agent_gate/server.pyis a thin MCP adapter over them. - 17 tests, CI on Python 3.11–3.13. The MCP tools are tested by calling them, not just importing.
Tests
pip install -e ".[dev]" && python -m pytest -q
About
Built by Jeff Otterson (Jott2121). agent-gate operationalizes the gating discipline from bow (an autonomous all-Claude chief-of-staff agent) and the Fleet Mode doctrine. MIT licensed.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。