Skip to main content

Give Claude Code a Lightning Wallet

Get Claude Code paying Lightning invoices and accessing L402 APIs in under 3 minutes.


Step 1: Get a Strike API Key (1 minute)

Strike is the fastest way to get started. No infrastructure required.

  1. Download the Strike app or go to strike.me
  2. Create an account (requires phone number)
  3. Go to developer.strike.me
  4. Log in with your Strike account
  5. Click Generate API Key
  6. Copy the API key

That's it. Strike gives you a Lightning wallet with full L402 support (preimage on every payment).

Why Strike?

Strike is recommended because it requires zero infrastructure, supports L402 (returns preimage), and handles custody. Other options: NWC wallets (CoinOS, Alby Hub, CLINK) or LND (self-hosted).


Step 2: Install the MCP Server (30 seconds)

# .NET (recommended)
dotnet tool install -g LightningEnable.Mcp

# Or Python
pip install lightning-enable-mcp

Step 3: Configure Claude Code (1 minute)

Edit your Claude Code settings file:

macOS/Linux: ~/.claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

.NET:

{
"mcpServers": {
"lightning-enable": {
"command": "dotnet",
"args": ["tool", "run", "lightning-enable-mcp"],
"env": {
"STRIKE_API_KEY": "your-strike-api-key"
}
}
}
}

Python:

{
"mcpServers": {
"lightning-enable": {
"command": "uvx",
"args": ["lightning-enable-mcp"],
"env": {
"STRIKE_API_KEY": "your-strike-api-key"
}
}
}
}

Restart Claude Code after saving.


Step 4: Test It

Open Claude Code and try:

Check my Lightning balance

Claude will call check_wallet_balance and show your Strike balance.

Pay an Invoice

Pay this Lightning invoice: lnbc...

Access an L402 API

Fetch data from https://agent-commerce.store/api/weather/forecast?lat=40.71&lon=-74.00

Claude will automatically handle the L402 payment and return the data.

Buy from the Lightning Enable Store

Buy me a Lightning Enable t-shirt from store.lightningenable.com

Claude browses the catalog, checks out, pays the invoice, and gives you a claim link.


Spending Limits

Protect yourself with budget controls. Create ~/.lightning-enable/config.json:

{
"currency": "USD",
"tiers": {
"autoApprove": 0.10,
"logAndApprove": 1.00,
"formConfirm": 10.00
},
"limits": {
"maxPerPayment": 50.00,
"maxPerSession": 20.00
}
}
ThresholdBehavior
Under $0.10Auto-pay silently
$0.10 - $1.00Pay and log
$1.00 - $10.00Ask for confirmation
Over $50/paymentDenied
Over $20/sessionDenied

All 15 Tools

ToolWhat It Does
pay_invoicePay any BOLT11 Lightning invoice
check_wallet_balanceCheck wallet balance
get_payment_historyView recent payments
get_budget_statusCheck spending limits
configure_budgetAdjust spending limits
create_invoiceGenerate invoices to receive payments
check_invoice_statusCheck if an invoice was paid
access_l402_resourceAuto-pay L402 APIs
pay_l402_challengePay an L402 challenge manually
discover_apiFind L402 manifests and explore endpoints
get_btc_priceReal-time BTC price
get_all_balancesAll currency balances (Strike)
exchange_currencyConvert between currencies (Strike)
send_onchainSend Bitcoin on-chain
confirm_paymentConfirm a pending payment

Next Steps