mcpField
A
AgenticRail Gate - sequence enforcement and verifiable audit receipts for AI agent compliance

AgenticRail Gate - sequence enforcement and verifiable audit receipts for AI agent compliance

Remote
agenticrail.nzAI & Agents0Updated 5w ago

About AgenticRail Gate - sequence enforcement and verifiable audit receipts for AI agent compliance

AgenticRail Gate is an MCP adapter for deterministic enforcement of AI agent step sequences. It checks each step before execution and provides signed receipts and verification reports for compliance auditing.

Key features

  1. 01Allow or deny steps before execution
  2. 02Enforce declared step order
  3. 03Reject skipped and replayed steps
  4. 04Create signed sequence receipts
  5. 05Verify receipt-chain integrity

Use cases

  1. 01Enforce ordered steps in agent workflows
  2. 02Prevent execution of skipped or replayed steps
  3. 03Audit allow and deny decisions
  4. 04Verify a completed sequence's receipt chain

MCP support

Exposes AgenticRail enforcement through the `evaluate_step` and `verify_receipt` tools. It uses a stateless Streamable HTTP endpoint.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://mcp.agenticrail.nz/
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

2
ParameterTypeRequiredDescription
stepstringYesThe step being attempted, e.g. 'intake' or 'review_and_sign'. This is a NAME, not a description. It must be spelled identically on every call, must appear in step_order (for custom sequences), and must equal `function`. The gate compares it byte for byte, so a sentence that changes with the subject can never match and is denied UNKNOWN_STEP. Put the human-readable sentence in `action` instead.
noncestringNoOptional unique-per-step UUID for replay protection. Generated automatically if omitted.
actionstringNoOptional human-readable label for the action.
inputsobjectNoOptional free-form context for the step. NOT stored in the receipt: the receipt keeps only a SHA-256 hash of the whole request. Put anything that must be kept as evidence in `attestation` instead (published verbatim; world-readable on the anonymous demo lane).
functionstringNoDefaults to `step`. The rule step === function always holds.
step_orderarrayNoThe full ordered list of step names for a CUSTOM sequence. Send it on every call, IDENTICAL each time. Omit only if using AgenticRail's built-in MSMD spine. It is LOCKED on the sequence's first call: a different list later is DENIED with STEP_ORDER_MISMATCH, and that denial returns locked_step_order - the list this sequence is held to. Do NOT try to clear the lock by omitting this field; that selects the MSMD spine and your steps will come back UNKNOWN_STEP. To change the plan, start a new sequence_id. One step is a valid sequence. An UNKNOWN_STEP denial returns expected_step_order (the list your step had to be in) and step_order_source ('caller' or 'msmd_spine'); msmd_spine means you sent no step_order at all and got the built-in spine.
action_typeenumYesThe action class for this step. The whole vocabulary is exactly these eight and nothing else is accepted: CHECK_STATE, CLARIFY_NEXT_STEP, SELECT_NEXT_STEP, RECORD_RESULT, WAIT_FOR_SIGNAL, VALIDATE_INPUT, PAUSE_CYCLE, REDUCE_STIMULUS. These are ENFORCEMENT CLASSES, NOT a description of what your step does. READ, QUERY, LOOKUP, SEARCH, EXECUTE, ANALYZE and TOOL_CALL are the most common wrong guesses and every one of them is denied: a step that searches, drafts, queries or analyses is still CHECK_STATE if it reads state, or RECORD_RESULT if it writes an outcome. EACH STEP THEN ACCEPTS ONLY A SUBSET of the eight - e.g. intake takes VALIDATE_INPUT, CHECK_STATE or CLARIFY_NEXT_STEP and nothing else. A wrong one is DENIED with ACTION_NOT_ALLOWED before your step runs, and that denial returns allowed_action_types listing exactly what the step would have accepted - read it and retry rather than guessing. A denial does not spoil the sequence and runs nothing.CHECK_STATE | CLARIFY_NEXT_STEP | SELECT_NEXT_STEP | RECORD_RESULT | WAIT_FOR_SIGNAL | VALIDATE_INPUT | PAUSE_CYCLE | REDUCE_STIMULUS
sequence_idstringYesStable identifier for this run of the sequence. Reuse it across every step of the same sequence. An anonymous call is rewritten to 'demo-mcp-<your id>' and an authenticated demo call to 'demo-<your id>'; take the id back from the response and use that one from then on. Give every RUN a fresh id - a run, not an attempt: sealing is permanent, and on the shared demo lane a fixed id is shared with everyone else. A DENIED step does not spoil a sequence and does not run anything, so a denial is not a reason to start a new one: fix the call instead.

Details

From the project README

agenticrail-mcp

A Model Context Protocol server that exposes the live AgenticRail enforcement gate to any MCP client as two tools.

AgenticRail is a deterministic enforcement layer for AI agents: it holds an agent to its declared step order, refuses replays and skipped steps, and seals each completed sequence with a signed receipt. This server is the MCP adapter in front of it.

