Skip to main content
ClaudeWave
refined-element avatar
refined-element

lightning-enable-mcp

Ver en GitHub

MCP server enabling AI agents to make Lightning Network payments

MCP ServersRegistry oficial9 estrellas2 forks● C#MITActualizado today
ClaudeWave Trust Score
95/100
✓ Verified
Passed
  • ✓Open-source license (MIT)
  • ✓Actively maintained (<30d)
  • ✓Clear description
  • ✓Topics declared
  • ✓Documented (README)
Last scanned: 9/25/2026
Install in Claude Code / Claude Desktop
Method: NPX · @anthropic-ai/mcpb
Claude Code CLI
claude mcp add lightning-enable-mcp -- npx -y @anthropic-ai/mcpb
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "lightning-enable-mcp": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcpb"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
Casos de uso

Resumen de MCP Servers

<!-- mcp-name: io.github.refined-element/lightning-enable-mcp -->

Part of [Lightning Enable](https://lightningenable.com) — infrastructure for agent commerce over Lightning.

# Lightning Enable MCP Server

[![Discord](https://img.shields.io/discord/1405389254892195951?label=community&logo=discord&color=5865F2)](https://discord.gg/rX7NxHY8vx)
[![PyPI downloads](https://img.shields.io/pypi/dm/lightning-enable-mcp?label=PyPI%20downloads&logo=pypi&logoColor=white)](https://pypi.org/project/lightning-enable-mcp/)
[![NuGet downloads](https://img.shields.io/nuget/dt/LightningEnable.Mcp?label=NuGet%20downloads&logo=nuget)](https://www.nuget.org/packages/LightningEnable.Mcp)
[![Docker pulls](https://img.shields.io/docker/pulls/refinedelement/lightning-enable-mcp?label=Docker%20pulls&logo=docker&logoColor=white)](https://hub.docker.com/r/refinedelement/lightning-enable-mcp)

## Monetize your own API — 30-day free trial

Agents pay your API per request over Lightning — flat subscription at $49/mo, and you keep 100% of every sat.

- **[Start free trial](https://api.lightningenable.com/Checkout?plan=individual&utm_source=github&utm_medium=readme&utm_campaign=gtm-aug-2026)** — 30 days, no charge today
- **[Fast Lane](https://docs.lightningenable.com/getting-started/activate-with-lightning?utm_source=github&utm_medium=readme&utm_campaign=gtm-aug-2026)** — pay 100 sats over Lightning, no card
- **[Pricing](https://lightningenable.com/pricing?utm_source=github&utm_medium=readme&utm_campaign=gtm-aug-2026)**

Or sign up without leaving your agent: call the `create_lightning_enable_account` tool.

An open-source MCP (Model Context Protocol) server that enables AI agents to make Lightning Network payments and participate in agent-to-agent commerce. 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 (ASA) tools (agent-to-agent discovery, request, settlement, and attestation over Nostr) unlock with an [Agentic Commerce subscription](https://lightningenable.com). See the [full tool list](https://docs.lightningenable.com/products/l402-microtransactions/mcp-complete-guide).

Available in **.NET** and **Python**.

## What It Does

Give your AI agent a Lightning wallet and it can:

- **Pay invoices** — Send Bitcoin via Lightning to any BOLT11 invoice
- **Access L402 APIs** — Automatically pay L402 challenges for seamless API access
- **Discover APIs** — Search the L402 API registry to find paid APIs by keyword or category, or fetch a specific API's manifest for full endpoint details and pricing
- **Track spending** — Budget limits, a durable receipt log, and balance checks
- **Create invoices** — Generate invoices to receive payments
- **Run wallet operations** — BTC price, currency exchange, and on-chain sends (Strike; on-chain also LND)
- **Self-bootstrap a Lightning Enable account** — `create_lightning_enable_account` pays a ~100-sat activation fee over L402 and returns a merchant API key: the free→paid signup form that *is* the protocol, unlocking the producer + ASA tools with no browser or checkout page.
- **Sell services (L402 Producer)** — Set up the seller account, put an API behind L402, price its routes, list it publicly, mint payment challenges and verify payer tokens — all from one tool, so an agent can go from an API key to a paid endpoint without touching REST
- **Agent commerce (ASA)** — Discover, request, settle, and review agent-to-agent services on Nostr

## Quick Start

### 1. Install

```bash
# .NET
dotnet tool install -g LightningEnable.Mcp

# Python
pip install lightning-enable-mcp

# Python (no install)
uvx lightning-enable-mcp

# Docker
docker pull refinedelement/lightning-enable-mcp:latest
```

### 2. First run — `setup_wallet`

Nothing else works without a wallet, so start there. Ask your agent:

```
Run setup_wallet
```

With no arguments it reports which wallet is configured and where the credential came from — the provider and the source, never the credential itself. If there is no wallet, it hands back the setup steps.

**The shortest path is NWC.** In your wallet app (Alby Hub, CoinOS, or any NIP-47 wallet) create a Nostr Wallet Connect connection, copy the `nostr+walletconnect://` string, and give it to the agent:

```
Run setup_wallet with this connection string: nostr+walletconnect://...
```

`setup_wallet` validates the string, connects to the wallet to prove it answers, then writes it to `~/.lightning-enable/config.json` with the file's permissions restricted to your user. It reports the wallet's declared methods and balance. Restart the server afterwards so it picks up the new wallet.

**Or set an environment variable** (in the [Claude Desktop config](#claude-desktop-config) below, say). L402 — the whole point of this server — needs a wallet that returns the payment **preimage**:

- **Strike** — `STRIKE_API_KEY`, from https://dashboard.strike.me
- **NWC** — `NWC_CONNECTION_STRING`, from CoinOS / CLINK / Alby Hub
- **LND** (your own node — always returns a preimage) — `LND_REST_HOST` + `LND_MACAROON_HEX`
  - Self-signed node cert? Set `LND_TLS_CERT_PATH` to the node's `tls.cert` (pins TLS to that cert). `LND_SKIP_TLS_VERIFY=true` is the escape hatch, not the recommendation. Optional: `LND_FEE_LIMIT_SATS`, `LND_PAYMENT_TIMEOUT_SECONDS`.

> ⚠️ **OpenNode** (`OPENNODE_API_KEY`) works for **invoicing / direct payments only — it never returns a preimage, so it cannot pay L402 challenges.** Don't make it your only wallet if you want L402 (the core use case).

If several are set, priority is: **LND > NWC > Strike > OpenNode**, and **environment variables win over the config file** — `setup_wallet` refuses to write a connection string that an env var would override, and tells you which variable to unset. See [Supported Wallets](#supported-wallets) for the full compatibility matrix.

### 3. Prove the whole loop works — `test_l402_payment`

Ask your agent:

```
Run test_l402_payment
```

This pays a public **1-sat** L402 endpoint end to end, proving your wallet is connected, returns a preimage, and can complete a real L402 payment. It's the one-line answer to "is my wallet actually working?" — and it costs about 1 satoshi.

### 4. Then have some fun — buy a t-shirt

Once the loop works, try the [Lightning Enable Store](https://store.lightningenable.com), a live L402-powered web store. Ask Claude:

```
Buy me a Lightning Enable t-shirt from store.lightningenable.com
```

(This one needs a funded wallet and a shipping address, which is why `test_l402_payment` — one sat, no shipping — is the faster first proof.)

## Claude Desktop manual install (MCPB bundle)

For a one-click install with no config-file editing, grab the packaged [MCPB](https://github.com/modelcontextprotocol/mcpb) bundle from the [`mcpb/`](mcpb/) directory instead of hand-editing JSON: build it locally with `npx -y @anthropic-ai/mcpb pack mcpb lightning-enable-mcp.mcpb` (or download the `.mcpb` artifact from a [`mcpb.yml`](.github/workflows/mcpb.yml) CI run), then double-click the resulting `.mcpb` file or drag it into Claude Desktop's Settings → Extensions — Claude Desktop prompts for your wallet credentials (Strike, NWC, or LND) and optional Lightning Enable API key through its own settings UI instead of a text config file. See [`mcpb/README.md`](mcpb/README.md) for what's in the bundle and [`mcpb/SUBMISSION.md`](mcpb/SUBMISSION.md) for its Anthropic MCP Directory submission status.

## Claude Desktop Config

Add to your `claude_desktop_config.json`:

**.NET:**
```json
{
  "mcpServers": {
    "lightning-enable": {
      "command": "dotnet",
      "args": ["tool", "run", "lightning-enable-mcp"],
      "env": {
        "STRIKE_API_KEY": "your-strike-api-key"
      }
    }
  }
}
```

**Python:**
```json
{
  "mcpServers": {
    "lightning-enable": {
      "command": "uvx",
      "args": ["lightning-enable-mcp"],
      "env": {
        "STRIKE_API_KEY": "your-strike-api-key"
      }
    }
  }
}
```

Config file locations:
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Linux:** `~/.config/claude/claude_desktop_config.json`

## Deploying hosted

A payment above your auto-approve threshold needs a human's approval: the server mints a
short confirmation code, sends it to **you**, and the agent can only proceed once you read it
back. The code never appears in a tool result, so a prompt-injected agent can't approve its
own spending.

That only works if the code reaches a human. On your laptop it goes to the server's console
(stderr) and you read it there. On a hosted server — a claude.ai connector, a Docker
container, a fleet — nobody is watching stderr, and on a shared host the agent might read it
itself. So you choose the **approval channel**.

| Channel | What happens above the threshold | Use it when |
|---------|----------------------------------|-------------|
| `stderr` (default) | The code is printed to the server console. | You run the server locally and watch its output. |
| `refuse` | The payment is refused. No code is minted at all. | You run it hosted and no one can receive a code. |
| `webhook` | The pending confirmation is POSTed to your URL, HMAC signed. You relay the code to the agent. | You have an ops channel — chat, pager, an approval app. |
| `file` | The same JSON line is appended to a file you tail. | You collect approvals from logs. |

Whatever the channel, two rules hold: the code is never returned to the agent, and a payment
is never approved because its notification failed to send — a delivery failure refuses the
payment and withdraws the code.

### Choosing a channel

Precedence: environment variable, then config file, then automatic.

```json
{
  "confirmation": {
    "channel": "webhook",
    "webhookUrl": "https://ops.example.com/lightning-approvals",
    "webhookSecret": "<shared secret>",
    "filePath": "/var/log/ligh
agentic-commerceai-agentsbitcoinl402lightning-networkmcpmcp-servermodel-context-protocolpayments

Lo que la gente pregunta sobre lightning-enable-mcp

¿Qué es refined-element/lightning-enable-mcp?

+

refined-element/lightning-enable-mcp es mcp servers para el ecosistema de Claude AI. MCP server enabling AI agents to make Lightning Network payments Tiene 9 estrellas en GitHub y su última actualización registrada es del 2026-09-25.

¿Cómo se instala lightning-enable-mcp?

+

Puedes instalar lightning-enable-mcp clonando el repositorio (https://github.com/refined-element/lightning-enable-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar refined-element/lightning-enable-mcp?

+

Nuestro agente de seguridad ha analizado refined-element/lightning-enable-mcp y le ha asignado un Trust Score de 95/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.

¿Quién mantiene refined-element/lightning-enable-mcp?

+

refined-element/lightning-enable-mcp es mantenido por refined-element. La última actividad registrada en GitHub es del 2026-09-25, con 19 issues abiertos.

¿Hay alternativas a lightning-enable-mcp?

+

Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.

Despliega lightning-enable-mcp en tu cloud

Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.

¿Mantienes este repo? Añade un badge a tu README

Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.

Featured on ClaudeWave: refined-element/lightning-enable-mcp
[![Featured on ClaudeWave](https://claudewave.com/api/badge/refined-element-lightning-enable-mcp)](https://claudewave.com/repo/refined-element-lightning-enable-mcp)
<a href="https://claudewave.com/repo/refined-element-lightning-enable-mcp"><img src="https://claudewave.com/api/badge/refined-element-lightning-enable-mcp" alt="Featured on ClaudeWave: refined-element/lightning-enable-mcp" width="320" height="64" /></a>

Más MCP Servers

Alternativas a lightning-enable-mcp