# PayStage Preflight

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6 repo stars
- Author: base-buzz
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/base-buzz/paystage/tree/HEAD/packages/preflight
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/paystage-preflight

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `PAYSTAGE_POLICY_PATH` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env PAYSTAGE_POLICY_PATH=<PAYSTAGE_POLICY_PATH> --transport stdio preflight -- npx -y @paystage/preflight
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add preflight --env PAYSTAGE_POLICY_PATH=<PAYSTAGE_POLICY_PATH> -- npx -y @paystage/preflight
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "preflight": {
            "command": "npx",
            "args": [
                "-y",
                "@paystage/preflight"
            ],
            "env": {
                "PAYSTAGE_POLICY_PATH": "<PAYSTAGE_POLICY_PATH>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "preflight": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@paystage/preflight"
            ],
            "env": {
                "PAYSTAGE_POLICY_PATH": "<PAYSTAGE_POLICY_PATH>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e PAYSTAGE_POLICY_PATH=<PAYSTAGE_POLICY_PATH> preflight npx -y @paystage/preflight
```
Replace <…> with your own values

## When to use it
- 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
- Check this PaymentRequired payload via preflight
- Evaluate the transaction against the local spending policy
- Get a payment verdict from PayStage Preflight

## Similar
- [The STALL](https://affpapa.org/en/nevibecode/mcp/the-stall.md) — MCP server · 3348 installs
- [crypto-quant-signal-mcp](https://affpapa.org/en/nevibecode/mcp/crypto-quant-signal-mcp.md) — MCP server · 2046 installs
- [PreReason](https://affpapa.org/en/nevibecode/mcp/prereason-prereason.md) — MCP server · 1573 installs
- [Blocksize Market Data](https://affpapa.org/en/nevibecode/mcp/blocksize-market-data.md) — MCP server · 885 installs
- [DeltaSignal ATLAS-7](https://affpapa.org/en/nevibecode/mcp/deltasignal-atlas-7.md) — MCP server · 275 installs
- [NEXUS Intelligence API](https://affpapa.org/en/nevibecode/mcp/nexus-intelligence-api.md) — MCP server · 4735 installs

From the same set: [base-buzz/paystage](https://affpapa.org/en/nevibecode/by/base-buzz/paystage.md) — 4 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
