MCP Hook Conformance

io.studiomeyerPublished by studiomeyer.iov0.1.3Updated Oct 24, 2026

Audits MCP servers for Claude Code mcp_tool hook readiness: idempotency, latency, side-effects.

The publisher's own server: StudioMeyer Crew

VerifiedSTDIODesktop onlyDeveloper ToolsSecurity & Monitoring

Overview

AI-generated overview

A local CLI test harness that audits MCP servers for Claude Code mcp_tool hook readiness, checking idempotency, latency, side effects and determinism.

What you can do
Run audits against a configured MCP server and emit human, JSON or JUnit reports with weighted scores and finding codes, plus exit codes for pass, fail or config error. Scaffold an example configuration file and explain individual finding codes with remediation guidance. Check idempotency, determinism, latency budgets, read-only side effects via state probes, and documentation of data flow and retention. Note that it is a CLI, not an MCP server, and does not speak MCP itself.
When to use it
Useful when you maintain or review an MCP server and want to know whether its tools are safe to call from Claude Code lifecycle hooks such as Stop, PreCompact or UserPromptSubmit. Also handy for adding repeatable conformance checks to a CI pipeline.
Requirements
Runs locally as an npm package (Node.js 20 or newer) via global install or npx. Needs a JSON config pointing at the target server's command, args and environment, plus optional probes and thresholds. No authentication or API keys are declared. Targets Claude Code 2.1.118 or newer and MCP spec 2025-06-18; stdio is primary, HTTP streamable is experimental.
Before you install
The audit launches the target server with the command and environment you configure, so it runs that server's code on your machine. Side-effect detection is not hermetic and returns INDETERMINATE without a state probe; latency includes JSON-RPC framing; the data-protection suite is only a keyword heuristic and not legal advice. It reports findings but does not fix them.

Installation

In SourceWeft

  1. Open MCP Hook Conformance in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Part of the StudioMeyer MCP Stack — Built in Mallorca 🌴 · ⭐ if you use it

mcp-hook-conformance

[npm version] [npm downloads] [License] [Last commit] [GitHub stars]

Test-harness CLI that audits any MCP server for Claude Code v2.1.118 `mcp_tool` lifecycle-hook readiness.

The third foundation pillar:

  • mcp-protocol-conformance says: does the server speak the protocol?
  • mcp-server-attestation says: who signed this server?
  • mcp-hook-conformance says: is it safe to call this tool from a Stop, PreCompact, or UserPromptSubmit hook?

A note from us

We have been building tools and systems for ourselves for the past two years. The fact that this repo is small and has few stars is not because it is new. It is because we only just decided to share what we have built. It is not a fresh experiment, it is a long story with a recent commit.

We love building things and sharing them. We do not love social media tactics, growth hacks, or chasing stars and followers. So this repo is small. The code is real, it gets used, issues get answered. Judge for yourself.

If it helps you, sharing, testing, and feedback help us. If it could be better, an issue is more useful. If you build something with it, tell us at [email protected]. That genuinely makes our day.

From a small studio in Palma de Mallorca.

Install

bash
npm install -g mcp-hook-conformance

Or run without install:

bash
npx mcp-hook-conformance check ./hook-conformance.config.json

Quick start

bash
# 1. Scaffold a confignpx mcp-hook-conformance init --server-name my-mcp-server
# 2. Edit hook-conformance.config.json (point command/args at your server)
# 3. Run the auditnpx mcp-hook-conformance check ./hook-conformance.config.json

Exit codes:

  • 0 audit passed (no FAILs)
  • 1 audit produced at least one FAIL
  • 2 config error (missing file, invalid schema, unknown suite name)

Subcommands

SubcommandArgsDescription
check<config-path> [--output=human|json|junit] [--suite=...] [--tool=<name>] [--tries=<n>]Run audit; emits report to stdout.
init[--server-name=<name>] [--force]Write example hook-conformance.config.json to cwd.
explain<finding-code>Print full explanation and remediation for a finding (e.g. IDEMP-001).
version-info—Print tool version and supported MCP-spec range. (Alias: version.)

