Skip to main content

Give Your AI Agent a Bitcoin Wallet

Lightning payments for Claude Code, Cursor, OpenClaw, and any MCP-compatible agent.

$ npx lightning-wallet-mcp

Your agent registers itself with one tool call. No signup forms, no keys to copy.

Your first five minutes

Install, then talk to your agent in plain English. Each line maps to one MCP tool.

  1. Install claude mcp add lightning-wallet -- npx lightning-wallet-mcp Cursor, Windsurf and other MCP clients: add the same npx lightning-wallet-mcp command to your MCP config.
  2. Create the wallet Register a Lightning wallet for me. Calls register_operator. The agent keeps its own key; nothing to copy.
  3. Fund it with a few sats Create a 500 sat deposit invoice and show it to me. Calls get_deposit_invoice. Pay it from any Lightning wallet; check_balance shows the sats within seconds.
  4. Pay an API, with a cap Pay this L402 API, and refuse anything over 200 sats. Calls pay_l402_api with max_payment_sats, straight from the operator wallet. Pick an endpoint from the API catalog; calls start at 1 sat. Standing per-agent budgets come later with create_agent and set_budget.

Quick Start

Give your AI agent a Bitcoin wallet. One command, zero API keys.

Terminal
npx lightning-wallet-mcp

Your agent registers itself with the register_operator tool. Works with Claude Code, Cursor, and any MCP client.

Claude Code Config
{
  "mcpServers": {
    "lightning-wallet": {
      "command": "npx",
      "args": ["lightning-wallet-mcp"]
    }
  }
}

Add to .mcp.json in your project, or run: claude mcp add lightning-wallet -- npx lightning-wallet-mcp

Terminal
# Install globally
npm install -g lightning-wallet-mcp

# Register a new agent wallet (free; add --email [email protected] if you want notifications)
lw register

# Fund it: prints a Lightning invoice to pay (the fortune call below costs 50 sats)
lw deposit 500

# Check balance (JSON stdout)
lw balance

# Pay an L402 API, capped at 100 sats
lw pay-api https://lightningfaucet.com/api/l402/fortune --max-sats 100

14 commands available. JSON output for easy parsing in scripts and CI.

How can my app know when a Lightning invoice is paid?

Register an invoice_paid webhook in the wallet API to receive a notification when an invoice is paid. Verify the webhook signature before acting on the event.

Funding setup: create a deposit · Webhook reference

Pricing

Free to start. 1% on payments, nothing under 100 sats.
No setup fees or monthly costs
1 sat minimum payment
Withdraw to self-custody anytime
No KYC required

Give your agent a wallet

$ npx lightning-wallet-mcp