Skip to main content

Prerequisites

  • Node.js >= 20.0.0
  • Package manager: npm, pnpm, or yarn

SDK

Install the SDK in your TypeScript or JavaScript project:
The SDK works in explore mode with zero configuration: you can quote prices, diagnose endpoints, and discover APIs without any credentials. To enable payments, install the Coinbase CDP SDK peer dependency:
@coinbase/cdp-sdk is an optional peer dependency. The SDK loads it lazily on the first fetch() call, so your bundle stays lean if you only use explore mode.

MCP Server (Claude Desktop)

No install needed. Run directly with npx:
Add it to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
This gives Claude 7 tools: fetch, quote, diagnose, budget, history, discover, and wallet. The discover tool now supports protocol, score, and query filters to narrow results.

CLI

No install needed. Run directly with npx:
Or install globally:
Then use the boltzpay command directly:

Credentials Setup

Coinbase CDP (required for payments)

BoltzPay uses Coinbase CDP to sign on-chain transactions (USDC on Base). You need three values:
1

Create an account

Go to portal.cdp.coinbase.com and create an account.
2

Create an API key

You will get an API Key ID and an API Key Secret.
3

Create a wallet

Note the Wallet Secret.
4

Set environment variables

Keep your secrets out of source code. Use a .env file or your platform’s secret management.

Tempo (MPP protocol)

For MPP endpoints using the Tempo payment channel network. You need a private key (hex-encoded).
Or in the SDK constructor via the wallets array:
Tempo wallets enable both one-shot MPP payments and streaming sessions via payment channels. See Sessions for the streaming API.
For the MCP server, pass credentials via the env block in your Claude Desktop config:

NWC (optional, for L402 protocol)

If you want to pay L402-compatible endpoints (Bitcoin Lightning payments), you need a Nostr Wallet Connect (NWC) connection string from a Lightning wallet.

How to get your NWC connection string

  1. Coinos (recommended) — Free web wallet. Sign up with a username and password, then go to ☰ Menu > ⚙️ Preferences > Nostr > Copy NWC. Your nostr+walletconnect://... string is ready.
  2. Primal — Free mobile app with built-in Lightning wallet and NWC support.
  3. Alby Hub — Your own Lightning node. Available as a cloud service ($12.90/mo) or free self-hosted (Docker). Go to Connections > Add Connection to generate the NWC URI.
  4. Any NWC walletUmbrel, Start9, or any wallet listed on nwc.dev.

Set the connection string

Or in the SDK constructor:
Most endpoints today use the x402 protocol (USDC). L402 is a Lightning-native protocol from Lightning Labs. You can enable both simultaneously — the SDK auto-detects which protocol each endpoint uses.