PipRail MCP Server

一个MCP服务器,让代理能够自主支付任何跨29条链的x402(HTTP 402)API——预算上限、自我托管、无需中介或费用。

文档

PipRail — the payment layer for the agent economy

@piprail/sdk @piprail/mcp types license x402 v2 chains GitHub stars Follow @piprailhq

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, 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

How a payment moves — the full life of one payment, side by side. Left, the traditional MPP path (Stripe + Tempo): the agent's money is held in transit through a processor and a permissioned chain across roughly five hops, takes ~T+2 days to become spendable, and can be frozen or reversed. Right, PipRail's x402 wallet-to-wallet rail: the agent pays the merchant's wallet directly in a single on-chain transaction, the merchant gate verifies it locally, funds are spendable in seconds, there's no custodian, and the fee is 0%.

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

PipRail pitch deck — the universal payment rail for the agent economy. Click to open the full 16-slide PDF, rendered right here in your browser.

▶︎  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.
@piprail/mcpAn MCP server giving any AI agent a budget-bound wallet (io.github.piprail/mcp).
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.

Documentation & links

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.


PipRail

Built for the agent economy · piprail.com