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.
- Go to developer.strike.me and log in with your Strike account
- Click Generate API Key and copy the key
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
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
Register the server with the claude mcp add command:
.NET:
claude mcp add --transport stdio lightning-enable \
--env STRIKE_API_KEY=your-strike-api-key \
-- lightning-enable-mcp
Python:
claude mcp add --transport stdio lightning-enable \
--env STRIKE_API_KEY=your-strike-api-key \
-- uvx lightning-enable-mcp
Alternatively, create a project-scoped .mcp.json in your project root (don't commit API keys):
{
"mcpServers": {
"lightning-enable": {
"command": "lightning-enable-mcp",
"env": {
"STRIKE_API_KEY": "your-strike-api-key"
}
}
}
}
Restart Claude Code after saving, then run /mcp to verify the server is connected.
Claude Desktop does not use claude mcp add — it reads claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\, Linux: ~/.config/claude/). See the MCP Complete Guide for the Desktop config format.
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.00Buy 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
The MCP server is open-source (MIT) and free to install. Wallet, invoice, L402, budget, and API-discovery tools work out of the box with just a wallet. Producer tools (sell access via L402) and Agent Service Agreement tools (agent-to-agent commerce over Nostr) unlock with a Lightning Enable API key. See the MCP Complete Guide for the full tool list.
Next Steps
- MCP Quickstart — Full setup guide for all MCP clients
- Spending Security — Advanced budget controls
- Wallet Options — NWC, LND, and other wallets
- Agent Commerce Store — L402 APIs to test with