Skip to main content
MCP server CX Codex

Lightning Enable MCP Server — Claude Code MCP server for agent payments

Hands your agent a Lightning wallet: BOLT11 invoice payments, L402 API access, budgets and receipts. Useful when the agent pays for APIs on its own.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add lightning-enable-mcp -e STRIKE_API_KEY=<STRIKE_API_KEY> -e NWC_CONNECTION_STRING=<NWC_CONNECTION_STRING> -e LND_MACAROON_HEX=<LND_MACAROON_HEX> -e OPENNODE_API_KEY=<OPENNODE_API_KEY> -e LIGHTNING_ENABLE_API_KEY=<LIGHTNING_ENABLE_API_KEY> -- uvx lightning-enable-mcp
Open on GitHub

What Lightning Enable MCP Server does

This server wires Lightning Network tools into an agent. It pays BOLT11 invoices, settles L402 challenges automatically when a paid API is called, searches the L402 registry by keyword or category, and pulls a single API's manifest with endpoints and prices. A second group covers spend tracking: budget caps, a receipt log, balance checks. There is also the receiving side — invoice creation, BTC price, currency exchange, on-chain sends through Strike.

No wallet means nothing runs, so the first step is setup_wallet. The quickest route is NWC: create a Nostr Wallet Connect connection in your wallet app (Alby Hub, CoinOS, any NIP-47 wallet), hand the nostr+walletconnect:// string to the agent, and it validates the string, connects to prove the wallet answers, then writes it to ~/.lightning-enable/config.json with permissions limited to your user. Restart the server afterwards. Environment variables work too: STRIKE_API_KEY, NWC_CONNECTION_STRING, LND_REST_HOST plus LND_MACAROON_HEX. Priority runs LND, then NWC, Strike, OpenNode, and env vars beat the config file — setup_wallet refuses to write a string an env var would override and names the variable to unset.

L402 needs a wallet that returns the payment preimage. OpenNode does not, so it only covers invoicing and direct payments; making it your only wallet breaks the main use case.

What it helps with

  • pay a BOLT11 invoice from inside the agent
  • clear an L402 challenge on a paid API without manual steps
  • find a paid API in the L402 registry by category
  • keep a spend cap and a receipt log
  • issue an invoice to receive a payment

Example prompts for the agent

  • Run setup_wallet with this connection string: nostr+walletconnect://...
  • Run test_l402_payment to check the wallet
  • Search the L402 registry for an image generation API and show me the prices

How to install Lightning Enable MCP Server

Platform CLI

claude mcp add lightning-enable-mcp -e STRIKE_API_KEY=<STRIKE_API_KEY> -e NWC_CONNECTION_STRING=<NWC_CONNECTION_STRING> -e LND_MACAROON_HEX=<LND_MACAROON_HEX> -e OPENNODE_API_KEY=<OPENNODE_API_KEY> -e LIGHTNING_ENABLE_API_KEY=<LIGHTNING_ENABLE_API_KEY> -- uvx lightning-enable-mcp

Replace <…> with your own values. 4 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from lightning-enable-mcp <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Lightning Enable MCP Server

How do I install Lightning Enable MCP Server in Claude Code?

With one command: `claude mcp add lightning-enable-mcp -e STRIKE_API_KEY=<STRIKE_API_KEY> -e NWC_CONNECTION_STRING=<NWC_CONNECTION_STRING> -e LND_MACAROON_HEX=<LND_MACAROON_HEX> -e OPENNODE_API_KEY=<OPENNODE_API_KEY> -e LIGHTNING_ENABLE_API_KEY=<LIGHTNING_ENABLE_API_KEY> -- uvx lightning-enable-mcp`. Fill in your own keys; unused ones can be left out.

What does Lightning Enable MCP Server do?

It gives an agent a Lightning wallet: invoice payments, automatic L402 challenge handling, paid API discovery, budget caps with a receipt log, and invoice creation for incoming payments. Seller and Agent Service Agreement tools need an Agentic Commerce subscription.

Which wallet works for L402?

One that returns the payment preimage: Strike, NWC, or your own LND node. OpenNode does not return a preimage, so it cannot pay L402 challenges.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor