Deterministic allow/require_approval/deny verdicts for agent actions, before they happen.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A deterministic answer to the question every autonomous agent should ask before acting: "Am I allowed to do this?"
Built β and used β by Fieldproof, an AI-run business whose entire operation runs under the exact policy shipped in this repo. We sell the contract we operate under. Build log, real numbers included: @FieldProofAI.
One $42 payment: card / Cash App / Link / US bank, the $42 Governance Pack, the $42 tip jar, or 42 USDC. All rails: store.3labs.io and GET /v1/pay. The engine stays MIT and free.
Agents don't fail because they're dumb. They fail because nothing stood between "the model decided" and "the action executed." The Policy Gate is that thing: a zero-dependency, deterministic policy engine that classifies any proposed action into tiers and returns a verdict before the action happens:
allow β proceedrequire_approval β stage for a humandeny β neverNo LLM in the hot path. Same input β same verdict, every time. Replayable, auditable, boring on purpose β because an audit artifact that changes its mind is theater.
| Tier | Label | Default decision |
|---|---|---|
| 0 | read-only | allow |
| 1 | reversible write | allow |
| 2 | hard to reverse | require_approval (human) |
| 3 | forbidden for agents | deny |
Money over $50 and production deletion live in tier 3. Raw credential exposure (auth.**, vault.opaque.read, secret.expose) is also tier 3. Opaque vault write/use and approved connector invoke are tier 1. First-match-wins rules, glob action matchers (payments.*, **.delete), typed param conditions (amount_usd > 50, prior_contact = false), default-deny.
Forty-nine payments of $40 each pass a "$50 needs approval" rule individually. Every verdict is defensible. The aggregate is a $1,960 incident, and the log is useless afterwards precisely because every line in it was correct.
Determinism does not save you here. "Same input, same verdict" is a promise about a function β if history is not in the input, the function cannot see repetition, and it will approve the forty-ninth payment with exactly the confidence it gave the first. Consistency becomes the failure mode: it is what lets an agent launder risk through repetition.
The fix is not a less deterministic gate. It is to stop pretending the action is the whole input:
Three properties worth stating, because each is a place people cut the corner:
intended counts alongside committed. A budget that only counts completed effects is blind exactly while a burst is in flight β a speedometer that updates once you have already stopped.deny with ledger_required: true. A cap you can skip by omitting state is decorative. Explicit zeros are an answer; an empty object is not.The ledger must live outside the agent, and the agent must not write its own committed record β otherwise the state that bounds it is state it controls, which is the action-label problem one layer down.
An intended entry that never becomes committed consumes budget forever. Both obvious fixes are wrong:
unknown must be resolvable only by observing the target, never by a clock. Reconciliation closes an intent β ask the processor whether that idempotency key settled. If you cannot reach the target, the state is still unknown and the correct behaviour is still to stop: a stuck intent is the system reporting that it has lost track of money, which is exactly when it should refuse to move more. Any expiry is therefore a named person deciding on evidence that a thing did not happen, recorded like any other write. Loud, not automatic.
What the engine can do is refuse while one is outstanding, and it now does:
Any unknown_<field> above zero denies, however far under the cap you are. Losing track of $5 is not a rounding error to absorb into the sum; it is the one condition under which moving more is least defensible. An explicit unknown_usd: 0 is a resolved state and passes normally.
The engine still does not implement reconciliation. It reads the ledger you pass it and refuses while it says you are lost. Closing an intent β going and asking whether that key settled β is your side of the contract, and it is the part that is easy to get quietly wrong.
This gap was found in public by Moltbook agents neo_konsi_s2bw and maies, arguing with us about retry loops. The full model, including the caveat on determinism, is in the free Agent Action Tiers & Ethics Canons.
Or embed the engine directly:
POST /v1/check β body { request: {action, actor?, params?}, policy | policy_id } β verdict (paid on the hosted API, $0.005)POST /v1/sponsor β one 42 USDC x402 settlement that meets the first-$42 bar (paid)GET / or GET /v1/pay β HTML index of every live $42 rail (free)GET /v1/example β worked verdicts from the live engine (free)GET /v1/policies β built-in policies, with every rule and rationale (free)GET /healthz β liveness (free)Zero dependencies. Node β₯ 18. Deploys anywhere in one file-copy.
https://policy-gate.3labsio.workers.dev β the gate as a paid API on Cloudflare Workers. Source: worker/ (v0.2, the exact deployed code; node --test worker/test-worker.mjs to run its suite, worker/RUNBOOK.md for ops).
See it work first β no wallet, no key, no signup:
Six worked verdicts, computed live by the same function that answers paid traffic β including the denials. A test in the suite fails if these examples ever drift from the engine, so what you evaluate is what you buy:
The full ruleset is free too β GET /v1/policies returns every rule, condition and rationale. Nothing about how a verdict is reached sits behind the paywall. You are paying for the evaluation of your policy against your action, not for access to ours.
Then pay only when you want a verdict of your own:
$0.005 per check, paid per-call via x402 (USDC on Base, settled by Coinbase's facilitator) β agents pay agents, the way this decade apparently works now. No account, no API key: your agent gets a 402 with payment instructions, signs a USDC authorization, retries, done. The receiving wallet is human-created and receiving-only, per our own tier-3 rules. Yes, we policy-gated our own payment setup. Of course we did.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/policy-gate)<a href="https://allmcps.com/mcp/policy-gate"><img src="https://allmcps.com/api/badge/policy-gate?style=directory" alt="Policy Gate on AllMCPs" /></a>