
PayStage x402 Guard — payment safety before the wallet signs
Pre-signing payment checks for AI agents paying over x402 with USDC on Base
- Pricing
- Freemium
- Platforms
- API, CLI, Self-hosted
- Runs
- Locally
- Version
- 0.4.10
- Listing updated
- today
Similar MCP servers
About PayStage x402 Guard — payment safety before the wallet signs
PayStage x402 Guard — payment safety before the wallet signs is a freemium MCP server for finance and payments. It runs locally on your machine and is started by your AI client.
The README frames it as a thin layer between an agent deciding to pay and the wallet signing. It wraps an x402 fetch call, evaluates the actual 402 challenge against a local policy file, and returns pay, review or do-not-pay before any signature happens. Refusals hand back the server's original challenge so the caller can log what was requested.
The server is read-only and never holds keys, so the agent remains the only signer. Policies cover amount caps, allowed payees, assets, networks, challenge timeouts and how to treat unknown payees. The npm packages include a stdio MCP server, a guarded fetch wrapper and verifier and client hooks for the x402 core SDK.
It suits developers building agents that buy paid APIs or MCP tools and want an explicit spend policy outside the wallet. The README is clear that it only evaluates before signing and cannot see what a seller does after settlement.
Install
Run in a terminal
claude mcp add x402-guard -- npx -y @paystage/x402-guardAdd to claude_desktop_config.json
{
"mcpServers": {
"x402-guard": {
"command": "npx",
"args": [
"-y",
"@paystage/x402-guard"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"x402-guard": {
"command": "npx",
"args": [
"-y",
"@paystage/x402-guard"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"x402-guard": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@paystage/x402-guard"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"x402-guard": {
"command": "npx",
"args": [
"-y",
"@paystage/x402-guard"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"x402-guard": {
"command": "npx",
"args": [
"-y",
"@paystage/x402-guard"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Tools this server provides (10)
Taken from the project documentation; the running server may differ.
- evaluate_mcp_payment
- Verifies the recipient and returns a pay, review or do_not_pay verdict before signing an x402 payment.
- evaluate_batch
- Evaluates several payments against one policy, returning one verdict each in order.
- list_outstanding_auths
- Lists ERC-20, Permit2 and EIP-3009 authorisations still outstanding.
- evaluate_outstanding_auths
- Flags outstanding authorisations needing attention before the next payment.
- evaluate_hip3_trade
- Checks a HIP-3 order against a trade policy, returning allow, review or do_not_trade.
- evaluate_velocity
- Runs rolling rate and spend checks for bursts, spikes and runaway cadence.
- verify_receipt
- Checks a receipt against the published signing key.
- decode_payment_required
- Turns a 402 header into the JSON challenge.
- validate_policy
- Checks a policy document on its own.
- request_testnet_funds
- Drips 0.5 Base Sepolia USDC to an address once per 24 hours.
What it does
- Pre-signature verdicts
- Each payment returns pay, review or do-not-pay before the wallet signs, with the rule that produced the result.
- Local policy file
- Spending limits, allowed payees, assets, networks and unknown-payee handling are set in one JSON policy.
- Read-only MCP server
- Ten MCP tools evaluate payments, batches, outstanding authorisations and velocity without signing anything.
- Seller-side verifier hook
- A hook for resource servers aborts payments that break policy before facilitator verification runs.
- Opt-in verdict logging
- Callbacks and an optional telemetry URL record verdicts without wallet addresses, signatures or request bodies.
Good for
- Capping how much an autonomous agent can spend per x402 request
- Blocking payments to payees outside an allowlist
- Checking a 402 challenge before an agent pays an MCP server
- Validating a spend policy file before deploying an agent
Pricing
Freemium
Packages are free and MIT licensed; hosted API is free for the first 1,000 evaluations per IP per day, then $0.002 USDC per call.
Prices change. Check paystage.xyz before you buy.
PayStage x402 Guard — payment safety before the wallet signs FAQ
Does it hold or sign with my keys?
No. The server returns a verdict and never signs; the agent stays the only signer.
What does it not cover?
It cannot reverse settled payments, detect colluding payees or see what a seller does after payment.
What does a hosted call cost?
The first 1,000 evaluations per IP per day are free without an account; beyond that the hosted API is $0.002 USDC per call over x402. The packages are MIT licensed.
Which versions are signed with provenance?
The README says every version from 0.1.1 onward is built and signed by the repository's CI; 0.1.0 was published by hand without attestation.
Is PayStage x402 Guard — payment safety before the wallet signs free?
PayStage x402 Guard — payment safety before the wallet signs has a free plan, with paid plans for more usage or features.
How do I add PayStage x402 Guard — payment safety before the wallet signs to Claude Code?
Run this command in your terminal: claude mcp add x402-guard -- npx -y @paystage/x402-guard
What are the best alternatives to PayStage x402 Guard — payment safety before the wallet signs?
The closest alternatives to PayStage x402 Guard — payment safety before the wallet signs are PayStage — x402 payment safety and spend policy, PayStage Preflight, PayStage Preflight, PayStage and Clawpay.
Where this comes from
- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.