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. Create an account in the Strike app or at strike.me.
  2. Sign in at dashboard.strike.me, create an API key, and copy it.
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

The base Python install supports NWC wallets on every platform; the old [nwc] extra adds nothing.


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 is different

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 MCP Quick Start for the Desktop config format.


Step 4: Test It​

Check my Lightning balance

Claude will call get_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​

Before the first real payment, edit the limits in ~/.lightning-enable/config.json (the server creates it on first run). See Set Spending Limits for a starting configuration.

Payments above your auto-approve threshold need a confirmation code that the server prints to its console. Claude Code can run shell commands on the same machine, so it could in principle edit config.json or read files the server writes. Keep the wallet small, and read the threat model before connecting real funds.


Available Tools​

Paying, invoicing, L402, budget, and API-discovery tools need only a wallet. Selling access over L402 and some agent-marketplace actions also need LIGHTNING_ENABLE_API_KEY. See the MCP Complete Guide for the full tool list.


Next Steps​