Skip to main content

Lightning MCP: 3-Minute Setup

Get your AI paying Lightning invoices in under 3 minutes. All 15 tools are free — no subscription required.

What You'll Get

After this guide, Claude can:

  • Pay any Lightning invoice
  • Access L402-protected APIs with automatic micropayments
  • Check your wallet balance and payment history
  • Buy from L402 stores (like agent-commerce.store)

What You Need

  1. Claude Code or Claude Desktop — Already installed
  2. A Strike account — Free, 2-minute signup

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

Strike is the fastest way to start. No infrastructure, no node, full L402 support.

  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
Why Strike?

Strike requires zero infrastructure, supports L402 (returns preimage on every payment), and handles custody. Want alternatives? See Wallet Options for NWC wallets (CoinOS, Alby Hub, CLINK) or LND for self-hosted.

Fund Your Wallet

Send a small amount of Bitcoin to your Strike wallet, or buy directly in the Strike app. Start with $1-5 worth.


Step 2: Install the MCP Server (30 seconds)

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

# Or Python
pip install lightning-enable-mcp
.NET not installed?

Download .NET 8+ SDK from https://dot.net/download


Step 3: Configure Claude (1 minute)

Claude Code

Edit your 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 after saving.

Other Clients


Step 4: Test It!

Open Claude and try:

Check Your Balance

Check my Lightning balance

Pay an Invoice

Pay this Lightning invoice: lnbc...

Access an L402 API

Get weather data for New York from agent-commerce.store

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.


You're Done!

All 15 tools are included for free:

ToolWhat It Does
pay_invoicePay any 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_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 pending payment

Set 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

Troubleshooting

"Wallet not configured"

Your Strike API key isn't being read. Check:

  1. Environment variable is set correctly in your MCP config
  2. Restart Claude after saving config changes
  3. Try running lightning-enable-mcp directly to see errors

"dotnet: command not found"

Install .NET 8+ SDK from https://dot.net/download

"uvx: command not found"

Install uv: pip install uv or curl -LsSf https://astral.sh/uv/install.sh | sh


Next Steps


Quick Reference

SettingWhere
Strike API Keydeveloper.strike.me
Claude Config~/.claude/claude_desktop_config.json (Claude Code)
Budget Config~/.lightning-enable/config.json
MCP Installdotnet tool install -g LightningEnable.Mcp

Questions? Open an issue on GitHub.