presidio-hardened-x402-mcp

v0.5.0
io.github.presidio-v/presidio-hardened-x402-mcp Checked 3 days ago Published 5 days ago

Pre-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…

ParameterTypeDescription
resource_url *string
descriptionstring
entities
reasonstring

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…

ParameterTypeDescription
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:…

ParameterTypeDescription
amount *string
currency *string
deadline_seconds *integer
pay_to *string
resource_url *string
prior_decision_refs