Evaluates x402 PaymentRequired requests against local spending policies to determine if an AI agent should proceed, review, or stop a payment.
Also known as base-buzz/paystage, preflight, @paystage/preflight
- Stars
- 5
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.2.2
- Last commit
- Nov 14, 2026
- License
- MIT
What is PayStage Preflight MCP?
PayStage Preflight evaluates x402 PaymentRequired requests against local spending policies to determine if an AI agent should proceed, review, or stop a payment.
Summary generated from the project's README
About PayStage Preflight MCP server
Evaluating x402 PaymentRequired requests against local spending policies is what PayStage Preflight enables for developers using AI agents. This MCP server acts as a safety layer that determines if an agent should proceed, request a human review, or stop a payment entirely. It functions as a local-first tool, meaning your spending policies reside in a JSON file on your machine rather than on a remote server. This approach ensures that no secrets or network calls are required to reach a decision.
Users can integrate this server into Claude Desktop or Cursor by configuring it as a stdio MCP server via npx. You must provide the absolute path to your policy file using the PAYSTAGE_POLICY_PATH environment variable. The server evaluates specific constraints such as allowed networks using CAIP-2 identifiers, specific assets, payTo addresses, and maximum amounts per call or session. It returns one of three deterministic verdicts: pay, review, or do_not_pay.
Written from the project's README. Every use case is checked against a quote from it.
How to install PayStage Preflight MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall PayStage Preflight MCP in Claude Code
$ claude mcp add preflight -- npx -y @paystage/preflightInstall PayStage Preflight MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"preflight": {
"command": "npx",
"args": [
"-y",
"@paystage/preflight"
]
}
}
}Install PayStage Preflight MCP in VS Code
.vscode/mcp.json
{
"servers": {
"preflight": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@paystage/preflight"
]
}
}
}Install PayStage Preflight MCP in VS Code CLI
$ code --add-mcp '{"name":"preflight","type":"stdio","command":"npx","args":["-y","@paystage/preflight"]}'Install PayStage Preflight MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"preflight": {
"command": "npx",
"args": [
"-y",
"@paystage/preflight"
]
}
}
}Install PayStage Preflight MCP in Codex
$ codex mcp add preflight -- npx -y @paystage/preflightInstall PayStage Preflight MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.preflight] command = "npx" args = ["-y", "@paystage/preflight"]
Install PayStage Preflight MCP in Gemini CLI
$ gemini mcp add -s user preflight npx -- -y @paystage/preflightInstall PayStage Preflight MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"preflight": {
"command": "npx",
"args": [
"-y",
"@paystage/preflight"
]
}
}
}Configuration
PAYSTAGE_POLICY_PATHPath to policy.json spending rules
| Name | Description | |
|---|---|---|
| PAYSTAGE_POLICY_PATH | Path to policy.json spending rules |
Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHub@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
| Verdict | Meaning |
|---|---|
pay |
Within policy — safe to proceed automatically. |
review |
Allowed but above a human threshold — ask a human before paying. |
do_not_pay |
Violates policy (network, asset, payTo, amount, timeout, or malformed). |
Supply chain and access
Socket.dev scores this package on what it can do, not what it does with it, so the flags it raises are worth explaining rather than removing:
| Flag | Why it is there |
|---|---|
| Filesystem access | Reads the policy JSON you point it at (policy_path / PAYSTAGE_POLICY_PATH). Nothing is written. |
| Environment variable access | PAYSTAGE_POLICY_PATH only (and PAYSTAGE_RPC_URL via auth-watch). |
| Network access, URL strings | None in this package. The RPC endpoints you may see in the tree belong to @paystage/auth-watch. |
No shell, no eval, no telemetry, no key custody. The full table is in
SECURITY.md; the deny list is published with a citation per
entry in KNOWN_DRAINERS.md.
Links
- Website: https://paystage.xyz
- X: https://x.com/paystage_xyz
- Source: https://github.com/base-buzz/paystage
- License: MIT
PayStage Preflight MCP questions
How do I add PayStage Preflight MCP to Claude Code?
Run claude mcp add preflight -- npx -y @paystage/preflight in your terminal. Add --scope user to make it available in every project.
How do I add PayStage Preflight MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What are the possible verdicts from the server?
The server returns one of three verdicts: pay (safe to proceed), review (requires human intervention), or do_not_pay (violates policy).
How is the spending policy stored and accessed?
The policy is stored locally in a JSON file on your machine, ensuring no secrets or network calls are needed to make a decision.
Does this server require network access to evaluate policies?
No, the package itself does not use network access or URL strings for policy evaluation.
Can I use this with Claude Desktop or Cursor?
Yes, it runs as a stdio MCP server that can be integrated into Claude Desktop and Cursor via their respective configuration files.