Money online was built for humans. PipRail rebuilds it for agents.
AI agents now earn and spend on their own — buying data, paying for compute, selling their work. But money
online still assumes a human with a credit card, scattered across dozens of blockchains that each settle
differently. An agent can’t swipe a card, and no endpoint can charge across them all.
The fragmented world
29 chains — each its own tokens, signing & gas
PipRail
one adapter · one line
The payoff
Any API⇄Any agent
charges for itself · pays on its own
Name a chain — PipRail handles the token, the signing, the proof.
One line, every chain, straight to your wallet. No backend, no facilitator, no fee.
29 chains·$0 fee·1 line·MIT open source
Two sides, one SDK.
The same package lets a server charge for a route and an agent
pay for one. Pick your side — both are a couple of lines.
Accept — your server gets paid
Gate any route so it charges for itself. Express, Next.js, or any edge runtime — no backend, no database.
One x402 line, one self-custodial driver per family — the same integration pays and gets paid across all
10 families, native coin or stablecoin. And PipRail reaches chains no other x402 SDK touches:
TON, Tron, NEAR, Sui, Aptos, Algorand, Stellar & the XRP Ledger, alongside every major EVM chain.
EVM20 mainnets — one driver covers them all
BNB Chain Ethereum Base Arbitrum Polygon Optimism Avalanche Kaia
+12 more
+ 9 more families — each a native, self-custodial driver
Solana TON Tron NEAR Sui Aptos Algorand Stellar XRPL
Need a chain we don’t ship? Pass a { id, rpcUrl } —
any EVM chain works, no allowlist. Browse every chain →
How it works.
A four-step round trip over plain HTTP. No facilitator, no custody.
See the full flow →
01
Agent calls your route
It gets back a 402 quote — price, token, payTo, chain.
02
Agent pays on-chain
One transfer, straight to your wallet. PipRail never touches the funds.
03
You verify locally
Your server checks the tx against your own RPC: succeeded, recent, right amount + recipient.
04
You return the data
200 OK — and the same proof can never be spent twice.
Open standard. No middleman.
x402 is the open payment rail the agent economy is converging on — and PipRail speaks it
without ever putting anyone in the middle. Funds settle to your wallet,
verified against your own RPC. Nobody to rate-limit you, take a cut, or shut you off — yet any x402 client in
the world can still pay you.
Nobody in the middle
No facilitator, no relayer, no custody. The payer broadcasts their own transfer; you verify it against your own RPC. Funds land straight in your wallet — no one can take a cut, throttle you, or shut you off.
The open standard
x402 was donated to the Linux Foundation — the neutral rail the agent economy is converging on. PipRail’s envelope is v2-conformant, so any x402 client — Coinbase’s, the reference client, anyone’s — can pay your gate.
One gate, both rails
Advertise the backendless onchain-proof rail and the ratified exact (EIP-3009) rail at once — standard clients pick one, PipRail clients the other. Proven end-to-end against the official x402 reference client on Base mainnet.
@piprail/mcp
Give your AI agent a wallet.
Paste one config block and Claude Desktop, Cursor, or any MCP client pays x402-gated APIs
on its own — across 29 chains, capped by a spend policy it
cannot exceed. No code, no backend, no custody.
npx -y @piprail/mcp — nothing to install. Then say
“pay for and summarize that report.”
Seven tools your agent gets
piprail_discover
find payable APIs on the open indexes — the phone book
piprail_quote_payment
price a gated URL — without paying
piprail_plan_payment
check it can afford it: balance, gas, recipient-readiness
piprail_pay_request
fetch it, paying the 402 automatically
piprail_register
list an endpoint you run so other agents find it
piprail_budget
read the remaining spend budget + time leash
piprail_guide
read the agent contract — how to quote, plan, pay
Use it where your agents already live.
Drop PipRail into the frameworks agents are built in — no payment code.
Each integration just wraps @piprail/mcp, so the agent gets all seven
tools, budget-bound — straight to your wallet.
OpenClaw
ClawHub skill
Hand an OpenClaw agent a budget-bound wallet across 29 chains. Install the skill, add one
mcp.servers entry, and the seven piprail_* tools appear —
no facilitator, no fee.
x402 lets your endpoint charge — PipRail makes it discoverable, built on the
open x402 indexes that already exist. No registry, no database, no fee — nothing PipRail-hosted. Three opt-in moves:
Emit
Turn your gate’s config into a crawlable /openapi.json — a static file on your own origin.
Register
client.register(url) lists you on 402 Index — no auth, no signature, no fee.
Discover
client.discover({ query }) reads the open indexes so an agent finds what to pay.
The essentials. More on the SDK,
MCP, and
Chains pages.
What is PipRail?
PipRail is an open-source (MIT) TypeScript SDK for x402 crypto payments. It lets any HTTP endpoint charge for itself, and lets AI agents pay for APIs on their own — across 29 chains, with no backend, no database, no account, and no fee. Payments settle straight to your own wallet, verified locally against your own RPC. It ships as two packages: @piprail/sdk (the library) and @piprail/mcp (an MCP server that hands any AI agent a budget-bound wallet). It also does x402 discovery, so endpoints can be registered on open indexes and found by agents.
What is x402?
x402 revives the dormant HTTP 402 "Payment Required" status code as a real payment protocol. A server answers a request with 402 plus a machine-readable challenge (price, token, chain, pay-to address); the caller pays on-chain and retries with proof, and the request goes through. It lets an HTTP endpoint charge for itself — no API keys, accounts, or invoices — which is exactly what AI agents need to pay for data and compute autonomously.
How do AI agents pay for APIs with PipRail?
Wrap the agent's HTTP calls with PipRailClient. Give it a wallet and a chain, then call client.fetch(url): on a 402 it reads the challenge, sends the payment on-chain, waits for confirmation, and retries with proof — automatically. An opt-in spend policy (maxAmount, maxTotal, chains, tokens, hosts) refuses out-of-bounds calls before any send, and paymentTools(client) hands the same to an LLM via MCP or function-calling — budget-bound so it can't overspend.
How do I let Claude or Cursor pay for things autonomously?
Install the PipRail MCP server: add a small config block to your MCP client (Claude Desktop, Cursor, Claude Code, Windsurf, VS Code, or Cline) that runs "npx -y @piprail/mcp" with your wallet key, chain, and spend caps. The agent gains seven tools — piprail_discover (find payable APIs), piprail_quote_payment, piprail_plan_payment, piprail_pay_request, piprail_register (list its own), piprail_budget (read its remaining budget), and piprail_guide (the agent contract) — so it finds and pays x402-gated APIs on its own across 29 chains. It runs locally with your own wallet, and the spend policy is enforced before any on-chain send, so the model literally cannot overspend.
Which chains and tokens does PipRail support?
29 chains across 10 families: 20 EVM mainnets (Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain, Avalanche, HyperEVM, Monad, Mantle, Sonic, Linea, Scroll, Celo, zkSync, Unichain, World Chain, Sei, Injective, Kaia) plus Solana, TON, Tron, NEAR, Sui, Aptos, Algorand, Stellar, and the XRP Ledger. USDC almost everywhere, USDT on most chains, EURC on Stellar, RLUSD on XRPL, the native coin on every chain, or any other token by address. One parameter — chain — picks everything.
Is there a fee to use PipRail?
No. PipRail charges no fee and takes no cut. It's an open-source (MIT) npm package, not a platform or hosted service. Payments settle straight into your own wallet — there's no PipRail backend, facilitator, or middleman in the path. You pay only normal network gas on whichever chain you choose.
Can any x402 client pay a PipRail endpoint?
Yes. PipRail's wire envelope is x402 v2-conformant, and a gate can opt into advertising the ratified "exact" (EIP-3009) scheme alongside its default backendless "onchain-proof" rail. A standard x402 client (Coinbase's, the open-source reference client) picks the exact rail; a PipRail client picks onchain-proof — both offered in the same 402. Settlement stays backendless either way: your own relayer key broadcasts the signed authorization, or you delegate to a third-party facilitator you choose, so the payer spends no gas and PipRail hosts nothing. It's verified end-to-end against the official x402 reference client on Base mainnet. The standard exact rail is EVM + EIP-3009 tokens (USDC/EURC) today; every other chain and token is paid via onchain-proof, which is itself x402.
Get paid by agents in the next five minutes.
One install. One line. Straight to your wallet, on every chain that matters.