PipRail

السجل الرسمي المالية والمدفوعات

Budget-bound x402 payment wallet for AI agents — pays HTTP 402 URLs, capped locally. No backend.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package @piprail/mcp
Claude Code
claude mcp add piprail -e 'PIPRAIL_PRIVATE_KEY=<your piprail_private_key>' -e 'PIPRAIL_CHAIN=<PIPRAIL_CHAIN>' -e 'PIPRAIL_CHAINS=<PIPRAIL_CHAINS>' -e 'PIPRAIL_MAX_AMOUNT=<PIPRAIL_MAX_AMOUNT>' -e 'PIPRAIL_MAX_TOTAL=<PIPRAIL_MAX_TOTAL>' -e 'PIPRAIL_MAX_TOTAL_DENOM=<PIPRAIL_MAX_TOTAL_DENOM>' -e 'PIPRAIL_MAX_PAYMENTS=<PIPRAIL_MAX_PAYMENTS>' -e 'PIPRAIL_MAX_PAYMENTS_PER_WINDOW=<PIPRAIL_MAX_PAYMENTS_PER_WINDOW>' -e 'PIPRAIL_WARN_AT_FRACTION=<PIPRAIL_WARN_AT_FRACTION>' -e 'PIPRAIL_SPEND_LOG=<PIPRAIL_SPEND_LOG>' -e 'PIPRAIL_EVENT_LOG=<PIPRAIL_EVENT_LOG>' -e 'PIPRAIL_TOKENS=<PIPRAIL_TOKENS>' -e 'PIPRAIL_SCHEMES=<PIPRAIL_SCHEMES>' -- npx -y @piprail/mcp@0.10.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "piprail": {
            "command": "npx",
            "args": [
                "-y",
                "@piprail/mcp@0.10.0"
            ],
            "env": {
                "PIPRAIL_PRIVATE_KEY": "<your piprail_private_key>",
                "PIPRAIL_CHAIN": "<PIPRAIL_CHAIN>",
                "PIPRAIL_CHAINS": "<PIPRAIL_CHAINS>",
                "PIPRAIL_MAX_AMOUNT": "<PIPRAIL_MAX_AMOUNT>",
                "PIPRAIL_MAX_TOTAL": "<PIPRAIL_MAX_TOTAL>",
                "PIPRAIL_MAX_TOTAL_DENOM": "<PIPRAIL_MAX_TOTAL_DENOM>",
                "PIPRAIL_MAX_PAYMENTS": "<PIPRAIL_MAX_PAYMENTS>",
                "PIPRAIL_MAX_PAYMENTS_PER_WINDOW": "<PIPRAIL_MAX_PAYMENTS_PER_WINDOW>",
                "PIPRAIL_WARN_AT_FRACTION": "<PIPRAIL_WARN_AT_FRACTION>",
                "PIPRAIL_SPEND_LOG": "<PIPRAIL_SPEND_LOG>",
                "PIPRAIL_EVENT_LOG": "<PIPRAIL_EVENT_LOG>",
                "PIPRAIL_TOKENS": "<PIPRAIL_TOKENS>",
                "PIPRAIL_SCHEMES": "<PIPRAIL_SCHEMES>"
            }
        }
    }
}

متغيرات البيئة

  • PIPRAIL_PRIVATE_KEY سري Your wallet's private key/seed for the chosen chain. Optional: omit it to run read-only (discover/quote/register/budget/guide); set it to let the agent pay. Stays on your machine; the spend policy caps every payment.
  • PIPRAIL_CHAIN Chain to pay on (default: base).
  • PIPRAIL_CHAINS 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 Max spend per single payment, in token units (default: 0.10).
  • PIPRAIL_MAX_TOTAL Lifetime spend cap per token, in token units (default: 10.00).
  • PIPRAIL_MAX_TOTAL_DENOM 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 Lifetime cap on the NUMBER of payments, across every chain + token (e.g. 100).
  • PIPRAIL_MAX_PAYMENTS_PER_WINDOW Cap on the number of payments within PIPRAIL_WINDOW_SECONDS (a rolling rate limit; set PIPRAIL_WINDOW_SECONDS too).
  • PIPRAIL_WARN_AT_FRACTION 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 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 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 Comma-separated allowed token symbols, plus the alias 'native' for the chain's coin (default: USDC).
  • PIPRAIL_SCHEMES 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.

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. How a payment moves
  2. 📊 The pitch deck
  3. What's here
  4. Quick taste
  5. Documentation & links
  6. Spread the word
  7. License & trademark

Let any HTTP endpoint charge for itself, and any agent pay for itself — across every major chain, in a couple of lines.

Website · Documentation · npm


PipRail implements the open x402 "402 Payment Required" standard with no backend, no database, no account, no API key, and no fee. Payments settle straight into your wallet, verified locally against your own RPC — across every major EVM chain plus Solana, TON, Tron, NEAR, Sui, Aptos, Algorand, Stellar & the XRP Ledger. Self-custodial throughout.

How a payment moves

The middle is the difference. A traditional processor holds the money in transit, takes days to release it, and can freeze or reverse it. PipRail removes the middle entirely — the agent pays the merchant's wallet directly, the merchant verifies it locally against their own RPC, and it settles in one transaction at 0% fee, self-custodial end to end. See it on piprail.com →

