presidio-hardened-x402-mcp
v0.5.0Pre-payment safety gate for x402 agents: PII screening, spend policy, replay checks before signing.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
screen_payment_metadata
Screen x402 payment metadata for PII before signing the payment. Call BEFORE sending the payment request. Detects emails, phone numbers, SSNs, names, and other PII in the resource URL, description, and reason fields and returns redacted strings plus per-field entity counts. No side effects. Runs in one of two modes: - in_process (default): wraps the local presidio_x402 PIIFilter. - remote: when both PRESIDIO_X402_MCP_REMOTE_BASE_URL and ..._REMOTE_API_KEY are set, POSTs to /v1/screen on that host for centralized audit. On remote failure, retur…
| Parameter | Type | Description |
|---|---|---|
resource_url * | string | |
description | string | |
entities | ||
reason | string |
check_payment_policy
Check whether a payment is allowed by the configured spending policy. WARNING: this records the spend against rolling time-window ledgers. Call exactly once, immediately before submitting the payment. If you call this and then do not pay, the spend window will be inflated until it rolls over. Configure limits at server startup via PRESIDIO_X402_MCP_* env vars. Args: resource_url: x402 resource URL being paid. Screened first; only the redacted URL reaches the policy engine (per-endpoint limits match on it, so keep PII out of configured…
| Parameter | Type | Description |
|---|---|---|
amount_usd * | number | |
resource_url * | string | |
prior_decision_refs |
check_payment_replay
Check whether this exact payment has been seen recently (replay protection). WARNING: this records the fingerprint. Call exactly once, immediately before submitting the payment. Cross-process detection requires PRESIDIO_X402_FINGERPRINT_KEY (and optionally PRESIDIO_X402_MCP_REDIS_URL); otherwise each MCP server process has its own ephemeral in-memory store. Args: resource_url: x402 resource URL. pay_to: Recipient address. amount: Amount as string (preserves precision). currency: Currency symbol (e.g. "USDC"). deadline_seconds:…
| Parameter | Type | Description |
|---|---|---|
amount * | string | |
currency * | string | |
deadline_seconds * | integer | |
pay_to * | string | |
resource_url * | string | |
prior_decision_refs |