BoltzPay
FreeNot checkedEnables AI agents to discover, quote, and pay for API data using x402 (USDC) and L402 (Bitcoin Lightning) protocols with built-in budget enforcement.
About
Enables AI agents to discover, quote, and pay for API data using x402 (USDC) and L402 (Bitcoin Lightning) protocols with built-in budget enforcement.
README
npm CI License: MIT TypeScript Node.js
BoltzPay
A
fetch()that pays. x402, L402, MPP — auto-detected, multi-chain, open source.
BoltzPay detects payment protocols, negotiates the best chain, pays, and returns data. One call. No vendor lock-in.
Docs · Registry · npm · GitHub
import { BoltzPay } from "@boltzpay/sdk";
const agent = new BoltzPay({
wallets: [
{ type: "coinbase", name: "main", coinbaseApiKeyId: "...", coinbaseApiKeySecret: "...", coinbaseWalletSecret: "..." },
],
budget: { daily: "5.00" },
});
const response = await agent.fetch(url);
// x402, L402, MPP — protocol auto-detected, payment handled
Discover
Browse 6,900+ scored endpoints from the BoltzPay Registry:
const apis = await agent.discover({ protocol: "mpp", minScore: 80 });
Protocols
| Protocol | Payment | Wallet |
|---|---|---|
| x402 | USDC on-chain (Base, Solana) | Coinbase CDP |
| L402 | Bitcoin Lightning | NWC |
| MPP | Stripe, Tempo, Visa | Multi-wallet |
The SDK auto-detects which protocol an endpoint uses. Configure one or more wallets — the router tries each until one succeeds.
Sessions
MPP streaming sessions with deposit, pay-per-chunk, and clean close:
const session = await agent.openSession(url);
const res = await session.fetch(url);
const receipt = await session.close(); // { totalSpent, refunded, voucherCount }
MCP
Wrap any MCP client with automatic payment handling (-32042):
const wrapped = await agent.wrapMcpClient(mcpClient);
const result = await wrapped.callTool({ name: "paid-tool" });
// Budget enforced, receipt returned
Or give Claude Desktop a payment wallet — zero code:
{
"mcpServers": {
"boltzpay": {
"command": "npx",
"args": ["-y", "@boltzpay/mcp"]
}
}
}
Budget & Safety
agent.on("budget:exceeded", (e) => console.log(`Blocked: ${e.period}`));
agent.on("payment", (e) => console.log(`${e.amount.toDisplayString()} via ${e.protocol}`));
const budget = agent.getBudget();
// { dailySpent, monthlySpent, dailyLimit, monthlyLimit,
// perTransactionLimit, dailyRemaining, monthlyRemaining }
Daily, monthly, per-transaction limits. Session deposit reservations. Allowlist/blocklist. Max amount guard.
CLI
npx @boltzpay/cli discover --protocol mpp --min-score 70
npx @boltzpay/cli fetch https://api.example.com
npx @boltzpay/cli diagnose https://api.example.com
npx @boltzpay/cli quote https://api.example.com
Packages
| Package | Description |
|---|---|
| @boltzpay/sdk | SDK — fetch, discover, sessions, budget, events |
| @boltzpay/core | Domain types, Money VO, protocol interfaces |
| @boltzpay/protocols | Protocol adapters (x402, L402, MPP) |
| @boltzpay/mcp | MCP server — 7 tools for Claude Desktop |
| @boltzpay/cli | CLI — terminal + Python bridge |
| @boltzpay/ai-sdk | Vercel AI SDK tools |
Integrations
- LangChain:
pip install langchain-boltzpay— docs - CrewAI:
pip install boltzpay-crewai— docs - n8n:
@boltzpay/n8n-nodes-boltzpay— docs - OpenClaw: see integrations/openclaw/
Contributing
See CONTRIBUTING.md for setup instructions and PR guidelines.
License
MIT — see LICENSE
Created by @leventilo
Install BoltzPay in Claude Desktop, Claude Code & Cursor
unyly install boltzpayInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add boltzpay -- npx -y @boltzpay/mcpStep-by-step: how to install BoltzPay
FAQ
Is BoltzPay MCP free?
Yes, BoltzPay MCP is free — one-click install via Unyly at no cost.
Does BoltzPay need an API key?
No, BoltzPay runs without API keys or environment variables.
Is BoltzPay hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install BoltzPay in Claude Desktop, Claude Code or Cursor?
Open BoltzPay on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare BoltzPay with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
