approval-gate-mcp
v0.4.1Fail-closed human approval gates for AI agent actions.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
request_approval
Register a consequential action for human approval BEFORE performing it. Returns a request id. The action is NOT executed by this server; status 'approved' does NOT authorize anything by itself. Right before acting, call consume_approval with the same id, the exact action text and the same operation/payload if you supplied them; proceed only on ok:true. Anything else means no (fail closed).
| Parameter | Type | Description |
|---|---|---|
action * | string | Precise description of the action you intend to take, e.g. 'send email to alice@example.com with subject X' |
reason * | string | Why this action is needed right now |
operation | string | Optional operation name a trusted executor must present, e.g. 'smtp.send' (A-Z a-z 0-9 . _ : / -) |
payload | Optional JSON payload the action will execute (at most 32768 bytes canonical). The human reviews it; consume must present an identical payload. | |
requested_by | string | Identifier of the requesting agent or workflow (self-reported, not authenticated) |
ttl_seconds | integer | How long the request stays valid, pending or approved (default 1 hour) |
check_approval
Check the current status of an approval request. Informational only: no status here authorizes execution (authorizesExecution is always false). See effectiveStatus (approved_unconsumed, approved_expired, consumed, revoked, ...). Only consume_approval ok:true authorizes.
| Parameter | Type | Description |
|---|---|---|
id * | string | The request id returned by request_approval |
wait_for_approval
Block until a human decides the request, it expires, or the timeout elapses. Returns the final (or still-pending) request. Informational only; it never authorizes execution. A timeout returns 'pending' (not approved). After 'approved', call consume_approval and proceed only on ok:true.
| Parameter | Type | Description |
|---|---|---|
id * | string | The request id returned by request_approval |
poll_seconds | integer | Polling interval |
timeout_seconds | integer | Maximum time to wait (default 5 minutes) |
list_pending
List approval requests awaiting a human decision, oldest first, one page at a time. Returns {items, nextCursor}; nextCursor is present only when more requests exist (pass it back as cursor). Items omit payload text; use check_approval for one full request.
| Parameter | Type | Description |
|---|---|---|
cursor | string | nextCursor from the previous page |
limit | integer | Page size, 1-100 (default 50) |
decide_approval
Deny a pending request, or revoke an approved-but-unconsumed one. Approvals are not possible through MCP; a human must run `approval-gate approve <id>` in their own terminal.
| Parameter | Type | Description |
|---|---|---|
approve * | boolean | true to approve (refused unless enabled by the operator), false to deny |
id * | string | The request id returned by request_approval |
reason | string | Human's stated reason, verbatim |
consume_approval
Call this IMMEDIATELY before performing an approved action. Succeeds exactly once per request, only if the request is approved, not past its expiry, `action` is byte-for-byte the text that was approved, and operation/payload (if the request had them) are identical. ok:false for any reason means do NOT proceed. An approval cannot be reused for a second or different action. The returned JSON is not a transferable credential: no other component may accept it as proof of approval.
| Parameter | Type | Description |
|---|---|---|
action * | string | The exact action text you passed to request_approval |
id * | string | The request id returned by request_approval |
operation | string | Optional operation name a trusted executor must present, e.g. 'smtp.send' (A-Z a-z 0-9 . _ : / -) |
payload | Optional JSON payload the action will execute (at most 32768 bytes canonical). The human reviews it; consume must present an identical payload. |