P

Piprail MCP

by piprail · io.github.piprail/mcp

A budget-bound x402 payment wallet for AI agents: it autonomously pays HTTP 402 payment-gated URLs across every major chain (EVM, Solana, and many non-EVM families). Self-custodial and backendless, your key, your RPC, with spend caps enforced before any on-chain send.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-piprail-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@piprail/mcp"
      ],
      "env": {
        "PIPRAIL_PRIVATE_KEY": "<YOUR_VALUE>",
        "PIPRAIL_CHAIN": "<VALUE>",
        "PIPRAIL_CHAINS": "<VALUE>",
        "PIPRAIL_MAX_AMOUNT": "<VALUE>",
        "PIPRAIL_MAX_TOTAL": "<VALUE>",
        "PIPRAIL_MAX_TOTAL_DENOM": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS_PER_WINDOW": "<VALUE>",
        "PIPRAIL_WARN_AT_FRACTION": "<VALUE>",
        "PIPRAIL_SPEND_LOG": "<VALUE>",
        "PIPRAIL_EVENT_LOG": "<VALUE>",
        "PIPRAIL_TOKENS": "<VALUE>",
        "PIPRAIL_SCHEMES": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-piprail-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@piprail/mcp"
      ],
      "env": {
        "PIPRAIL_PRIVATE_KEY": "<YOUR_VALUE>",
        "PIPRAIL_CHAIN": "<VALUE>",
        "PIPRAIL_CHAINS": "<VALUE>",
        "PIPRAIL_MAX_AMOUNT": "<VALUE>",
        "PIPRAIL_MAX_TOTAL": "<VALUE>",
        "PIPRAIL_MAX_TOTAL_DENOM": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS_PER_WINDOW": "<VALUE>",
        "PIPRAIL_WARN_AT_FRACTION": "<VALUE>",
        "PIPRAIL_SPEND_LOG": "<VALUE>",
        "PIPRAIL_EVENT_LOG": "<VALUE>",
        "PIPRAIL_TOKENS": "<VALUE>",
        "PIPRAIL_SCHEMES": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-piprail-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@piprail/mcp"
      ],
      "env": {
        "PIPRAIL_PRIVATE_KEY": "<YOUR_VALUE>",
        "PIPRAIL_CHAIN": "<VALUE>",
        "PIPRAIL_CHAINS": "<VALUE>",
        "PIPRAIL_MAX_AMOUNT": "<VALUE>",
        "PIPRAIL_MAX_TOTAL": "<VALUE>",
        "PIPRAIL_MAX_TOTAL_DENOM": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS_PER_WINDOW": "<VALUE>",
        "PIPRAIL_WARN_AT_FRACTION": "<VALUE>",
        "PIPRAIL_SPEND_LOG": "<VALUE>",
        "PIPRAIL_EVENT_LOG": "<VALUE>",
        "PIPRAIL_TOKENS": "<VALUE>",
        "PIPRAIL_SCHEMES": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-piprail-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@piprail/mcp"
      ],
      "env": {
        "PIPRAIL_PRIVATE_KEY": "<YOUR_VALUE>",
        "PIPRAIL_CHAIN": "<VALUE>",
        "PIPRAIL_CHAINS": "<VALUE>",
        "PIPRAIL_MAX_AMOUNT": "<VALUE>",
        "PIPRAIL_MAX_TOTAL": "<VALUE>",
        "PIPRAIL_MAX_TOTAL_DENOM": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS_PER_WINDOW": "<VALUE>",
        "PIPRAIL_WARN_AT_FRACTION": "<VALUE>",
        "PIPRAIL_SPEND_LOG": "<VALUE>",
        "PIPRAIL_EVENT_LOG": "<VALUE>",
        "PIPRAIL_TOKENS": "<VALUE>",
        "PIPRAIL_SCHEMES": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-piprail-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@piprail/mcp"
      ],
      "env": {
        "PIPRAIL_PRIVATE_KEY": "<YOUR_VALUE>",
        "PIPRAIL_CHAIN": "<VALUE>",
        "PIPRAIL_CHAINS": "<VALUE>",
        "PIPRAIL_MAX_AMOUNT": "<VALUE>",
        "PIPRAIL_MAX_TOTAL": "<VALUE>",
        "PIPRAIL_MAX_TOTAL_DENOM": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS_PER_WINDOW": "<VALUE>",
        "PIPRAIL_WARN_AT_FRACTION": "<VALUE>",
        "PIPRAIL_SPEND_LOG": "<VALUE>",
        "PIPRAIL_EVENT_LOG": "<VALUE>",
        "PIPRAIL_TOKENS": "<VALUE>",
        "PIPRAIL_SCHEMES": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-piprail-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@piprail/mcp"
      ],
      "env": {
        "PIPRAIL_PRIVATE_KEY": "<YOUR_VALUE>",
        "PIPRAIL_CHAIN": "<VALUE>",
        "PIPRAIL_CHAINS": "<VALUE>",
        "PIPRAIL_MAX_AMOUNT": "<VALUE>",
        "PIPRAIL_MAX_TOTAL": "<VALUE>",
        "PIPRAIL_MAX_TOTAL_DENOM": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS": "<VALUE>",
        "PIPRAIL_MAX_PAYMENTS_PER_WINDOW": "<VALUE>",
        "PIPRAIL_WARN_AT_FRACTION": "<VALUE>",
        "PIPRAIL_SPEND_LOG": "<VALUE>",
        "PIPRAIL_EVENT_LOG": "<VALUE>",
        "PIPRAIL_TOKENS": "<VALUE>",
        "PIPRAIL_SCHEMES": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
PIPRAIL_PRIVATE_KEY secret Yes Your private key for the wallet used to pay for requests.
PIPRAIL_CHAIN Yes The blockchain to use (e.g., 'base').
PIPRAIL_CHAINS No Pay across several chains (instead of PIPRAIL_CHAIN): a comma-separated list, e.g. base,polygon,solana. Give each its own PIPRAIL_<CHAIN>_KEY (+ optional PIPRAIL_<CHAIN>_RPC_URL). The agent pays whichever chain a 402 asks for — the first listed that can settle — under one shared budget.
PIPRAIL_MAX_AMOUNT Yes Maximum amount of tokens the agent can spend (e.g., '0.10').
PIPRAIL_MAX_TOTAL No Lifetime spend cap per token, in token units (default: 10.00).
PIPRAIL_MAX_TOTAL_DENOM No Cross-token GRAND TOTAL: one spend cap per denomination across every stablecoin and chain, e.g. USD:20.00,EUR:5.00. Not a price oracle — sums tokens of the same unit, each counted 1:1. Native coins are excluded.
PIPRAIL_MAX_PAYMENTS No Lifetime cap on the NUMBER of payments, across every chain + token (e.g. 100).
PIPRAIL_MAX_PAYMENTS_PER_WINDOW No Cap on the number of payments within PIPRAIL_WINDOW_SECONDS (a rolling rate limit; set PIPRAIL_WINDOW_SECONDS too).
PIPRAIL_WARN_AT_FRACTION No Emit an early-warning event when spend crosses this fraction of any cap, e.g. 0.8 (80%). Needs PIPRAIL_EVENT_LOG to be visible.
PIPRAIL_SPEND_LOG No Path to a local append-only spend log. When set, the budget (lifetime, grand total, counts) SURVIVES a restart — hydrated from this file. No backend; you own the file.
PIPRAIL_EVENT_LOG No Mirror payment events (settled / declined / budget-threshold) as one-line JSON to 'stderr' or a file path — the operator's notification stream. Default: off.
PIPRAIL_TOKENS No Comma-separated allowed token symbols, plus the alias 'native' for the chain's coin (default: USDC).
PIPRAIL_SCHEMES No Comma-separated payment schemes to settle (default: onchain-proof). Add 'exact' (onchain-proof,exact) to also pay standard x402 servers GASLESS on EVM + Solana (method auto-selected). Add 'upto' to also pay metered x402 servers on EVM (Permit2): sign a MAX, the server settles the actual <= max.

Similar servers