Skip to main content

Give Claude Code a Lightning Wallet

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

For the full MCP setup guide (all clients, all wallet options), see MCP Quickstart.


Step 1: Get a Strike API Key

Strike is the fastest way to get started — no infrastructure required.

  1. Go to developer.strike.me and log in with your Strike account
  2. Click Generate API Key and copy the key
Why Strike?

Strike 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

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

# Or Python
pip install lightning-enable-mcp
NWC wallets (Python)

The base Python install works on every platform (including Windows). If you connect a Nostr Wallet Connect (NWC) wallet, install the optional extra instead: pip install lightning-enable-mcp[nwc]. Other wallets (LND, Strike, OpenNode) don't need it. (.NET is unaffected.)


Step 3: Configure Claude Code

Edit ~/.claude/claude_desktop_config.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

.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

Check my Lightning balance

Claude will call check_wallet_balance and show your Strike balance. Try also:

  • Pay this Lightning invoice: lnbc...
  • Fetch data from https://agent-commerce.store/api/weather/forecast?lat=40.71&lon=-74.00
  • Buy me a Lightning Enable t-shirt from store.lightningenable.com

Spending Limits

Create ~/.lightning-enable/config.json to protect yourself:

{
"currency": "USD",
"tiers": {
"autoApprove": 0.10,
"logAndApprove": 1.00,
"formConfirm": 10.00
},
"limits": {
"maxPerPayment": 50.00,
"maxPerSession": 20.00
}
}

Available Tools

23 tools total. 15 work out of the box, 8 require a Lightning Enable API key.

Out-of-the-box tools (15) — no API key required:

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_budgetTighten spending limits at runtime (can only lower caps, never raise above the operator's config)
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_apiSearch the L402 API registry or fetch a specific API's manifest
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 payment that exceeded the auto-approve threshold (using the code the server printed to its console)

Producer tools (2) — require LIGHTNING_ENABLE_API_KEY:

ToolWhat It Does
create_l402_challengeCreate a Lightning invoice + macaroon to sell access to your agent's services
verify_l402_paymentVerify an L402 token to confirm payment before granting access

Agent Service Agreement (ASA) tools (6) — require LIGHTNING_ENABLE_API_KEY:

Shipped 2026-04-18. Live at wss://agents.lightningenable.com / nostrwolfe.com. These tools enable agent-to-agent service discovery, service requests, and L402 settlement over Nostr (flow: discover → request → settle → attest). The 6 tools are request_agent_service (entry point), discover_agent_services, settle_agent_service, publish_agent_capability, publish_agent_attestation, and get_agent_reputation.


Next Steps