MCP Hook Conformance
Test harness CLI for Claude Code v2.1.118 hooks
Audits any MCP server for mcp_tool lifecycle-hook readiness: idempotency, latency, determinism, side-effects, GDPR-doc. 56/56 tests, MIT.
What it solves
A hook fires at moments where the user is waiting and cannot intervene: at a stop, before a compaction, on a prompt submission. A tool that is fine to call by hand can be a bad idea there, because it is slow, because it is not idempotent, or because a supposedly read-only call quietly changes state. The question is not whether the tool works, it is whether it is safe to call from a hook.
How it works
Five audit suites with weights. Idempotency calls the same input several times and checks the output is the same, with unannotated identifiers and timestamps counting against it. Side effects check that a read-only tool really does not mutate server state, which needs a state probe in the config. Latency samples five calls after a warmup against a p50 and p95 budget. Determinism looks for a stable response shape and float drift. And a data-protection suite checks whether the tool description says anything about data flow, retention and deletion. Every suite scores, the tool score is the weighted average and the aggregate is the mean across tools.
When to use it
Run it before you wire any tool into a hook, and rerun it when the tool changes. It is the third of three questions the foundation tools answer: one asks whether the server speaks the protocol, one asks who signed it, and this one asks whether it belongs in a hook.
When not to use it
The side-effect suite needs a state probe you have to write yourself, and without it that part cannot conclude anything. The data-protection check is a whole-word heuristic over the tool description, so it notices whether the topic is mentioned, not whether the statement is true. Read it as a checklist, not as a compliance certificate.
Stars
★ 0
installs
↓ 1,472
Clones (14d)
⊟ 100
Language
TypeScript
Updated
2026-08-21
Install
npx -y mcp-hook-conformance