Lightning Enable

by refined-element

Not rated
GitHub

About

MCP server enabling AI agents to make Bitcoin Lightning payments, check balances, access L402 APIs, and manage payment budgets. Supports Strike, OpenNode, NWC, and LND wallets.

Details

Author
refined-element
Categories
Other, AI

Setup

Install Lightning Enable in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/refined-element/lightning-enable-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

Part ofLightning Enable— infrastructure for agent commerce over Lightning.

Monetize your own API — 30-day free trial

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

- Start free trial— 30 days, no charge today
-
Fast Lane— pay 100 sats over Lightning, no card
-
Pricing

Or sign up without leaving your agent: call thecreate_lightning_enable_accounttool.

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 anAgentic Commerce subscription. See thefull tool list.

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, payment history, and balance checks
- Create invoices— Generate invoices to receive payments
- Get BTC price— Real-time Bitcoin price from Strike
- Exchange currency— Convert between USD/BTC/EUR and more (Strike wallet)
- Send on-chain— Send Bitcoin on-chain (Strike/LND)
- Self-bootstrap a Lightning Enable accountcreate_lightning_enable_accountpays a ~100-sat activation fee over L402 and returns a merchant API key: the free→paid signup form thatisthe protocol, unlocking the producer + ASA tools with no browser or checkout page.
- Sell services (L402 Producer)— Create L402 payment challenges and verify payments, enabling agents to be full commerce participants that both buy and sell
- Agent commerce (ASA)— Discover, request, settle, and review agent-to-agent services on Nostr

# .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

L402 — the whole point of this server — needs a wallet that returns the paymentpreimage. Set exactly one of these (as an env var, e.g. in theClaude Desktop configbelow):

- Strike(easiest to start) —STRIKE_API_KEY, fromhttps://dashboard.strike.me
- NWC(self-custody, Nostr) —NWC_CONNECTION_STRING, from CoinOS / CLINK / Alby Hub
- LND(your own node — always returns a preimage) —LND_REST_HOST+LND_MACAROON_HEX

⚠️OpenNode(OPENNODE_API_KEY) works forinvoicing / 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. SeeSupported Walletsfor the full compatibility matrix.

3. Prove the whole loop works —test_l402_payment

This pays a public1-satL402 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.

Once the loop works, try theLightning Enable Store, 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 whytest_l402_payment— one sat, no shipping — is the faster first proof.)

Add to yourclaude_desktop_config.json:

{ "mcpServers": { "lightning-enable": { "command": "dotnet", "args": ["tool", "run", "lightning-enable-mcp"], "env": { "STRIKE_API_KEY": "your-strike-api-key" } } } }
{ "mcpServers": { "lightning-enable": { "command": "uvx", "args": ["lightning-enable-mcp"], "env": { "STRIKE_API_KEY": "your-strike-api-key" } } } }

- Windows:%APPDATA%\Claude\claude_desktop_config.json
- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Linux:~/.config/claude/claude_desktop_config.json

Canonical inventory: 26 tools — 17 free (out of the box, just a wallet) + 9 that requireLIGHTNING_ENABLE_API_KEY(anAgentic Commerce subscription; 2 L402 Producer + 7 Agent Service Agreement). This table is the single source of truth every advertised count derives from — it is pinned to the code by the tool-inventory guard tests in both ports (drift fails CI).

ASA availability note.The L402/producer tools,discover_agent_services,settle_agent_service, andunpublish_agent_capabilitywork against the hosted API today. The agent-to-agent coordination tools —publish_agent_capability,request_agent_service,publish_agent_attestation,get_agent_reputation— use the agent capability backend, which isnot yet enabled on the hosted Lightning Enable API(calls there currently return an error) and are in preview. Marketplace listings are published today via the Lightning Enable dashboard / L402 proxy pipeline.

Deprecated aliases(accepted but unadvertised, forward to the new tool, removed in v2.0.0):confirm_paymentverify_confirmation_code;check_wallet_balance,get_all_balancesget_balance.

