gavel-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gavel-mcpCold-runnpm testas the acceptance command and report the verdict."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gavel-mcp
The gavel acceptance oracle as an MCP server: one tool that turns an
agent's "done" into a receipt. gavel_acceptance cold-runs a command
and reports the exit code. Exit code 0 is the only passing verdict.
Setup
1. Build
Requires Node ≥ 20 and git.
cd gavel-mcp
npm install
npm run build # → dist/index.jsdist/ is gitignored — every fresh clone needs this step before the
server can start.
2. Wire it into ZCode
Two scopes; both auto-connect at session start.
Workspace scope — versioned with the repo, shared with the team.
Create <repo>/.zcode/config.json:
{
"mcp": {
"servers": {
"gavel": {
"command": "node",
"args": ["/ABS/PATH/TO/gavel-mcp/dist/index.js"]
}
}
}
}User scope — applies to every workspace. Put the same
mcp.servers object in ~/.zcode/cli/config.json, and pair it with
the acceptance rule (section 5) in ~/.zcode/AGENTS.md so every
session knows when to call the tool, not just how.
A user-scope install pins every workspace to this machine's build:
After changing
src/, runnpm run build— other sessions keep loading the olddist/until you do.Moving or deleting the repo directory breaks every session at once.
Works from a git remote today — no registry needed. The prepare
script builds dist/ on install, so npx handles the rest:
{
"command": "npx",
"args": ["-y", "github:newlix/gavel-mcp#v0.5.0"]
}Pin a tag (#v0.5.0) to make the npx cache stable; without one you
track the default branch and cache refresh is at npx's discretion.
First start on a machine pays a one-time clone + install + build.
Once published to npm, ["-y", "gavel-mcp"] is equivalent and skips
the git requirement. Any other MCP host works too; only the config
shape differs.
3. Restart the session
MCP servers connect at session start. An already-running session will not pick the server up.
4. Verify
ZCode: Settings → MCP shows
gavelconnected.Or simply ask the agent to call
gavel_acceptancewithcmd: "test -d ."— expectverdict=pass exit=0.
5. The rule (AGENTS.md)
The tool is the structure; the rule tells the agent when to use it.
Drop this into <repo>/AGENTS.md:
## Acceptance
- Done = `gavel_acceptance` returned exit 0. One self-contained
command, cold from the repo root; report the verdict and the
command itself — never a paraphrase of test results.
- The command asserts intent (what should happen), not the
implementation.
- `refused` means it never ran. Report it verbatim.For user-scope installs, the same block goes in ~/.zcode/AGENTS.md
instead — user instructions load first, so a repo's own AGENTS.md can
still narrow the rule per project.
Related MCP server: Spec Kit Acceptance Gate MCP
The contract
The oracle never trusts a paraphrased result — it runs the command itself, so a red acceptance cannot be narrated green. Two structural layers, cheapest first:
Lint (
src/lint.ts): a command that cannot fail (true,exit 0, bare echo/printf,x && truewith no real check in it) is refused before execution —passed: false,refused: <reason>, no receipt minted. The Go linter's syntax and destructive-pattern checks are deliberately dropped: syntax fails identically when executed, and policing dangerous commands is the host permission layer's job, not the verdict layer's.Cold run (
src/runner.ts): the command runs via the platform shell from the project root; exit code 0 is the only pass. Signal deaths report 128+signal, spawn failure -1, command-not-found 127.
Receipt semantics: refused = never executed. Report it verbatim.
Tools
gavel_acceptance(cmd, cwd?, timeout_sec?)
→ { passed, exit_code, duration_ms, refused, output }
output: merged stdout+stderr, raw; head+tail with a marker when longer than ~20 KB.A timeout kills the whole process tree and fails the run.
Troubleshooting
Server not connected (Settings → MCP shows an error): the dist path is wrong or
npm run buildwas skipped. The path must be absolute and point atdist/index.js.exit_code: 127: the acceptance command itself was not found.
Dev
npm install
npm test # node:test via tsx (24 tests)
npm run build # tsc → dist/Layout: src/index.ts is the thin stdio bootstrap; the MCP surface
(buildServer) lives in src/server.ts so tests can drive it
in-process over InMemoryTransport plus one cold stdio smoke via
tsx. The manual smoke below is the same exchange the stdio test runs.
Manual smoke (MCP stdio is newline-delimited JSON):
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"gavel_acceptance","arguments":{"cmd":"test -d ."}}}' \
| node dist/index.jsAvailable Tools
1 toolgavel_acceptanceA
Run an acceptance command cold and report the mechanical verdict. The command must be one self-contained shell command; it runs from the project root via the platform shell. Exit code 0 is the only passing verdict — never paraphrase or pre-empt it. Signal deaths report 128+signal; a spawn failure reports -1; 127 means the command was not found. Output is raw merged stdout+stderr (head+tail when truncated).
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | Yes | Self-contained acceptance command, e.g. `go test ./...` or `make check`. Must assert intent, not recapitulate the implementation. | |
| cwd | No | Absolute working directory. Default: the server's cwd (hosts spawn it at the workspace root). | |
| timeout_sec | No | Kill the run after this many seconds (default 600). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does so thoroughly. It discloses exit-code semantics (0 = pass, 128+signal = signal death, -1 = spawn failure, 127 = not found), raw merged stdout+stderr, truncation behavior, and the 'cold'/mechanical nature of the run. This goes well beyond a generic 'run a command' statement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is dense but well-organized and front-loaded: the core action appears first, followed by the necessary command constraint, verdict semantics, and output details. Every sentence earns its place; there is no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no output schema and no annotations, the description fully covers what an agent needs to invoke the tool correctly: command format, working directory, exit-code interpretation, and output shape. It is complete for the tool's complexity and parameter set.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and every parameter (cmd, cwd, timeout_sec) is already documented in the schema with type, constraints, and defaults. The tool description mainly reinforces that the command must be self-contained, which adds marginal value but does not improve on the schema's parameter-level explanations.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Run an acceptance command cold and report the mechanical verdict.' It makes clear this is a command-execution tool focused on acceptance verification, and the absence of sibling tools means there is no risk of confusion with alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives concrete usage constraints: the command must be a single self-contained shell command, runs from the project root, and the agent must not paraphrase or pre-empt the exit-code verdict. With no sibling tools listed, there is no alternative-routing guidance needed, but the when-and-how guidance is otherwise strong.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.5.0- First observed
gavel_acceptance
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of an agent confusing it with another. Its purpose is clearly distinct by default.
With a single tool there are no conflicting conventions to penalize. The name gavel_acceptance is clear and follows snake_case, though it is noun-oriented rather than a verb_noun pattern.
One tool is minimal, but the server appears purpose-built for a single acceptance action, so the count is slightly under the typical range yet reasonable for the stated scope.
The tool fully covers the server's apparent purpose: running an acceptance command and returning a mechanical verdict with well-specified exit-code and output handling. No obvious operations are missing for this narrow domain.
Maintenance
Related MCP Connectors
Verify work against acceptance criteria; signed receipts attest what passed and was earned.
Deterministic authorization for one proposed AI agent action, returned with a signed receipt.
Hand off AI work with a signed Verification Receipt — an independent verifier proves it runs.
Cryptographically anchored evidence for agents: verified run receipts, proof-gated settlement.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables acceptance gates for AI coding-agent runs by recording evidence, running deterministic validation, applying a quality gate, and rendering auditable outcomes.7Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables spec-driven development acceptance gate with structured receipts, audit logs, and reviewer-ready evidence.-
- FlicenseNot gradedqualityBmaintenanceEnables coding agents to submit a public preview URL and acceptance stories for independent QA, returning pass/fail evidence packs with screenshots and supporting human notes on failures.-
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to replace self-reported done checkboxes with verified, evidence-based completion tracking, using automated FAIL_TO_PASS/PASS_TO_PASS tests, mandatory mutation checking, and explicit human/AI reviews when automated proof is impossible.1MIT