MCP Approvals

Require human approval before AI models execute sensitive tool calls. Configure per-tool rules to gate dangerous operations while allowing safe ones to proceed automatically.

How It Works

  1. An AI model requests a tool call through your MCP server
  2. HookWatch checks explicit rules first, then applies the trust level policy based on the tool's category
  3. If approval is required, a pending approval record is created with a configurable TTL
  4. You review the request in the dashboard and approve or reject it
  5. The tool call proceeds or is blocked based on your decision
  6. If no decision is made before the TTL expires, the request is automatically expired

Approval Configuration

Each MCP server has an approval_config that controls which tools require approval. Configure it when creating or updating a server.

Json

Config Properties

FieldTypeDescription
enabledbooleanEnable approval workflows for this server
default_actionstringDefault when no rule matches: require or allow
trust_levelstringTrust level: strict (default), moderate, or autonomous. Controls approval behavior when no explicit rule matches.
ttl_secondsnumberTime-to-live for pending approvals (default: 300 seconds)
rulesarrayOrdered list of tool-matching rules (first match wins)

Rule Matching

Rules use glob pattern matching and are evaluated in order. The first matching rule determines the action.

PatternMatchesAction
delete_*delete_user, delete_file, delete_allrequire
write_filewrite_file (exact match)require
read_*read_file, read_config, read_userallow

Fallback

If no rule matches, the default_action is used. Set it to "require" for a secure-by-default approach.

Trust Levels

Trust levels provide a higher-level control over approval behaviour. They work together with explicit rules — explicit rules always take priority. When no rule matches a tool, the trust level determines the outcome.

LevelRead toolsWrite toolsDestructive toolsUse case
strictFalls back to default_actionFalls back to default_actionFalls back to default_actionMaximum oversight — default behaviour
moderateallowrequirerequireBalanced — safe reads proceed, writes need approval
autonomousallowallowallowFull autonomy — rate limits and budgets still apply

Tool categories

Each managed adapter tool has a category: read (list_*, get_*), write (create_*, send_*, update_*), or destructive (delete_*). Moderate trust uses these categories to decide whether approval is required.

Approval Statuses

StatusDescription
pendingAwaiting human review
approvedTool call allowed to proceed
rejectedTool call blocked
expiredTTL exceeded without a decision

Base URL

https://api.hookwatch.dev/v1/mcp/approvals

The Approval Object

Json

Properties

FieldTypeDescription
idstringUnique approval identifier
mcp_server_idstringMCP server that requested the tool call
user_idstringUser who initiated the tool call
tool_namestringName of the tool being requested
request_bodyobjectArguments passed to the tool call
statusstringCurrent status: pending, approved, rejected, or expired
decided_bystringUser ID of who made the decision
decision_notestringOptional note explaining the decision
decided_atstringISO 8601 timestamp of the decision
expires_atstringISO 8601 timestamp when the approval request expires

List Pending Approvals

Retrieve all pending (non-expired) approval requests for the authenticated user.

GET /v1/mcp/approvals

Query Parameters

FieldTypeDescription
statusstringFilter by status: pending, approved, rejected, expired (default: pending)

Response

Json

Get Approval

Retrieve a specific approval request with full details.

GET /v1/mcp/approvals/:id

Approve Request

Approve a pending tool call request, allowing it to proceed.

POST /v1/mcp/approvals/:id/approve

Request Body

FieldTypeDescription
notestringOptional note explaining the approval decision
curl

Response

Json

Reject Request

Reject a pending tool call request, blocking execution.

POST /v1/mcp/approvals/:id/reject

Request Body

FieldTypeDescription
notestringOptional note explaining the rejection
curl

Error Codes

StatusErrorDescription
401UnauthorizedInvalid or missing access token
404Not FoundApproval request not found
409ConflictApproval is not pending (already decided or expired)

Related