Lightning MCP: 3-Minute Setup
Get your AI paying Lightning invoices in under 3 minutes. All 15 tools are free — no subscription required.
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
- Claude Code or Claude Desktop — Already installed
- 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.
- 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
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
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
- Cursor Setup —
.cursor/mcp.json - Claude Desktop — Same config format
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:
| Tool | What It Does |
|---|---|
pay_invoice | Pay any 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 | Search the L402 API registry or fetch a specific API's manifest |
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 |
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
}
}
| 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 |
Troubleshooting
"Wallet not configured"
Your Strike API key isn't being read. Check:
- Environment variable is set correctly in your MCP config
- Restart Claude after saving config changes
- Try running
lightning-enable-mcpdirectly 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
- Spending Security — Advanced budget controls
- Wallet Options — NWC, LND, and other wallets
- All 15 Tools — Complete tool reference
- Agent Commerce Store — 15 L402 APIs to test with
Quick Reference
| Setting | Where |
|---|---|
| Strike API Key | developer.strike.me |
| Claude Config | ~/.claude/claude_desktop_config.json (Claude Code) |
| Budget Config | ~/.lightning-enable/config.json |
| MCP Install | dotnet tool install -g LightningEnable.Mcp |
Questions? Open an issue on GitHub.