PayStage Preflight — Claude Code MCP server: what it does
PayStage Preflight — an MCP server for Claude Code that evaluates x402 payment requests against a local spending policy. Returns pay, review, or do_not_pay before an agent pays.
MIT ★ 6 updated 2026-11-16
claude mcp add --env PAYSTAGE_POLICY_PATH=<PAYSTAGE_POLICY_PATH> --transport stdio preflight -- npx -y @paystage/preflightWhat PayStage Preflight does
PayStage Preflight runs locally to check PaymentRequired against a JSON policy file without network calls or secret exposure. The configuration defines allowed networks, assets, payees, and limits per call or session.
The tool screens payees against lists of known drainers and OFAC SDN sanctioned addresses. Operation requires a policy file path specified via the PAYSTAGE_POLICY_PATH environment variable.
The stdio server integrates with clients like Claude Desktop and Cursor, delivering deterministic verdicts for identical inputs and policies.
What it helps with
- evaluate payment request before agent pays
- check address against OFAC SDN sanction list
- enforce maximum spending limits per session
- prevent transfers to known drainer addresses
Example prompts for the agent
- Check this PaymentRequired payload via preflight
- Evaluate the transaction against the local spending policy
- Get a payment verdict from PayStage Preflight
How to install PayStage Preflight
Platform CLI
claude mcp add --env PAYSTAGE_POLICY_PATH=<PAYSTAGE_POLICY_PATH> --transport stdio preflight -- npx -y @paystage/preflightReplace <…> with your own values
Platform CLI
codex mcp add preflight --env PAYSTAGE_POLICY_PATH=<PAYSTAGE_POLICY_PATH> -- npx -y @paystage/preflightReplace <…> with your own values
Config file
{
"mcpServers": {
"preflight": {
"command": "npx",
"args": [
"-y",
"@paystage/preflight"
],
"env": {
"PAYSTAGE_POLICY_PATH": "<PAYSTAGE_POLICY_PATH>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"preflight": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@paystage/preflight"
],
"env": {
"PAYSTAGE_POLICY_PATH": "<PAYSTAGE_POLICY_PATH>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e PAYSTAGE_POLICY_PATH=<PAYSTAGE_POLICY_PATH> preflight npx -y @paystage/preflightReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about PayStage Preflight
How to install PayStage Preflight in Claude Code?
Run claude mcp add preflight -- npx -y @paystage/preflight or include the policy path: claude mcp add --env PAYSTAGE_POLICY_PATH=<PAYSTAGE_POLICY_PATH> --transport stdio preflight -- npx -y @paystage/preflight.
What does PayStage Preflight do?
It evaluates x402 payment requirements against a local policy before an agent completes a transaction, returning pay, review, or do_not_pay.
What is needed to run PayStage Preflight?
It requires a local JSON policy file referenced by the PAYSTAGE_POLICY_PATH environment variable.