Skip to main content
MCP server CX Codex

MCP Hook Conformance — Claude Code MCP server: what it does

CLI test harness that audits MCP servers for Claude Code hook compatibility, verifying latency, idempotency, side effects, and determinism.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add hook-conformance -- npx -y mcp-hook-conformance
Open on GitHub

What MCP Hook Conformance does

The harness audits MCP tools before they are attached to Claude Code lifecycle hooks such as Stop or PreCompact. It runs five targeted test suites covering output reproducibility, latency bounds under standard thresholds, floating-point drift, state mutations, and data retention disclosures.

Detecting mutations in read-only tools requires declaring a stateProbe in hook-conformance.config.json. Without that probe, the side-effects suite yields an INDETERMINATE verdict. The audit outputs specific finding codes, which can be examined with the explain command for remediation steps.

What it helps with

  • audit MCP server tools for Claude Code lifecycle hook readiness
  • detect unexpected state changes during read operations
  • measure roundtrip tool execution latency for p50 and p95
  • verify response stability without undocumented timestamps or UUIDs

Example prompts for the agent

  • Run audit suites using config file ./hook-conformance.config.json
  • Scaffold a fresh config file for my-mcp-server
  • Explain finding code IDEMP-001 and suggest fixes

How to install MCP Hook Conformance

Platform CLI

claude mcp add hook-conformance -- npx -y mcp-hook-conformance

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about MCP Hook Conformance

How to install MCP Hook Conformance in Claude Code?

Run claude mcp add mcp-hook-conformance -- npx -y mcp-hook-conformance in your command line. Alternatively, run the test directly via npx mcp-hook-conformance check ./hook-conformance.config.json.

What does MCP Hook Conformance audit?

It checks MCP tools against idempotency, latency limits, determinism, data retention docs, and side effects when run inside Claude Code lifecycle hooks.

What is required to test for side effects?

You must specify a stateProbe in hook-conformance.config.json. If no probe is declared, the side-effect check evaluates to INDETERMINATE.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor