# PayStage

The PayStage MCP server for Claude Code checks payments, authorizations, and trade requests against policies. Agents get a decision before signing a payment or trade order.

- 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/mcp
- 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

## What it does

PayStage evaluates x402 payments against a local policy file and returns a verdict before signing. It can also list pending ERC-20, Permit2, and EIP-3009 authorizations, flag ones that need attention, and assess spending patterns from recent action history.

For HIP-3 orders, the server applies a `TradePolicy` and returns allow, review, or do-not-trade. Other tools inspect receipts and policy documents, decode `payment-required` headers, and evaluate payment batches. A valid receipt signature does not establish that settlement took place; that is a separate on-chain event. The auth-watch tools read Base data through Base RPC, so they use network access.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `PAYSTAGE_POLICY_PATH`, `PAYSTAGE_RPC_URL` — 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> --env PAYSTAGE_RPC_URL=<PAYSTAGE_RPC_URL> --transport stdio mcp -- npx -y @paystage/mcp
```
Replace <…> with your own values

### Codex

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

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

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

## When to use it
- check an x402 payment before signing
- find pending ERC-20, Permit2, and EIP-3009 authorizations
- apply a trade policy to a HIP-3 order
- flag spending bursts or sharp increases
- verify a receipt and compare it with a request and policy

## Example prompts
- Check this x402 payment against the local policy before signing it.
- List pending ERC-20 and Permit2 authorizations.
- Assess this HIP-3 order using our `TradePolicy`.

## Similar
- [Context7](https://affpapa.org/en/nevibecode/mcp/context7.md) — MCP server · 5563 installs
- [Search Google Flights](https://affpapa.org/en/nevibecode/mcp/search-google-flights.md) — MCP server · 2595 installs
- [Math-MCP](https://affpapa.org/en/nevibecode/mcp/math-mcp.md) — MCP server · 5958 installs
- [pipeworx gateway](https://affpapa.org/en/nevibecode/mcp/pipeworx-gateway.md) — MCP server · 419019 installs
- [SparkForge](https://affpapa.org/en/nevibecode/mcp/sparkforge.md) — MCP server · 219896 installs
- [OpenWebSearch](https://affpapa.org/en/nevibecode/mcp/openwebsearch.md) — MCP server · 494 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
