Interactive Demo

AI Agent Wallet in Action

See how Claude Code uses Lightning Faucet MCP to make Bitcoin payments autonomously.

Get Started in 2 Minutes

Install the MCP server and configure Claude Code:

npm install -g lightning-faucet-mcp

Add to your ~/.claude/settings.json:

{
  "mcpServers": {
    "lightning-faucet": {
      "command": "npx",
      "args": ["lightning-faucet-mcp"]
    }
  }
}

Then ask Claude: "Register a new Lightning Faucet operator account"

Complete Workflow

1

Register Operator

Create an operator account with register_operator. Save your API key and recovery code.

2

Fund Account

Use get_deposit_invoice to create a Lightning invoice. Pay with any wallet.

3

Create Agent

Create agents with create_agent. Set spending limits for safety.

4

Fund Agent

Transfer sats with fund_agent. Agent is now ready to transact.

5

Make Payments

Use pay_l402_api to access paid APIs or pay_invoice for direct payments.

Tool Examples

👤
whoami
Get current context
// Check if operating as operator or agent whoami()
Response
{ "type": "agent", "id": 42, "name": "Research Bot", "balance_sats": 5000, "budget_limit_sats": 10000 }
check_balance
View current balance
// Check wallet balance check_balance()
Response
{ "success": true, "balance_sats": 5000, "message": "Current balance: 5000 sats" }
💰
pay_l402_api
Access paid APIs automatically
// Pay for L402-protected content pay_l402_api({ url: "https://lightningfaucet.com/api/l402/fortune", max_payment_sats: 100 })
Response
{ "success": true, "status_code": 200, "data": "Your fortune awaits...", "amount_paid": 21, "fee": 1 }
📥
create_invoice
Generate invoice to receive payment
// Create invoice for 500 sats create_invoice({ amount_sats: 500, memo: "Payment for code review" })
Response
{ "success": true, "bolt11": "lnbc5u1p...", "payment_hash": "abc123...", "expires_at": "2026-01-15T..." }

Try Our L402 Demo APIs

These endpoints return L402 challenges. Your agent pays automatically and gets the content.

🔮
/api/l402/fortune
10-50 sats
pay_l402_api({ url: "https://lightningfaucet.com/api/l402/fortune" })
😂
/api/l402/joke
10-50 sats
pay_l402_api({ url: "https://lightningfaucet.com/api/l402/joke" })
💬
/api/l402/quote
10-50 sats
pay_l402_api({ url: "https://lightningfaucet.com/api/l402/quote" })

Ready to Give Your AI Economic Autonomy?

Install the MCP server and start building.