agent-action-gate
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., "@agent-action-gate propose an $800 deal for Sarah Nguyen, then show what's waiting for approval"
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.
agent-action-gate
Let AI agents do real work without letting them do anything unreviewed: every write is proposed, approved, run once and logged.
sequenceDiagram
participant Agent
participant Gate
participant Human
participant System
Agent->>Gate: propose_action
Gate-->>Agent: action id + plain-English preview
Gate->>Gate: check policy (auto, ask a person, or block)
Gate->>Human: waiting for approval (two people if high risk)
Human->>Gate: approve_action (named approver)
Agent->>Gate: execute_action
Gate->>System: write, exactly once
System-->>Gate: result
Gate->>Gate: append to audit log (PII redacted)
Gate-->>Agent: result (a second execute returns the same result)Why This Exists
Agents retry, so they double-send the same message or create the same record twice.
Agents guess, so they write the wrong record and nobody sees it until a client does.
Agents see everything, so patient details end up in logs and chat transcripts.
We put one gate in front of every write, so a person stays in charge and every change can be traced and undone.
Targets MCP protocol 2025-11-25 via the official TypeScript SDK (@modelcontextprotocol/sdk 1.32.2, the newest release). Every tool carries MCP annotations (readOnlyHint, destructiveHint, idempotentHint).
Related MCP server: varco_mcp
Quick Start
git clone https://github.com/dwadlane/agent-action-gate && cd agent-action-gate
npm install
npm run demo # a scripted agent session, no accounts needed
npm test # 39 tests, including a real stdio MCP client
npm run buildAdd it to any MCP client (Claude Desktop, Claude Code, Cursor):
{
"mcpServers": {
"agent-action-gate": {
"command": "node",
"args": ["/path/to/agent-action-gate/dist/index.js"],
"env": { "AAG_POLICY": "/path/to/policy.json", "AAG_AUDIT_LOG": "/path/to/audit.jsonl" }
}
}
}The server runs on mock backends (a CRM and a clinic patient-records store with fictional data), so it works with zero accounts.
Tool | What it does |
| Returns an action id and a plain-English preview. Changes nothing. |
| Everything waiting for a person. |
| A named person approves. High risk actions need two different people. |
| A named person turns it down for good. |
| Runs an approved action once. A second call returns the first result. |
| Reverses an action that registered an undo step. |
| The kill switch. |
| Reads the append-only log and checks its hash chain. |
Use it as a library too:
import { Gate, AuditLog, PolicyEngine, parsePolicy, registry } from "agent-action-gate";
const gate = new Gate({
registry: registry([myKind]), // your own write, with a preview and an undo
policy: new PolicyEngine(parsePolicy(policyJson)),
audit: new AuditLog("audit.jsonl"),
});
const { action } = gate.propose({ kind: "crm.update_contact", params });
gate.approve(action.id, "Priya Shah");
await gate.execute(action.id);The Policy
policy.json decides what an agent may do alone, what needs a person, and what is never allowed.
{
"highRiskApprovers": 2,
"defaults": { "mode": "approval" },
"actions": {
"crm.create_deal": { "mode": "auto", "autoIf": { "field": "value", "lte": 1000 } },
"crm.update_deal_stage": { "mode": "auto" },
"crm.delete_contact": { "mode": "block", "reason": "Agents never delete contacts." },
"clinic.update_patient": { "mode": "approval", "risk": "high" }
},
"rateLimits": {
"global": { "perMinute": 30 },
"perAction": { "crm.update_deal_stage": { "perMinute": 10 } }
},
"businessHours": {
"timezone": "Australia/Melbourne",
"days": [1, 2, 3, 4, 5],
"start": "08:00",
"end": "18:00",
"appliesTo": ["clinic.update_patient"]
}
}Anything without a rule waits for a person. Set defaults.mode to block and anything without a rule is refused.
The Demo
examples/demo.ts runs five proposals: two auto-approved by policy, one that waits for two people and is approved, one blocked by policy, and one retry whose duplicate execute is ignored. Then a person undoes one. Full output in examples/demo-output.md.
10:30:01 agent proposed act_0001: Create a new deal "Kitchen rewire" worth $800 for Sarah Nguyen.
10:30:02 policy act_0001 auto-approved: value 800 is within the 1000 limit.
10:30:03 gate act_0001 ran once
...
10:30:07 agent proposed act_0003: Change patient record Jordan Ellis (p_101): phone from "0400 123 456" to "0400 999 888".
10:30:08 policy act_0003 needs 2 approvers (high risk)
10:30:09 gate act_0003 refused: act_0003 still needs 2 more approval(s).
10:30:10 Dr Chen approved act_0003 (1 of 2)
10:30:11 Priya approved act_0003 (2 of 2)
10:30:12 gate act_0003 ran once
10:30:13 agent proposed act_0004: Delete contact Tom Alvarez (c_002) permanently.
10:30:14 policy act_0004 blocked: Agents never delete contacts. A person does that in the CRM.
10:30:16 agent proposed the same change again (act_0001), gate recognised it
10:30:17 gate act_0001 already ran, duplicate ignored, first result returned
10:30:18 Priya undid act_0002, deal is back to quotedIn the audit log that patient change is stored as phone from "[PHONE]" to "[PHONE]". The real numbers never touch the disk.
When It Stops
The gate refuses, and tells the agent why in plain English, when:
the action is not approved yet, or still needs a second person
the policy blocks it, or a person rejected it
the person who proposed it tries to approve it, or the same person approves twice
the kill switch is on (
pause_all), which stops every execute and undo untilresumea rate limit is hit, or the action is outside business hours
it already ran (the agent gets the first result back, nothing runs twice)
the details don't fit the action, or the record it points at doesn't exist
Audit entries are redacted for emails, phone numbers, Medicare-style numbers and dates of birth, then chained by hash. Edit or delete a line and audit_log reports the chain as broken.
Know the limits. Pending actions and the pause switch live in memory in v0.1, so a restart clears them (the audit log is the durable record). Redaction is pattern based, so treat it as a strong safety net, not a guarantee for free text.
Fits Any Stack
The gate does not care what is behind the write. An action is a name, a schema, a plain-English preview, an apply function and an optional undo. Write one per system.
GoHighLevel: put it in front of contact edits, pipeline moves and messages. See gohighlevel-mcp-safe, which does the same dry-run-then-confirm idea for GoHighLevel.
CRMs: deal changes, contact merges and deletes.
EHRs and clinic systems: patient detail changes with two-person approval and redacted logs.
Ad APIs: budget and bid changes with a spend threshold for auto-approval and a hard block above it.
Data pipelines: bulk writes that need a person to read the preview first.
For a read-side example of the same plain-English approach, see owner-morning-brief.
Built by Gaps2Gains. Book a Free Discovery Call
Available Tools
9 toolsapprove_actionApprove an actionA
A named person approves a pending action. High risk actions need two different people. Approving does not run it.
Inputs: approver (required), action_id (required), note.
audit_logRead the audit logBRead-onlyIdempotent
Recent audit entries, newest last. Personal details were redacted before they were written. Also reports whether the log's hash chain is intact.
Inputs: limit, action_id.
execute_actionRun an approved actionADestructiveIdempotent
Runs an approved action once. Calling it again returns the first result and changes nothing. Refused if the action is not approved, the system is paused, or a rate limit or business hours rule applies.
Inputs: action_id (required), executed_by.
list_pendingList actions waiting for a personARead-onlyIdempotent
Every proposed action that still needs approval, with its preview and how many approvals it has.
Inputs: no named parameters.
pause_allKill switch: pause everythingAIdempotent
Stops every execute and undo straight away until someone calls resume. Proposals and approvals still queue up.
Inputs: by (required), reason.
propose_actionPropose an actionAIdempotent
Ask to make a change. Nothing changes yet: you get back an action id and a plain-English preview of exactly what would change, and whether it is auto-approved, waiting for a person, or blocked. Available actions: crm.update_contact: Change a CRM contact's name, email, phone or company. | crm.create_deal: Create a deal for a contact. The value is in dollars. | crm.update_deal_stage: Move a deal to another stage (lead, quoted, won, lost). | crm.delete_contact: Delete a contact from the CRM. | clinic.update_patient: Change a patient's phone, email, address or date of birth in the clinic records. | clinic.add_note: Add a note to a patient's record.
Inputs: kind (required), params (required), reason, proposed_by, +1 more.
reject_actionReject an actionB
A named person turns down a pending action. It can never run.
Inputs: approver (required), action_id (required), reason.
resumeResume after a pauseDIdempotent
Lifts the kill switch.
Inputs: by (required).
undo_actionUndo an actionBDestructiveIdempotent
Reverses an action that ran, if it registered an undo step. Says who did it.
Inputs: by (required), action_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool maps to a distinct step in the action lifecycle: propose, list, approve, reject, execute, undo, pause, resume, and audit. Approve/reject/execute are related but clearly separated by their descriptions, and pause_all/resume form an unambiguous pair.
Most names follow a verb_noun snake_case pattern (list_pending, propose_action, approve_action, execute_action, undo_action). Minor deviations are resume (verb without object) and audit_log (noun phrase), but the convention remains predictable overall.
Nine tools cover the full approval-gate workflow without redundancy. Each tool earns its place, and the set is neither thin nor bloated for the domain.
The core lifecycle is covered: propose, review pending, approve/reject, execute, undo, pause/resume, and audit. A minor gap is the lack of a get_action or list_all tool to inspect a specific action's status or history after it leaves the pending queue, but agents can largely work around this via list_pending and audit_log.
Maintenance
Related MCP Connectors
Supervised API-write gateway for AI agents with policy, human approval and execution receipts.
Human-in-the-loop review and approval for AI agents. Audit trail, approval policies, native MCP.
Permission checks, human approval cards, and signed audit trails for AI agent tool calls.
Authorize AI agent tool calls before they run: policy-as-code, human approval, signed receipts.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables controlled AI-agent access to enterprise-shaped tools with a deny-by-default gated write path, human approval, dry-run execution, and append-only audit logging.1-
- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible AI agents to safely act on business backends by enforcing per-agent permissions, autonomy thresholds, human approval with review-and-edit, and full audit trails.MIT

@quirna/mcpofficial
AlicenseNot gradedqualityCmaintenanceEnables AI agents to request human approval before consequential actions, with policy-based routing, phone-based approver decisions, and signed audit evidence.47 npmMIT- FlicenseNot gradedqualityNot gradedmaintenanceEnables autonomous agents and multi-agent frameworks to route actions through deterministic human approval gates before execution. Enforces risk tiers, reversible checkpoints, and token approval bounds so that risky or costly operations can be reviewed, bounded, and rolled back without LLM round-trips.-