piprail
x402 (HTTP 402 Payment Required) SDK + MCP server: let any API charge for itself and any AI agent pay for itself, USDC & stablecoins across EVM, Solana & 8 more chain families, in a couple of lines. Backendless, no fee, self-custodial, paid straight to your wallet. TypeScript, MIT.
Documentation
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 pitch deck
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 |
|---|---|---|---|
| 1 | Hero β the universal payment rail for the agent economy | 9 | The MCP β give your agent a budget-bound wallet |
| 2 | Why now β money is moving on-chain | 10 | Open Β· dual-rail Β· gasless |
| 3 | The new buyer β autonomous agents | 11 | MPP vs PipRail β count the middlemen |
| 4 | The standard β x402, "402 Payment Required" | 12 | Discovery + integrations |
| 5 | The problem β chain & token fragmentation | 13 | Why PipRail wins β the moat |
| 6 | The reveal β the universal adapter | 14 | Traction |
| 7 | How it works β 402 β pay β verify β 200 | 15 | Business model β open core, 0% rail |
| 8 | Two sides, one SDK β accept *and* pay | 16 | The 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/sdk`** | The TypeScript SDK β accept & make x402 payments. The product. |
|---|---|
| **`@piprail/mcp`** | An MCP server giving any AI agent a budget-bound wallet (`io.github.piprail/mcp`). |
| **`@piprail/create`** | `npm 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 viemimport { 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
- **docs.piprail.com** β the complete manual (source of truth)
- **MCP server Β· Discovery Β· Supported chains**
- **Integrations** β drop PipRail into agent frameworks: OpenClaw, Hermes, elizaOS, n8n & Mastra (more coming)
- **Runnable examples** β merchant + agent demos, a live Anvil end-to-end, and the `why-402` teardown
- **Releasing (tag-driven CI) Β· Contributing** (DCO)
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:
- β **Star PipRail on GitHub** β the #1 way to help others discover it
- π **Follow @piprailhq** β new chains, ship logs, and agent-payment tips
- π **piprail.com Β· π docs.piprail.com**
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.
Frequently asked questions
What is piprail?
piprail is x402 (HTTP 402 Payment Required) SDK + MCP server: let any API charge for itself and any AI agent pay for itself, USDC & stablecoins across EVM, Solana & 8 more chain families, in a couple of lines. Backendless, no fee, self-custodial, paid straight to your wallet. TypeScript, MIT.
How do I install piprail?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is piprail open source?
Yes β it is hosted on GitHub at https://github.com/piprail/piprail and has 8 stars.
Related MCP tools
The go-to web for your AI coding agent β local-first search, fetch, crawl & research over MCP. No API keys, no cloud, $0/query. Public beta.
MCP server that enables AI assistants to interact with Google Gemini CLI, leveraging Gemini's massive token window for large file analysis and codebase understanding
π Plug-and-play library to enable agents to call MCP and UTCP tools via code execution.
Browser automation clicks buttons. OpenTabs calls APIs.
Code research platform for AI agents; find, understand, and prove context across your code and all of GitHub, in a fraction of the tokens. One toolset, MCP or CLI
Open-source cross-agent memory layer for coding agents via MCP. Compatible with Claude Code, Codex, Cursor, Windsurf, Gemini CLI, Antigravity, OpenClaw, Hermes Agent, Oh-my-Pi, Pi, Copilot, Kiro, OpenCode, and Trae.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP