# PayStage

> PayStage is an open-source MCP server for security. Read-only payment preflight for AI agents: pay, review or do-not-pay before signing. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API
- **Website:** https://paystage.xyz
- **Repository:** https://github.com/base-buzz/paystage/tree/HEAD/packages/mcp
- **MCP Registry name:** io.github.base-buzz/mcp
- **Categories:** security, finance and payments
- **Listing updated:** 2026-11-14

## About

PayStage sits outside the wallet. An agent describes a proposed payment, and the server checks it against a local policy file and returns pay, review or do-not-pay along with the rule that fired. It holds no keys and never signs, so the agent remains the only signer.

The umbrella package bundles payment preflight, auth watch, HIP-3 trade preflight and velocity checks, and the site describes nine small tools. A deny list of known drainer addresses is one example of a rule. Decisions can come back as signed receipts that a verify command checks; the README stresses that a valid receipt only proves a key signed it, not that the payment happened or the verdict was right.

The trade check is a policy gate only and does not place orders. The code is MIT licensed and runs over stdio via npx, with a remote option.

## Features

- **Pay or stop verdicts:** pay, review or do-not-pay with the rule shown.
- **Local policy:** Rules come from your policy.json.
- **Signed receipts:** Verifiable records of a decision.
- **Velocity checks:** Limits on payment frequency.
- **Trade preflight:** HIP-3 policy gate; places no orders.
- **Read-only:** Holds no keys and cannot sign.

## Good for

- Gate x402 payments an agent proposes
- Block known drainer addresses
- Cap spending rates for an agent
- Keep records of why a payment was allowed
- Preflight a HIP-3 trade against policy

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http mcp https://api.paystage.xyz/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://api.paystage.xyz/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp": {
      "url": "https://api.paystage.xyz/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp": {
      "type": "http",
      "url": "https://api.paystage.xyz/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp": {
      "serverUrl": "https://api.paystage.xyz/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://api.paystage.xyz/mcp"
    }
  }
}
```

## Tools

- `evaluate_mcp_payment`: Call this BEFORE signing any x402 payment. Verdict is pay | review | do_not_pay, each with stable reason codes (e.g. 'amount 1.00 USDC exceeds max_amount 0.05 USDC'). Returns the decision plus a signed receipt you can verify offline with verify_receipt. Read-only: holds no keys, never signs, never moves funds. A refusal costs nothing.
- `list_outstanding_auths`: Call this when auditing what an agent could still spend without a new signature — ERC-20 allowances, Permit2 and EIP-3009 authorisations. Returns each authorisation with spender, amount and expiry. Read-only and needs only a public RPC; no key, no funds moved. Use it after an incident to see what remains exposed, not to revoke anything (this tool cannot revoke).
- `evaluate_outstanding_auths`: Call this when an agent already holds authorisations and you need to know which are dangerous. Verdict is pay | review | do_not_pay per authorisation, with reason codes naming the rule that fired (unlimited allowance, expiry already passed, spender not on the allow-list). Returns per-authorisation decisions plus a summary action. Read-only: never revokes, never signs. Revocation is a transaction y
- `evaluate_hip3_trade`: Call this BEFORE an agent places a HIP-3 / trade.xyz order. Verdict is allow | review | do_not_trade, with the rule that fired (notional above cap, market not allowed, leverage too high). Returns the decision and a one-line reason. Local policy only: this is not financial advice, holds no keys, and cannot place or cancel an order. Prices come from a read-only market query.
- `evaluate_velocity`: Call this when an agent is about to make its Nth payment and you need to know whether the rate itself is the risk. Verdict is pay | review | do_not_pay over a rolling window (per-hour and per-day spend, count of payees). Returns the decision plus which window was breached. Read-only: it reads the history you pass in, holds no keys, and calls no external service.
- `verify_receipt`: Call this when you have a receipt and want to know whether it is genuine, without trusting the server that issued it. Returns VALID with the verdict it attests to, INVALID if the payload was altered, or UNVERIFIABLE when the key cannot be fetched — and UNVERIFIABLE is a refusal, not a pass. Needs only the receipt JSON and a network connection; no account, no shared secret. Fetches the signing key 
- `decode_payment_required`: Call this first when a 402 response arrives and you cannot read the payment-required header. Returns the decoded x402 v2 challenge: scheme, network, asset, atomic amount, payee, resource and timeout. Pure decoding: no network call, no signature, no verdict — use evaluate_mcp_payment when you want a decision. Fails closed with a named error if the header is malformed or not base64.
- `validate_policy`: Call this before wiring a policy into anything: a policy that fails validation makes every evaluation refuse, which looks like a product bug and is not one. Returns valid: true, or the exact field and message that is wrong. No payment needed, no network call, no key. Use it in CI on the policy file your agent ships with.
- `evaluate_batch`: Call this when an agent might pay several times in one turn and you want one policy decision covering all of them. Verdict is pay | review | do_not_pay per item, in input order, with reason codes — so the agent can stop at the first refusal rather than discovering it after three payments. Read-only, holds no keys, never signs. Cheaper and more consistent than calling evaluate_mcp_payment in a loop

## FAQ

### Can it sign or send payments?

No, it is read-only and holds no keys.

### What does a valid receipt prove?

Only that the verifying key signed it unaltered.

### How is policy set?

Through a policy.json path in PAYSTAGE_POLICY_PATH.

### Is it open source?

MIT licensed.

### Is PayStage free?

Yes. PayStage is open source, so you can use and self-host it for free.

### How do I add PayStage to Claude Code?

Run this command in your terminal: claude mcp add --transport http mcp https://api.paystage.xyz/mcp

### What are the best alternatives to PayStage?

The closest alternatives to PayStage are REA, Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Agent Roast and Midplane.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Solana MCP by Vybe](https://ai-powered.com/mcp/solana-mcp-by-vybe): Solana MCP by Vybe is an MCP server for finance and payments.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Budget Tracker](https://ai-powered.com/mcp/budget-tracker-2): Budget Tracker is a freemium MCP server for finance and payments.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.

---
Source: https://ai-powered.com/mcp/paystage-2