In the words the problem usually gets asked in: it is a policy enforcement point for AI agent tool calls. It catches skipped steps and procedural hallucination (an agent reporting success on a step that never ran) by refusing the out-of-order step before it runs, and every decision, ALLOW or DENY, becomes a tamper-evident audit trail entry.

Endpoint: https://mcp.agenticrail.nz/ (Streamable HTTP, stateless) Protocol: 2026-07-28 — the revision that retired the initialize exchange and Mcp-Session-Id. This server was built stateless with neither, so it needed no migration. initialize is still answered for older clients. Registry: nz.agenticrail/gate on the official MCP registry

Tools

ToolWhat it doesCalls
evaluate_stepALLOW/DENY a single agent step before it runs; seals a signed receiptPOST https://api.agenticrail.nz/v1/evaluate
verify_receiptFetch a sequence's verification report; confirm the receipt chain is intactPOST https://report.agenticrail.nz/report

Call evaluate_step before running each step of a sequence, and do not run a step the gate DENYs.

A DENY tells you how to fix it

Every refusal carries its own remedy in the response envelope — unsigned, DENY-only, because it describes the sequence's state now rather than the decision that was made:

refusalwhat comes back
ACTION_NOT_ALLOWEDallowed_action_types — exactly what this step would have accepted
SEQUENCE_VIOLATIONnext_expected_step — the step the sequence is waiting for
STEP_ORDER_MISMATCHlocked_step_order — the order this sequence was locked to on its first call
UNKNOWN_STEPexpected_step_order + step_order_source (caller or msmd_spine)

action_type is an enum of exactly eight values, and each step accepts only a subset. The enum in the tool schema is a hint, not a control — it binds only a client that validates its own arguments, and an invented verb is by far the most common first refusal: READ, QUERY, TOOL_CALL, LOOKUP, EXECUTE and the like are not action types, however well they describe your step. The gate is the control. When it refuses, allowed_action_types comes back carrying the ones this step would have taken.

A refused call locks nothing. A denial is answered before the sequence store is written to, so the run is not spoiled: the call was wrong, not the sequence. Correct the field the denial names and send the step again. The lock is set only by actually sending a step_order on a call that is allowed; from then on that list is enforced and a different one is refused with STEP_ORDER_MISMATCH. Omitting step_order sets no lock at all — it means only that this call is judged against the built-in MSMD spine, whose step names are almost certainly not yours.

So if your process has its own step names, send step_order with those names and the gate will enforce your order instead. One step is a valid sequence.

Connect

In Claude Code:

# zero config — uses the public demo key
claude mcp add --transport http agenticrail https://mcp.agenticrail.nz/

# with your own key
claude mcp add --transport http agenticrail https://mcp.agenticrail.nz/ \
  --header "Authorization: Bearer <your-agenticrail-key>"

Any Streamable-HTTP MCP client works — point it at the URL.

Try it without installing anything

BASE=https://mcp.agenticrail.nz/

curl -s -X POST "$BASE" -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq .

# ⚠️ Use a sequence_id nobody else will pick. On the shared demo key the id is
# GLOBAL and sealing is PERMANENT — a fixed one in an example works once for one
# person on earth and returns SEALED_SEQUENCE for everyone after.
SEQ="mcp-smoke-$(date +%s)-$RANDOM"

curl -s -X POST "$BASE" -H 'content-type: application/json' \
  -d "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{
        \"name\":\"evaluate_step\",
        \"arguments\":{\"sequence_id\":\"$SEQ\",\"step\":\"intake\",
                       \"action_type\":\"CHECK_STATE\"}}}" | jq .

With no Authorization header the public demo key is used and your sequence_id comes back rewritten to demo-mcp-<your id> — demo- marks the public lane, mcp- marks it as anonymous MCP traffic. Use the id returned in the response from then on; the one you sent will not resolve. This is intended, not a leak.

A demo- sequence's report needs no key to read, so treat anything you send on it as public.

Design — read before changing

  • Protocol adapter only. This worker holds no internal secrets and has no privileged path to the enforcement core. It calls the same public API an external caller uses, so the tool logic is decoupled from AgenticRail's internals and from the MCP transport version.
  • Service bindings, not fetch. mcp.agenticrail.nz is on the same zone as api. and report., so a plain fetch() would be a same-zone loopback (Cloudflare error 1002). The bindings hit the identical public handlers — they are not an internal bypass.
  • Stateless Streamable HTTP. No Mcp-Session-Id is issued or required; every POST is self-contained. The transport shell is handleRpc + the fetch handler — the only part a spec revision touches. The value-bearing calls (callEvaluate / callVerify) are plain HTTPS and don't change.
  • GET / serves the discovery card; every other GET path 404s. POST is left permissive on purpose so a client that appends a path to the endpoint URL still works.
  • A 404 on /.well-known/oauth-* is correct — it is how an MCP server says no auth required. agent.json, agent-card.json, x402 and ai-plugin.json are protocols this server does not implement; answering them would be a claim.

Deploy

npx wrangler deploy

Links


Operated by TUARA KURI LIMITED (NZBN 9429053582867), Hokianga, Aotearoa New Zealand.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.