# refined-element/lightning-enable-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/refined-element/lightning-enable-mcp  
**GitHub Stars:** 9  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/refined-element-lightning-enable-mcp

## Description
Add Bitcoin Lightning payments to MCP-enabled AI agents. Pay invoices, create invoices, check balances, and access L402 paywalled APIs. Supports Strike, OpenNode, NWC wallets.

## Tools
Capabilities this server exposes over MCP:

- **setup_wallet** — Report the wallet this server pays from, or connect one. Call with no arguments first - it also returns the setup steps when no wallet is configured.
- **access_l402_resource** — Fetch a URL with GET or HEAD, automatically paying any L402 challenge and retrying. Read-only: other HTTP methods are refused. Returns the response plus what was paid.
- **pay_invoice** — Pay a BOLT11 Lightning invoice directly and get the preimage as proof.
- **pay_l402_challenge** — Pay an L402 or MPP invoice yourself and get the authorization token. Omit macaroon for MPP; pass challenge_header for a draft-00 Payment challenge.
- **test_l402_payment** — Self-test the wallet by paying the public 1-sat L402 test endpoint end to end. A 'needs_confirmation' verdict means the server printed a code to its console; re-run with confirmation_nonce.
- **get_balance** — Get the connected wallet's balance in sats, plus all currency balances and wallet info where the wallet reports them.
- **budget** — View or tighten this session's spending limits. Tightening is one-way - an agent can lower its caps but never raise the operator's config limits.
- **receipts** — List payments this wallet made. The durable log persists across restarts and says how to revoke the wallet; the session list is in-memory only.
- **create_invoice** — Create a BOLT11 Lightning invoice to receive a payment.
- **check_invoice_status** — Check whether an invoice from create_invoice has been paid.
- **verify_confirmation_code** — Check whether a payment confirmation code is still valid and what it authorizes. Verification ONLY - it never pays; to pay, re-call the payment tool with confirmation_nonce.
- **discover_api** — Discover L402 APIs: search the registry with query/category, or fetch one API's manifest with url.
- **docs** — Search or read the Lightning Enable docs. search: query -> sections. read: path, optional section -> text.
- **create_lightning_enable_account** — Self-bootstrapping signup: pay a ~100-sat activation fee for a Lightning Enable merchant API key. Needs only a wallet; the key is saved to ~/.lightning-enable/config.json.
- **wallet_ops** — Wallet operations beyond invoices: BTC price, currency exchange, on-chain sends. Strike only (send_onchain also works on LND).
- **l402_producer** — Sell access with L402: set up the seller account, monetize an API, mint challenges and verify payer tokens. Requires LIGHTNING_ENABLE_API_KEY.
- **agent_services** — Agent Service Agreements over Nostr: discover, request, settle, publish and review agent services. Requires LIGHTNING_ENABLE_API_KEY.
- **renew_lightning_enable_subscription** — Pay the L402 invoice that buys or extends 30 days of Lightning Enable Agentic Commerce for the configured API key. Needs a preimage-capable wallet.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "lightning-enable-mcp": {
    "command": "uvx",
    "args": ["lightning-enable-mcp"],
    "env": {
      "STRIKE_API_KEY": "",
      "NWC_CONNECTION_STRING": "",
      "LND_REST_HOST": "",
      "LND_MACAROON_HEX": "",
      "LND_TLS_CERT_PATH": "",
      "LND_SKIP_TLS_VERIFY": "",
      "LND_FEE_LIMIT_SATS": "",
      "OPENNODE_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `STRIKE_API_KEY`, `NWC_CONNECTION_STRING`, `LND_REST_HOST`, `LND_MACAROON_HEX`, `LND_TLS_CERT_PATH`, `LND_SKIP_TLS_VERIFY`, `LND_FEE_LIMIT_SATS`, `OPENNODE_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What refined-element/lightning-enable-mcp does

refined-element/lightning-enable-mcp gives MCP-compatible agents access to Bitcoin Lightning payment and commerce operations. It can pay BOLT11 invoices, create invoices for receiving funds, check invoice status, inspect wallet balances, and retrieve wallet information. L402 support lets an agent pay an invoice-and-macaroon challenge and use the resulting token to access a protected resource.

The server also connects agents to the L402 API registry. An agent can search for APIs by keyword or category, retrieve an API manifest, and use the `docs` tool to search or read Lightning Enable documentation locally without web access. Budget and receipt tools provide spending controls and payment history for the session or durable log.

## How it works

Start with `setup_wallet`. With no connection string, it reports the selected wallet provider and credential source without exposing the credential. An NWC connection string can be supplied to connect a wallet; the server validates the connection, checks that it responds, and stores it in `~/.lightning-enable/config.json` with user-only file permissions. The server should be restarted after saving a new wallet configuration.

Wallet selection prioritizes LND, then NWC, Strike, and OpenNode. Environment variables take precedence over values in the configuration file. The `test_l402_payment` tool can make a public one-satoshi payment to verify the complete L402 flow.

## Setup and configuration

Install one of the available packages or run the container:

- .NET: `dotnet tool install -g LightningEnable.Mcp`
- Python: `pip install lightning-enable-mcp`
- Python without installation: `uvx lightning-enable-mcp`
- Docker: `docker pull refinedelement/lightning-enable-mcp:latest`

Wallet credentials can be supplied through environment variables. Strike uses `STRIKE_API_KEY`; NWC uses `NWC_CONNECTION_STRING`; and LND uses `LND_REST_HOST` with `LND_MACAROON_HEX`. LND can additionally use a certificate path, TLS verification setting, fee limit, and payment timeout. OpenNode uses `OPENNODE_API_KEY` for direct payments and invoicing.

Claude Desktop can run either the .NET executable or the Python `uvx` command through its MCP configuration. A packaged MCPB bundle is also available for Claude Desktop and provides wallet settings through its extension interface.

## Tools and capabilities

- Pay BOLT11 invoices and return payment preimages.
- Pay L402 challenges or fetch URLs while automatically handling L402 payment.
- Create invoices and check whether they have been paid.
- Read balances, currency information for Strike, wallet details, budgets, and receipts.
- Check BTC prices, exchange currencies, and send on-chain funds through supported wallets.
- Discover L402 APIs and inspect their manifests.
- Configure, publish, proxy, price, and verify L402-protected services.
- Discover, request, settle, publish, unpublish, attest, and review agent services through the ASA tools.
- Create a Lightning Enable account or renew its 30-day Agentic Commerce subscription.

## Limitations and notes

A wallet is needed before the payment-related tools can operate. OpenNode supports invoicing and direct payments but does not return a preimage, so it cannot pay L402 challenges by itself. Producer and Agent Service Agreement features require an Agentic Commerce subscription. On-chain sending includes safeguards such as a confirmation nonce, and payment approval can require a human-readable confirmation code when a payment exceeds the configured auto-approval threshold.

_Full upstream README: https://allmcps.com/mcp/refined-element-lightning-enable-mcp/readme_