This is a CLI, not an MCP server. Do NOT run mcp-hook-conformance via mcp-inspector — the package declares mcp.specVersion for the targets it audits, not because it speaks MCP itself. Inspector will EACCES on dist/index.js (which is the library export) by design.

Audit suites

SuiteWhat it checksWeight
idempotencySame input N times produces same output, no UUIDs/timestamps unless annotated.30
side-effectsRead-only tools must not mutate server state. Requires stateProbe config.25
latencyp50 < 30s, p95 < 60s (configurable). 5 samples after 1 warmup call.20
determinismResponse shape stable across calls; no float drift.15
dsgvoTool description mentions data flow / retention / deletion (whole-word heuristic).10

Suite scoring: PASS = 100, WARN = 60, INDETERMINATE = 50, FAIL = 0. Tool score = weighted average across configured suites. Aggregate score = mean of tool scores.

Config format

json
{  "$schema": "https://studiomeyer-io.github.io/mcp-hook-conformance/config.schema.json",  "server": {    "name": "my-mcp-server",    "transport": "stdio",    "command": "npx",    "args": ["-y", "my-mcp-server"],    "env": {}  },  "suites": ["idempotency", "latency", "determinism", "side-effects", "dsgvo"],  "tries": 3,  "thresholds": {    "latencyP50Ms": 30000,    "latencyP95Ms": 60000  },  "probes": [    {      "name": "search_things",      "args": { "query": "audit-fixed-input" },      "stateProbe": {        "tool": "list_things",        "args": {}      }    }  ],  "toolFilter": ["search_things", "get_thing"]}

probes lets you pin specific arguments per tool and (for read-only tools) a stateProbe so the side-effects suite can detect mutations. Without a stateProbe the side-effects suite returns INDETERMINATE for that tool.

Finding codes

CodeSuiteSeverityTitle
IDEMP-001idempotencyFAILTool output diverges across identical calls
IDEMP-002idempotencyWARNResponse contains timestamps without nondeterministic annotation
IDEMP-003idempotencyWARNResponse contains UUID/random IDs without nondeterministic annotation
LAT-001latencyFAILTool exceeded p95 latency budget
LAT-002latencyWARNTool p50 latency above 30 seconds
DET-001determinismFAILFloating-point output drift between calls
DET-002determinismWARNResponse shape varies between calls
SIDE-001side-effectsFAILRead-only tool produced state delta
SIDE-002side-effectsINDETERMINATENo state-probe configured for side-effect detection
DSGVO-001dsgvoFAILDestructive tool lacks deletion / retention documentation
DSGVO-002dsgvoWARNTool description missing data-flow keywords

Run mcp-hook-conformance explain <code> for full remediation text.

Compatibility

ComponentVersion
MCP spec2025-06-18
Claude Code>= 2.1.118 (mcp_tool lifecycle hooks)
Node>= 20.0.0
@modelcontextprotocol/sdk^1.29.0

Tested transports:

  • stdio (primary)
  • HTTP streamable (experimental, audit semantics same as stdio)

Reference smoke tests

The tests/smoke/ suite runs the audit against production tenants of mcp-nex and mcp-crm. Opt-in:

bash
RUN_SMOKE_TESTS=1 npm run test:smoke

Snapshot drift triggers a manual review, not a CI fail.

Limitations (read these)

  • Side-effect detection is not hermetic. Without a stateProbe we cannot black-box prove a read-only tool is pure. We return INDETERMINATE instead of false-positive FAIL.
  • Latency is end-to-end stdio roundtrip. Includes JSON-RPC framing, not pure compute.
  • DSGVO suite is keyword heuristic. It catches missing docs reliably; "looks compliant" is not legal advice.
  • No auto-fix. This tool reports findings; you fix them.

About StudioMeyer

StudioMeyer is an AI and design studio based in Palma de Mallorca, working with clients worldwide. We build custom websites and AI infrastructure for small and medium businesses. Production stack on Claude Agent SDK, MCP and n8n, with Sentry, Langfuse and LangGraph for observability and an in-house guard layer.

License

MIT © 2026 Matthias Meyer (StudioMeyer)

Source: README.md at commit fcf25e9

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.3LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Studiomeyer integrations