Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words Sign in

Presidio Hardened X402 MCP

by presidio-vversion 0.4.0i★ 2iRuns on your computerRepository ↗
Registry nameio.github.presidio-v/presidio-hardened-x402-mcp

How to install

What it does

Pre-payment safety gate for x402 agents: PII screening, spend policy, replay checks before signing.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Online shops & payments

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity6/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score18/100

Quality: Passed 2/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Presidio Hardened X402 MCP. Follow https://mcp.popnx.com/i/presidio-v-presidio-hardened-x402-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 2/3 checks · Runs on your computer · ✓ Commands checked Nov 21, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Presidio Hardened X402 MCP for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "presidio-hardened-x402": { "command": "uvx", "args": [ "presidio-hardened-x402-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Presidio Hardened X402 MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "presidio-hardened-x402": {
          "command": "uvx",
          "args": [
            "presidio-hardened-x402-mcp"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use Presidio Hardened X402 MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Presidio Hardened X402 MCP or shows a Presidio Hardened X402 MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Presidio Hardened X402 MCP yet

Presidio Hardened X402 MCP runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Presidio Hardened X402 MCP

  • Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Python (uv) on your computer first (one time)
  • Install Python (uv) on your computer first (one time)
  • Install Python (uv) on your computer first (one time)

B · Others in Online shops & payments that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Presidio Hardened X402 MCP for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user presidio-hardened-x402 -- uvx presidio-hardened-x402-mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Presidio Hardened X402 MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user presidio-hardened-x402 -- uvx presidio-hardened-x402-mcp
  4. Type /mcp in Claude Code

    You should see Presidio Hardened X402 MCP listed as connected

  5. Try it

    Use Presidio Hardened X402 MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Presidio Hardened X402 MCP or shows a Presidio Hardened X402 MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Presidio Hardened X402 MCP for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "presidio-hardened-x402": { "command": "uvx", "args": [ "presidio-hardened-x402-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Presidio Hardened X402 MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use Presidio Hardened X402 MCP and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Presidio Hardened X402 MCP or shows a Presidio Hardened X402 MCP tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Presidio Hardened X402 MCP for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "presidio-hardened-x402": { "type": "stdio", "command": "uvx", "args": [ "presidio-hardened-x402-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Presidio Hardened X402 MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use Presidio Hardened X402 MCP and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Presidio Hardened X402 MCP or shows a Presidio Hardened X402 MCP tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Presidio Hardened X402 MCP💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user presidio-hardened-x402 -- uvx presidio-hardened-x402-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "presidio-hardened-x402": {
      "command": "uvx",
      "args": [
        "presidio-hardened-x402-mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "presidio-hardened-x402": {
      "command": "uvx",
      "args": [
        "presidio-hardened-x402-mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "presidio-hardened-x402": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "presidio-hardened-x402-mcp"
      ]
    }
  }
}

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
33/wk
Licencei
No licence stated
Connection
Runs on your computer
Latest versioni
0.4.0
Published to registryi
Nov 8, 2026
Code last changedi
Nov 20, 2026
Maker
presidio-v
Packages
pypi: presidio-hardened-x402-mcp
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 21, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account presidio-v, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed yesterday

  • ✕ Fail

    Has a licence

    No licence file found in the repo

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for presidio-hardened-x402-mcp@0.4.0

Checks only this package version, not every dependency · checked Nov 15, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/presidio-v-presidio-hardened-x402-mcp.svg)](https://mcp.popnx.com/en/servers/presidio-v-presidio-hardened-x402-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Online shops & paymentsi

  • More stars than 94% of the other 3027 servers in this category
  • Published to the registry more recently than 70% of the other 3027 servers in this category
  • Basic checks equal to or better than 59% of the other 3027 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Presidio Hardened X402 MCP safe?

It passed 2 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed yesterday, and the latest version (0.4.0) reached the registry 13 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: Stripe MCP, flightclaw, Trade It, Marketplace Ad Pros: Amazon Ads & Seller Central, idealo MCP Server

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

Stripe MCP

Stripe’s official server lets AI view and manage customers, products, payments and invoices. Connect to Stripe’s cloud and sign in with OAuth.

by stripeWidely used★ 2.1KUpdated 13 months ago

Runs in the cloud✓ service owner · stripe.com

flightclaw

Search ~300 airlines and book flights with a checkout link. OAuth sign-in by email code.

by flightclawGrowing★ 87Updated 2 months ago

Runs in the cloud✓ service owner · flightclaw.com

Trade It

Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.

by trade-it-incGrowing★ 62Updated 36 days ago

Runs in the cloud✓ service owner · tradeit.app

idealo MCP Server

Search products, compare prices and discover deals across 6 European markets with your AI assistant.

by idealoEarly★ 28Updated 6 months ago

Runs in the cloud✓ service owner · mcp.idealo.com
Compared with similar ones
This one
Presidio Hardened X402 MCP
Stripe MCPflightclawTrade ItMarketplace Ad Pros: Amazon Ads & Seller Centralidealo MCP Server
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoYesNoNoNoNo
Basic checks2/34/44/45/54/44/4
License–MITMITCC0-1.0MITMIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

presidio-hardened-x402-mcp

Pre-payment safety gate for x402 — agents call screen_payment_metadata(...), check_payment_policy(...), and check_payment_replay(...) before signing, catching PII, budget overruns, and duplicate payments before metadata or money leaves the agent host.

Part of the presidio-hardened-* toolkit family. Thin MCP (Model Context Protocol) adapter over the presidio-hardened-x402 library, pinned to parent 0.14.x (presidio-hardened-x402>=0.14.0,<0.15.0), the parent's Python 3.11 line. 0.13.0 was the first parent that can record a control as NOT_EVALUATED, which signed decision evidence needs; it also includes the 0.11.1 fix for the percent-encoded PII redaction bypass, which remains a security floor.

Why this exists

x402 agentic payments routinely carry user-supplied free text — descriptions, memos, query-string parameters — straight through to merchants and facilitators. When an LLM agent generates that text, it can include PII the user never intended to share. Once the merchant logs it, retention is their decision, not yours.

This MCP server gives agents a small default-deny gate *before* payment leaves the agent host. Three tools expose the parent library's stable pre-payment controls: PII redaction, spending policy, and replay detection. Since 0.3.0 each decision can also be emitted as a signed payment-decision@1 record that a third party verifies offline (see Signed decision evidence). The tools are designed to compose with payment-execution and endpoint-safety MCP servers (x402station, Coinbase x402, Sardis, ...), while other parent-library surfaces — evidence-ref@1 verification of inbound evidence, the v0.9.1 SLO broker, the v0.10.0 settlement-ref@1 treasury binding, and the v0.11.0 CapabilityEnforcer — stay in the Python library unless an MCP tool explicitly wraps them later.

Install & configure

Requires Python ≥ 3.11. Distributed on PyPI; recommended invocation via uvx (no global install).

Claude Desktop / Claude Code

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your platform:

{

"mcpServers": { "presidio-x402": { "command": "uvx", "args": ["presidio-hardened-x402-mcp"] } } }

Cursor / Windsurf / Continue

Same shape — every MCP host accepts command / args / env. See your editor's MCP-server docs for the config-file path.

Environment variables

All optional. Defaults give a zero-config in-process mode with no quota, no network, and no PII storage.

VariablePurposeDefault
PRESIDIO_X402_MCP_MODEregex (zero-setup) or nlp (needs [nlp] extra + a spaCy model)regex
PRESIDIO_X402_MCP_MAX_PER_CALL_USDMax USD per single payment (policy gate)unset → no limit
PRESIDIO_X402_MCP_DAILY_LIMIT_USDMax USD per rolling window (policy gate)unset → no limit
PRESIDIO_X402_MCP_PER_ENDPOINT_JSONPer-endpoint cap, e.g. '{"api.foo.com": 5.00}'unset
PRESIDIO_X402_MCP_WINDOW_SECONDSRolling window for the daily limit86400
PRESIDIO_X402_MCP_AGENT_IDLabel written into audit recordsunset
PRESIDIO_X402_MCP_REPLAY_TTLFingerprint cache TTL (seconds)300
PRESIDIO_X402_MCP_REDIS_URLUse Redis for replay state instead of in-memoryunset
PRESIDIO_X402_MCP_AUDIT_PATHAppend-only JSON-L audit log path; omit to disableunset
PRESIDIO_X402_MCP_LOG_LEVELDEBUG / INFO / WARNING / ERRORINFO
PRESIDIO_X402_MCP_REMOTE_BASE_URLEnable HTTP-proxy mode for tool 1 — see Modes. Must be https://; plain http:// is accepted only for loopback and otherwise refuses to startunset
PRESIDIO_X402_MCP_REMOTE_API_KEYAPI key for the remote screening serviceunset
PRESIDIO_X402_FINGERPRINT_KEY32-byte hex key for cross-process replay detectionunset (per-process)
PRESIDIO_X402_CHAIN_KEY32-byte hex key for cross-process audit-chain HMACunset (per-process)
PRESIDIO_X402_REQUIRE_FINGERPRINT_KEYFail startup if replay key is absent or invalidunset
PRESIDIO_X402_REQUIRE_CHAIN_KEYFail startup if audit-chain key is absent or invalidunset
PRESIDIO_X402_MCP_EVIDENCE_KEY_FILEFile holding the decision-signing key (preferred; wins over the env key)unset
PRESIDIO_X402_EVIDENCE_KEYDecision-signing key (the parent library's variable): Ed25519 private key as 64 hex chars, or an HMAC secretunset
PRESIDIO_X402_MCP_DECISION_PATHAppend-only JSON-L file for signed payment-decision@1 recordsunset
PRESIDIO_X402_MCP_EVIDENCE_ALGORITHMed25519 or hmac-sha256ed25519
PRESIDIO_X402_MCP_EVIDENCE_SIGNERSigner identity; the trust-store key verifiers look uppresidio-hardened-x402-mcp
PRESIDIO_X402_MCP_EVIDENCE_KEY_IDOptional key id written into each record (for rotation)unset
PRESIDIO_X402_MCP_REQUIRE_EVIDENCE_KEYFail startup unless signed evidence is fully configured and the key signsunset
PRESIDIO_X402_MCP_GATE_CERTIFICATEikigov-assess gate-certificate@1 file(s) the payments are authorised under, os.pathsep-separated; needs the [gate] extraunset
PRESIDIO_X402_MCP_GATE_TRUSTTrust store for the certificate issuer (and its embedded evidence signers); required with the aboveunset

Generate cross-process keys with openssl rand -hex 32.

Tools

screen_payment_metadata(resource_url, description, reason, entities?)

Detects and redacts PII in payment metadata. No side effects — safe to call repeatedly.

// Input

{ "resource_url": "https://api.foo.com/u/jane@example.com", "description": "monthly fee for jane@example.com", "reason": "" }

// Output { "redacted_resource_url": "https://api.foo.com/u/ ", "redacted_description": "monthly fee for ", "redacted_reason": "", "entities_found": [ { "entity_type": "EMAIL_ADDRESS", "field": "resource_url", "count": 1 }, { "entity_type": "EMAIL_ADDRESS", "field": "description", "count": 1 } ], "mode": "in_process" // + "decision_ref": "<64 hex>" when signed decision evidence is enabled }

entities (optional list of Presidio entity types) narrows detection to a whitelist. Field-length caps mirror the screening-api wire contract that remains stable through parent 0.7.x: resource_url ≤ 2048, description ≤ 4096, reason ≤ 4096 characters. Oversized inputs raise ValueError.

check_payment_policy(resource_url, amount_usd, prior_decision_refs?)

Spending-policy gate. Records the spend on success — call exactly once, immediately before payment. Skipping the actual payment after a successful check inflates the daily-limit ledger until the window rolls over.

The URL is screened first and only the redacted URL reaches the policy engine, so no raw URL lands in the parent's logs. Per-endpoint limits match on that redacted URL; keep PII out of configured endpoint prefixes. If screening fails, the gate denies without recording spend.

// Input

{ "resource_url": "https://api.foo.com/x", "amount_usd": 1.50 }

// Output (allowed) { "allowed": true }

// Output (denied — over per-call limit of $5.00) { "allowed": false, "reason": "...", "limit_usd": 5.00, "amount_usd": 6.00 }

With signed evidence enabled, both outputs also carry decision_ref. prior_decision_refs (optional, up to 8) links refs this server returned earlier for the same payment — typically the one from screen_payment_metadata — into the signed record; a ref this process did not issue is refused before any spend is recorded.

check_payment_replay(resource_url, pay_to, amount, currency, deadline_seconds, prior_decision_refs?)

Duplicate-payment gate via HMAC-SHA256 fingerprint of the canonical fields. Records the fingerprint on success — call exactly once, immediately before payment.

amount is a string to preserve precision. Cross-process detection requires PRESIDIO_X402_FINGERPRINT_KEY (and optionally PRESIDIO_X402_MCP_REDIS_URL); otherwise each MCP server process keeps its own in-memory store.

// Input

{ "resource_url": "https://api.foo.com/x", "pay_to": "0xabc...", "amount": "1.50", "currency": "USDC", "deadline_seconds": 1700000000 }

// Output (first seen) { "is_replay": false, "fingerprint": "29aaf60f..." }

// Output (duplicate within TTL) { "is_replay": true, "fingerprint": "29aaf60f..." }

decision_ref and prior_decision_refs behave as for check_payment_policy.

Signed decision evidence

The audit log (PRESIDIO_X402_MCP_AUDIT_PATH) is HMAC-chained: tamper-evident to whoever holds PRESIDIO_X402_CHAIN_KEY, and to nobody else. From 0.3.0 every tool decision — allow and block alike — can also be written as a signed payment-decision@1 record, built and signed by the parent library (build_payment_decision_content, build_decision_evidence) and checked by anyone with the public key (verify_decision_ref). The audit log is still written; the records go alongside it, never instead of it.

# One-time: an Ed25519 key pair for the signer (hex private key, 0600).

python - <<'PY' from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat sk = Ed25519PrivateKey.generate() open("evidence.key", "w").write(sk.private_bytes_raw().hex()) print(sk.public_key().public_bytes(Encoding.Raw, PublicFormat.Raw).hex()) # -> trust store PY chmod 600 evidence.key

"env": {

"PRESIDIO_X402_MCP_EVIDENCE_KEY_FILE": "/etc/presidio/evidence.key", "PRESIDIO_X402_MCP_DECISION_PATH": "/var/log/presidio/x402-mcp-decisions.jsonl", "PRESIDIO_X402_MCP_REQUIRE_EVIDENCE_KEY": "1" }

Verify offline with the parent's CLI against a trust store that pins the public key under the signer name:

echo '{"presidio-hardened-x402-mcp": {"alg": "ed25519", "public_key": "<public hex>"}}' > trust.json

python -m presidio_x402.decision_ref /var/log/presidio/x402-mcp-decisions.jsonl trust.json

Without a key the server behaves exactly as 0.2.x — audit log only — and logs one WARNING at startup saying signed evidence is disabled. A key without PRESIDIO_X402_MCP_DECISION_PATH, an unreadable key file, or a key the signer rejects is logged at ERROR and also leaves evidence off. Set PRESIDIO_X402_MCP_REQUIRE_EVIDENCE_KEY=1 to refuse to start in any of those cases instead. Once running, a failed write is logged and the gate's answer stands: a record of a decision nev

Only the beginning is shown; read the rest in the repo