Feedback

Basic information

Version
0.10.0
Category
License
MIT
Transports
stdio
Author
piprail
Submitted by
Community
Quality
25

About Piprail MCP Server

Hand any AI agent a budget-capped wallet to pay, discover & register x402 payment-gated URLs across every chain. Local, self-custodial, no backend, no fee.

Piprail is a MCP server in the Other category listed in the AddMCP.net directory, published by piprail. It exposes 8 tools, including piprail_discover, piprail_quote_payment, piprail_plan_payment, piprail_pay_request and more. Supported transport: stdio. License: MIT. Source code is hosted on github.com. Related topics: agent-payments, autonomous-payments, crypto-payments, multichain, stablecoin.

Setup

{
    "mcpServers": {
        "piprail": {
            "command": "npx",
            "args": [
                "-y",
                "@piprail/mcp"
            ],
            "env": {
                "PIPRAIL_PRIVATE_KEY": "<YOUR_WALLET_KEY>",
                "PIPRAIL_CHAIN": "base",
                "PIPRAIL_MAX_AMOUNT": "0.10",
                "PIPRAIL_MAX_TOTAL": "10.00",
                "PIPRAIL_TOKENS": "USDC"
            }
        }
    }
}

Piprail MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "piprail": {
            "command": "npx",
            "args": [
                "-y",
                "@piprail/mcp"
            ],
            "env": {
                "PIPRAIL_PRIVATE_KEY": "<YOUR_WALLET_KEY>",
                "PIPRAIL_CHAIN": "base",
                "PIPRAIL_MAX_AMOUNT": "0.10",
                "PIPRAIL_MAX_TOTAL": "10.00",
                "PIPRAIL_TOKENS": "USDC"
            }
        }
    }
}

Piprail MCP Server tools

  • piprail_discover — Find x402 payment-gated resources on the OPEN indexes (a phone book of payable APIs) WITHOUT paying. Use it to answer "what can I buy?" — search by topic, then quote/plan/pay a chosen one. By default returns only resources payable on your wallet's chain (network='self'); pass 'any' for every chain. Results are cross-scheme: ALWAYS call piprail_quote_payment on a chosen resource (it re-checks the live price) before piprail_pay_request.
    query:string, network:string, category:string, asset:string, maxPrice:number, minReliability:number, verified:boolean, sort:string, limit:number
  • piprail_quote_payment — Get the price of an x402 payment-gated URL WITHOUT paying. Returns the amount, token, chain, recipient, and whether it is within the spend policy. Returns { gated: false } when the URL needs no payment. Call this first to decide whether a resource is worth buying.
    url:string*
  • piprail_plan_payment — Check whether you CAN pay an x402-gated URL before paying. Reads your wallet balance, native gas, and whether the recipient can receive — across every rail the URL offers on your chain — and returns { gated, payable, best, options, fundingHint }. payable:false means do NOT attempt the payment; fundingHint says exactly what to top up. Call this before piprail_pay_request so you never commit to a payment you cannot finish. Returns { gated: false } when no payment is needed.
    url:string*
  • piprail_pay_request — Fetch an x402 payment-gated URL, automatically making the required payment if needed (subject to the spend policy + approval hook). Pays whichever rail the client is configured for — PipRail's backendless on-chain rail, or, when enabled, the standard `exact` rail (where the buyer signs and the server settles, so no buyer gas). Returns the HTTP status, the response body, and a payment receipt if one settled. If the payment is refused by policy or the approval hook, returns { declined: true, reason } — no funds moved.
    url:string*, method:string, body:object|string
  • piprail_register — List an x402 payment-gated resource YOU run on the open indexes so other agents can discover it. Default target is 402 Index — no auth, no signature, no payment; a self-registered listing is pending review (verify your domain on 402index.io for instant approval). Returns one outcome per index ({ source, ok, detail, visibility, note }); a step the chain can't satisfy comes back ok:false with the reason. Moves no funds; nothing is PipRail-hosted. NOTE: index/agent payers are overwhelmingly standard `exact` clients — a default onchain-proof-only gate gets listed but they cannot pay it, so add an `exact` rail (and set the gate's `discovery` option, required for x402scan) to be usefully discoverable AND payable.
    url:string*, name:string, description:string, category:string, tags:array, priceUsd:number, network:string, asset:string, provider:string, contactEmail:string
  • piprail_budget — Read how much of your spend budget and time leash is left — per (network, asset) remaining, the cross-token GRAND TOTAL per denomination (e.g. how much USD you can still spend across every stablecoin and chain), the payment-count leash, the session time envelope, and your spend so far. Use it in Mode A (headless) to self-check BEFORE paying, so you never discover the leash by hitting a decline. Read-only; moves no funds. NOTE: the time envelope is in-memory for THIS process; the money/count totals persist only if a spend store is configured.
    (no parameters)
  • piprail_guide — Read the PipRail agent contract — the quote → plan → pay loop, how to read a refusal (and which declines are TERMINAL), the never-re-pay rule for broadcast-but-unconfirmed payments, and Mode A (headless) vs Mode B (supervised). Read-only; call it once if unsure how to use these tools.
    (no parameters)
  • piprail_verify_receipt — Re-verify a PipRail VERIFIABLE RECEIPT against the chain — confirm a payment REALLY settled (the funds provably moved to payTo for AT LEAST the stated amount) WITHOUT trusting whoever handed you the receipt. Read-only and WALLET-FREE: pass the PipRailReceipt JSON (from a prior piprail_pay_request `verifiableReceipt`, or any third party). Returns { ok, onChain:{payTo,asset,amount,payer}, matchesClaims, ageSeconds, error? }: `ok` = the chain confirms the settlement; `onChain.payer` is RE-DERIVED from the tx and `matchesClaims:false` means the receipt forged the payer; `amount` is a verified lower bound. Pass `rpcUrl` for a chain outside the common presets.
    receipt:object*, rpcUrl:string

Overview

What is Piprail?

Piprail is an MCP server that provides any AI agent (Claude Desktop, Cursor, Claude Code, Windsurf, VS Code, Cline) with a budget-capped wallet to autonomously pay x402 ("402 Payment Required") payment-gated URLs. It runs locally with your wallet and a spend policy the model cannot exceed — no backend, no custody, no facilitator, no fee.

How to use Piprail?

Run npx -y @piprail/mcp, add the config block (set your wallet key and spend caps via environment variables like PIPRAIL_MAX_AMOUNT, PIPRAIL_MAX_TOTAL, PIPRAIL_TOKENS, PIPRAIL_HOSTS, and PIPRAIL_CHAIN), then restart your client. The server exposes five tools for discovering, quoting, planning, paying, and registering x402 endpoints.

Key features of Piprail

  • Five tools for the full x402 payment lifecycle.
  • Budget-capped wallet enforced before any on-chain send.
  • Supports every major EVM chain plus Solana, TON, Tron, NEAR, Sui, Aptos, Algorand, Stellar, and XRP Ledger.
  • Works with USDC, USDT, and native coin across chains.
  • Wallet key never leaves your machine — no back end or custody.
  • Runs locally with no facilitator and no additional fee.

Use cases of Piprail

  • AI agents autonomously paying for APIs within a strict budget.
  • Discovering which x402-enabled endpoints are available (

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