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.
- Download the Strike app or go to strike.me
- Create an account (requires phone number)
- Go to developer.strike.me
- Log in with your Strike account
- Click Generate API Key
- Copy the API key
That's it. Strike gives you a Lightning wallet with full L402 support (preimage on every payment).
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
}
}
| Threshold | Behavior |
|---|---|
| Under $0.10 | Auto-pay silently |
| $0.10 - $1.00 | Pay and log |
| $1.00 - $10.00 | Ask for confirmation |
| Over $50/payment | Denied |
| Over $20/session | Denied |
All 15 Tools
| Tool | What It Does |
|---|---|
pay_invoice | Pay any BOLT11 Lightning invoice |
check_wallet_balance | Check wallet balance |
get_payment_history | View recent payments |
get_budget_status | Check spending limits |
configure_budget | Adjust spending limits |
create_invoice | Generate invoices to receive payments |
check_invoice_status | Check if an invoice was paid |
access_l402_resource | Auto-pay L402 APIs |
pay_l402_challenge | Pay an L402 challenge manually |
discover_api | Find L402 manifests and explore endpoints |
get_btc_price | Real-time BTC price |
get_all_balances | All currency balances (Strike) |
exchange_currency | Convert between currencies (Strike) |
send_onchain | Send Bitcoin on-chain |
confirm_payment | Confirm a pending payment |
Next Steps
- Spending Security — Advanced budget controls
- Wallet Options — Other wallet choices (NWC, LND)
- Agent Commerce Store — 15 L402 APIs to test with