Skip to content

Configuration

FlagDefaultDescription
--dbaudit.dbSQLite audit database path
--receipt-dbreceipts.dbSQLite receipt store path
--key(ephemeral)Ed25519 private key PEM file for signing receipts
--taxonomy(none)Taxonomy mappings JSON file for action classification
--rules(built-in defaults)Policy rules YAML file
--name(inferred from command)Server name for the audit trail
--issuerdid:agent:mcp-proxyIssuer DID for receipts
--principaldid:user:unknownPrincipal DID for receipts
--chain(auto UUID)Chain ID for receipt chaining
--http127.0.0.1:8080HTTP address for the approval endpoint

Rules are defined in YAML and control what happens when a tool call matches:

rules:
- name: block_destructive_ops
description: Block delete operations on sensitive tools
enabled: true
tool_pattern: "delete_*"
server_pattern: "*postgres*"
operation_types: [delete]
min_risk_score: 70
action: block
- name: pause_high_risk
description: Require approval for high-risk operations
enabled: true
min_risk_score: 50
action: pause
FieldRequiredDescription
nameyesUnique rule identifier
descriptionnoHuman-readable description
enabledyesWhether the rule is active
tool_patternnoGlob pattern matching tool name (case-insensitive)
server_patternnoGlob pattern matching server name
operation_typesnoFilter by operation type: read, write, delete, execute
min_risk_scorenoMinimum risk score (0-100) to match
actionyesOne of pass, flag, pause, block
ActionBehavior
passLog only, forward normally
flagLog with highlight, forward normally
pauseHold for HTTP approval (60-second timeout, auto-denied on timeout)
blockReject immediately with error

When multiple rules match, the most restrictive action wins (block > pause > flag > pass).

Risk scores range from 0 to 100, computed from:

FactorScoreCondition
Operation type0—40read=0, write=20, execute=30, delete=40
Sensitive keywords+30Tool name contains: auth, credential, password, token, secret, key
SQL without WHERE+30Arguments contain UPDATE/DELETE/TRUNCATE without WHERE
Config modification+20Tool name contains: config, setting
External messaging+15Tool name starts with: send_, post_
Unknown operation+10Fallback if classification fails

Tool names are classified by prefix (case-insensitive):

TypePrefixes
deletedelete_, remove_, drop_, destroy_, purge_
executerun_, exec_, invoke_, call_, trigger_
writecreate_, update_, set_, add_, put_, edit_, modify_, write_
readget_, read_, list_, search_, describe_, show_
unknown(fallback)

For more precise classification, provide a --taxonomy JSON file mapping tool names to action types from the Agent Receipts taxonomy.

When a tool call is paused by a policy rule:

  1. The proxy logs an approval ID and waits up to 60 seconds
  2. An approval token is printed to stderr on startup
  3. Approve or deny via HTTP:
Terminal window
# Approve
curl -X POST http://localhost:8080/api/tool-calls/{id}/approve \
-H "Authorization: Bearer $APPROVAL_TOKEN"
# Deny
curl -X POST http://localhost:8080/api/tool-calls/{id}/deny \
-H "Authorization: Bearer $APPROVAL_TOKEN"

If no response within 60 seconds, the call is automatically denied.

The proxy redacts sensitive data before storage using two passes:

JSON-aware redaction replaces values of sensitive keys including: password, token, api_key, secret, authorization, private_key, access_token, jwt, database_url, ssh_key, connection_string, and others (42 keys total).

Pattern-based redaction matches known secret formats:

  • GitHub PATs and OAuth tokens (ghp_*, gho_*)
  • OpenAI/Anthropic API keys (sk-*)
  • AWS access keys (AKIA*)
  • Bearer tokens
  • Slack tokens (xox*)
  • PEM private key blocks

Set the BEACON_ENCRYPTION_KEY environment variable to enable AES-256-GCM encryption of all stored audit data:

Terminal window
BEACON_ENCRYPTION_KEY="my-passphrase" mcp-proxy node server.js

Key derivation uses Argon2id (t=1, m=64MB, p=4). Encrypted fields are stored with an enc: prefix and transparently decrypted on retrieval.