mcpField
P
PayStage Preflight

PayStage Preflight

Local
paystage.xyzFinance4Updated 2d ago

About PayStage Preflight

PayStage Preflight is a local policy checker for agents handling x402 payments. It evaluates a PaymentRequired request before payment and returns pay, review, or do_not_pay.

Key features

  1. 01Local JSON spending policies
  2. 02Deterministic verdicts
  3. 03Checks networks, assets, recipients, and amounts
  4. 04Three payment verdicts

Use cases

  1. 01Check an x402 request before paying
  2. 02Require human review above a threshold
  3. 03Block payments that violate policy

MCP support

Runs as a stdio MCP server, exposing payment evaluation as a tool for MCP clients such as Claude Desktop and Cursor.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"xyz-paystage-preflight": {
"command": "npx",
"args": [
"-y",
"@paystage/preflight"
],
"env": {
"PAYSTAGE_POLICY_PATH": "<PAYSTAGE_POLICY_PATH>"
}
}
}
}
Run commandnpx -y @paystage/preflight
Environment variables to set
PAYSTAGE_POLICY_PATHPath to policy.json spending rules

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@paystage/preflight0.1.0

Tools

1

Saved tool list · updated 4d ago

ParameterTypeRequiredDescription
policyanyNo
policy_pathstringNo
payment_requiredanyNo

Details

From the project README

@paystage/preflight

Evaluate an x402 PaymentRequired against a local spending policy before your agent pays. Returns one of three verdicts: pay, review, or do_not_pay.

  • Local-first — policy lives in a JSON file on your machine. No secrets, no network calls to decide.
  • MCP-native — runs as a stdio MCP server so Claude Desktop, Cursor, and any MCP client can call it as a tool.
  • Deterministic — same input + same policy ⇒ same verdict.

Install

Run directly with npx (no global install):

npx -y @paystage/preflight

Or add it to your MCP client config.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "paystage-preflight": {
      "command": "npx",
      "args": ["-y", "@paystage/preflight"],
      "env": {
        "PAYSTAGE_POLICY_PATH": "/absolute/path/to/policy.json"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "paystage-preflight": {
      "command": "npx",
      "args": ["-y", "@paystage/preflight"],
      "env": {
        "PAYSTAGE_POLICY_PATH": "/absolute/path/to/policy.json"
      }
    }
  }
}

Example policy.json

{
  "version": 1,
  "name": "standard",
  "allowed_networks": ["eip155:8453", "eip155:84532"],
  "allowed_assets": [
    "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
  ],
  "allowed_pay_to": ["0x209693Bc6afc0C5328bA36FaF03C514EF312287C"],
  "max_amount_per_call": "1.00",
  "max_amount_per_session": "10.00",
  "require_human_above": "0.50",
  "max_timeout_seconds": 300,
  "default_verdict": "review"
}

Amounts are human-readable USDC (e.g. "0.50" = 0.50 USDC). Networks use CAIP-2 identifiers.

Verdicts

VerdictMeaning
payWithin policy — safe to proceed automatically.
reviewAllowed but above a human threshold — ask a human before paying.
do_not_payViolates policy (network, asset, payTo, amount, timeout, or malformed).

Links

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.