📊 The pitch deck

▶︎ **Open the full deck — PDF** ◀︎

Opens right here in your browser — no download, GitHub renders it inline. 16 slides · every stat sourced in the speaker notes.

The whole thesis in one read: why agent payments are happening now, why chain & token fragmentation is the enemy, and how a single chain: parameter turns PipRail into the universal adapter. The payment path is 0% forever — the moat and the distribution; value accrues to the layer around the free rail, never the rail itself.

What's inside — the 16-slide arc

#Slide#Slide
1Hero — the universal payment rail for the agent economy9The MCP — give your agent a budget-bound wallet
2Why now — money is moving on-chain10Open · dual-rail · gasless
3The new buyer — autonomous agents11MPP vs PipRail — count the middlemen
4The standard — x402, "402 Payment Required"12Discovery + integrations
5The problem — chain & token fragmentation13Why PipRail wins — the moat
6The reveal — the universal adapter14Traction
7How it works — 402 → pay → verify → 20015Business model — open core, 0% rail
8Two sides, one SDK — accept and pay16The ask

Source .pptx (fully editable, brand fonts embedded) lives in .claude/skills/branding/design/deck/. The root PipRail-deck.pdf is regenerated from it — don't hand-edit the PDF.

📖 Full documentation → docs.piprail.com

The single, searchable source of truth — every function, option, chain, and example. This README is just the front door.

What's here

@piprail/sdkThe TypeScript SDK — accept & make x402 payments. The product. Optionally swaps tokens where an open, keyless route exists (no fee, no API key, never automatic).
@piprail/mcpAn MCP server giving any AI agent a budget-bound wallet (io.github.piprail/mcp).
@piprail/createnpm create @piprail — scaffolds a runnable, mainnet-by-default x402 merchant in one command. Paste a public address; no key, no backend.
integrations/First-party agent-framework integrations — OpenClaw, Hermes, elizaOS (@piprail/elizaos-plugin), n8n (@piprail/n8n-nodes-piprail) & Mastra. Each wraps @piprail/sdk or @piprail/mcp; nothing new to build.
site/ · docs/ · examples/piprail.com · the docs.piprail.com source · runnable demos.

Quick taste

npm install @piprail/sdk viem
import { requirePayment } from '@piprail/sdk'

app.get('/report',
  requirePayment({ chain: 'base', token: 'USDC', amount: '0.05', payTo: '0xYourWallet…' }),
  (_req, res) => res.json({ report: 'TOP SECRET' }),
)

That route now costs 0.05 USDC on Base, paid straight to your wallet. Point an agent at it and it pays itself — name any chain with a single chain: parameter. The full quickstart, every chain, the MCP server, spend controls, and the error model are in the docs.

Spread the word

PipRail is free, open-source, and has no backend to sell you — so word of mouth is how it grows. If it saved you from building a payments backend, the best way to give back is to help other developers (and their agents) find it:

License & trademark

Code: MIT — use it, fork it, ship it, commercially or otherwise.

Name & brand: PipRail™, the logo, and the @piprail npm scope are trademarks of the PipRail project — MIT covers the code, not the name. Build on it freely; just don't call a fork "PipRail" or imply it's official. See TRADEMARK.md.

Built for the agent economy · piprail.com

الأسئلة الشائعة

ما هو PipRail؟

Budget-bound x402 payment wallet for AI agents — pays HTTP 402 URLs, capped locally. No backend.

كيف أثبّت PipRail؟

يعمل على جهازك. في Claude Code: claude mcp add piprail -e 'PIPRAIL_PRIVATE_KEY=<your piprail_private_key>' -e 'PIPRAIL_CHAIN=<PIPRAIL_CHAIN>' -e 'PIPRAIL_CHAINS=<PIPRAIL_CHAINS>' -e 'PIPRAIL_MAX_AMOUNT=<PIPRAIL_MAX_AMOUNT>' -e 'PIPRAIL_MAX_TOTAL=<PIPRAIL_MAX_TOTAL>' -e 'PIPRAIL_MAX_TOTAL_DENOM=<PIPRAIL_MAX_TOTAL_DENOM>' -e 'PIPRAIL_MAX_PAYMENTS=<PIPRAIL_MAX_PAYMENTS>' -e 'PIPRAIL_MAX_PAYMENTS_PER_WINDOW=<PIPRAIL_MAX_PAYMENTS_PER_WINDOW>' -e 'PIPRAIL_WARN_AT_FRACTION=<PIPRAIL_WARN_AT_FRACTION>' -e 'PIPRAIL_SPEND_LOG=<PIPRAIL_SPEND_LOG>' -e 'PIPRAIL_EVENT_LOG=<PIPRAIL_EVENT_LOG>' -e 'PIPRAIL_TOKENS=<PIPRAIL_TOKENS>' -e 'PIPRAIL_SCHEMES=<PIPRAIL_SCHEMES>' -- npx -y @piprail/mcp@0.10.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج PipRail إلى مفتاح API؟

نعم. يتطلب PIPRAIL_PRIVATE_KEY، وتضبطها في إعداداته.

هل PipRail مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون PipRail؟

ينشره piprail. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.