Video guide

MCP Human-in-the-Loop Approval: A Practical Architecture for Consequential Tool Calls

A founder-focused guide to designing safe MCP tool approval workflows, including identity, concurrency, timeouts, revocation, audit records, and resumable execution.

Based on the article MCP Human-in-the-Loop Approval: A Practical Architecture for Consequential Tool Calls.

Transcript

Put the Approval Boundary Outside the Agent For consequential MCP tool calls, put the approval boundary outside the agent conversation. The MCP server or a trusted approval service should create a durable, single-use approval request. Bind it to a specific tool, normalized arguments, acting user, and request context. Refuse execution until an authorized human approves that exact request. Do not treat an agent-generated question, such as “Shall I send this invoice?”, as authorization. The model can alter the wording, mistake prior consent for new consent, or continue after the user’s intent changes. A safe workflow needs a server-observed decision, a short validity window, and an idempotent execution path. OAuth and Risk Hints Are Not Approval MCP authorization guidance addresses transport-level access through OAuth 2.1. It proves who is calling and can carry delegated authority. It does not decide whether a particular deletion, payment, deployment, or external message should execute now. Tool metadata such as destructiveHint or readOnlyHint can help clients label risk, but those hints are not execution-time authorization controls. For a solo developer, enterprise approval software is not required. A small database table, background worker, signed approval token or grant, and simple notification channel can support a reliable first version. The key separation is between requesting permission and deciding whether permission was granted. Every important answer, including the approver, tool, exact arguments, affected resource, validity, duplicate handling, revocation, and audit evidence, must come from the system rather than chat history. Classify the Operation and Create a Request The MCP server should classify each requested operation using server-side policy. Read-only tools can execute immediately when normal authorization permits them. Reversible writes can follow a lower-risk policy. Irreversible, financial, privileged, public, or security-sensitive operations should always require an approval grant. When a protected call arrives, assign a random approval_id and persist the request. The arguments_digest is not a replacement for storing or displaying relevant arguments. It helps detect whether the operation changed between request and execution. Return a pending result containing the request ID and an appropriate status or error. The client can display the request and notify the user, but the server must not continue into the consequential operation merely because the client says it is waiting. Use an Independent Approval Channel The human should approve through a surface outside the agent’s control plane. It could be a hosted account page, a separate authenticated web application, or a mobile push action. The approval endpoint must authenticate the human independently of the agent. Check that the request is still pending, the approver is authorized for the action and affected account or tenant, and the request has not expired. Also confirm that displayed arguments match the stored digest, and that the approver has not already consumed the request or exceeded a policy limit. On success, create a single-use approval grant. A database row is often simplest for a small application. A signed grant can work if the key is protected and every relevant field is verified. The grant should reference the approval ID, approver ID, tool name, arguments digest, subject, tenant, expiry, and one-time-use or idempotency information. Execute Exactly What Was Approved After approval, a worker claims the request, rechecks its status and digest, and performs the operation using the same canonical arguments shown to the approver. This prevents a dangerous pattern in which twenty-five dollars is approved and then changed to two thousand five hundred dollars. If the tool call changes materially, create a new request and ask for another approval. Make execution idempotent. If a network timeout occurs after the downstream service accepted the call, a retry must not issue a second refund, deployment, or message. Use a stable request ID, a downstream idempotency key, or an operation status lookup where the API supports one. Record the request creation, normalized tool and arguments, authenticated subject and tenant, risk decision, approver and decision time, expiry, revocation, execution outcome, downstream operation or idempotency key, and any retry. Keep unnecessary sensitive data and secrets out of logs.
---