# PayStage Trade Preflight

The PayStage Trade Preflight MCP server for Claude Code checks HIP-3 and trade.xyz orders against a local TradePolicy. It returns a decision before an order enters a trading flow.

- 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/trade-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-trade-preflight

## What it does

The server compares a proposed HIP-3 or trade.xyz order with a TradePolicy and returns `allow`, `review`, or `do_not_trade`. Its response includes rule-by-rule results.

Evaluation runs locally, and the server does not submit or sign orders. If the caller omits a market snapshot, it makes a read-only POST to `https://api.hyperliquid.xyz/info`. The tool takes an order and a policy object or file path, and runs with `npx -y @paystage/trade-preflight`.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add trade-preflight -- npx -y @paystage/trade-preflight
```

### Codex

**Platform CLI**
```bash
codex mcp add trade-preflight -- npx -y @paystage/trade-preflight
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "trade-preflight": {
            "command": "npx",
            "args": [
                "-y",
                "@paystage/trade-preflight"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "trade-preflight": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@paystage/trade-preflight"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add trade-preflight npx -y @paystage/trade-preflight
```

## When to use it
- check an order against custom risk rules
- flag an order for human review
- block a trade that breaks a hard policy rule
- read the reasons behind each policy result

## Example prompts
- Check this BTC-USD buy order for 100 USDC against the TradePolicy.
- Evaluate this HIP-3 order and return the decision with rule results.
- Use the policy file to check this order; send it for review if the market is unknown.

## Similar
- [post-trade-compliance](https://affpapa.org/en/nevibecode/skills/post-trade-compliance.md) — skill · 714 installs
- [Hyperliquid Portfolio — Account State & Trade History](https://affpapa.org/en/nevibecode/mcp/hyperliquid-portfolio-account-state-trade-history.md) — MCP server · 1178 installs
- [okx-cex-trade](https://affpapa.org/en/nevibecode/skills/okx-cex-trade.md) — skill · 10700 installs
- [earnings-trade-analyzer](https://affpapa.org/en/nevibecode/skills/earnings-trade-analyzer.md) — skill · 3800 installs
- [pair-trade-screener](https://affpapa.org/en/nevibecode/skills/pair-trade-screener.md) — skill · 3800 installs
- [trade-execution](https://affpapa.org/en/nevibecode/skills/trade-execution.md) — skill · 762 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