create_lightning_enable_accountis free andself-provisionsthe API key the 8 gated tools need — an agent with a wallet pays a ~100-sat activation fee and unlocks them on the spot.

- .NET README— Full .NET documentation
-
Python README— Full Python documentation
-
Full Docs— Complete guide to every tool
-
AI Spending Security— Budget controls and safety

lightning-enable-mcp/ ├── dotnet/ │ ├── src/LightningEnable.Mcp/ # .NET MCP server │ ├── tests/LightningEnable.Mcp.Tests/ # .NET tests │ └── LightningEnable.Mcp.sln # Solution file ├── python/ │ └── lightning-enable-mcp/ # Python MCP server ├── .github/workflows/publish-mcp.yml # CI/CD ├── LICENSE # MIT └── README.md # This file

These tools enable agent-to-agent commerce on Nostr:

All seven ASA tools requireLIGHTNING_ENABLE_API_KEY(anAgentic Commerce subscription);settle_agent_serviceadditionally spends your wallet balance, subject to budget limits. For the authoritative access level of every tool, see the canonicalToolstable above — it is the single source of truth pinned to the code by the drift guard.
- Discoverdiscover_agent_services(category="translation")finds agents offering translation
- Requestrequest_agent_service(capability_id, budget_sats=100)sends a service request
- Settlesettle_agent_service(l402_endpoint)pays via Lightning and receives the result
- Reviewpublish_agent_attestation(pubkey, agreement_id, rating=5)builds on-protocol reputation

For dynamic pricing, providers usecreate_l402_challengeto generate invoices at the agreed price. Requesters pay and providers verify withverify_l402_payment.

- le-agent-sdk (Python)—pip install le-agent-sdk
-
le-agent-sdk (TypeScript)—npm install le-agent-sdk
-
le-agent-sdk (.NET)—dotnet add package LightningEnable.AgentSdk

Lightning Enable does not hold funds — the connected wallet or payment provider (Strike, OpenNode, LND, or an NWC wallet) does. The MCP server runs locally and talks to the wallet/provider you configure and, for L402 discovery, the L402 API registry. Wallet credentials you supply stay on your machine (or, for the hosted API, are encrypted at rest). See the fullPrivacy Policyfor what data is collected, third parties involved, retention, and contact (privacy@lightningenable.com).

- Lightning Enable— Payment enablement middleware
-
Documentation— Full docs
-
Store— Live L402 demo
-
NuGet— .NET package
-
PyPI— Python package
-
Docker Hub— Docker image

Give AI agents a Bitcoin wallet with Lightning Network payments

AI agent API marketplace-discover, call, and pay for services with USDC payments. List your own AI services and earn money per call.

x402 payment gateway for AI agents — 12 crypto data tools (price, whale activity, gas, TVL, Fear & Greed, Dune queries) paid per-call in USDC on Stellar or Base. No API keys, no subscriptions.

AI agent commerce: buy gift cards, top up phones, and get travel eSIMs with Bitcoin, Ethereum, Solana, USDC, USDT, Litecoin, Dogecoin, and 15+ cryptos on Base, Polygon, Arbitrum, Tron, and more. No account, no CLI install, no API key — connect via MCP or let your agent pay autonomously with x402.

The infrastructure for AI-driven payments

A live HTTP 402 Lightning tollbooth for AI agents. Sells structured API error intelligence paid per-request over the Lightning Network. No accounts, no OAuth, just pure HTTP 402.

100 x402 micropayment APIs / MCP servers for AI agents. Pay-per-call USDC on Base, no signup. Composable in 6 use-case bundles.

An MCP server enabling AI agents to pay for services using HTTP 402 requests and MCP tools.

Proof-of-Work + Lightning Network authentication for AI agents. Wraps paid MCP tools with L402-signed receipts.

USDC wallets, payments, and referral earnings for AI agents on Base L2

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.