Lightning Enable MCP
The Lightning Enable MCP server gives AI agents a Lightning Network wallet, enabling Bitcoin payments, L402 API access, and agent-to-agent commerce on Nostr.
šø Payments
Pay Lightning invoices (BOLT11) and get proof of payment
Create invoices to receive payments and check invoice status
Confirm pending payments requiring explicit approval
Send on-chain Bitcoin (Strike/LND wallets)
š L402 API Access
Access L402 resources with automatic 402 payment handling
Manually pay L402/MPP challenges and receive authorization tokens
Discover L402-enabled APIs by keyword, category, or URL (with optional budget awareness) and fetch detailed manifests
š Wallet & Currency
Check Lightning wallet balance and all currency balances (USD, BTC, etc.)
Get real-time Bitcoin price (Strike wallet)
Exchange currency between USD, BTC, EUR (Strike wallet)
š Budget & Spending
Set per-request and per-session spending limits
View budget status and recent payment history
šŖ Sell Services (L402 Producer) (requires Agentic Commerce subscription)
Create L402 payment challenges to charge other agents/users for resources
Verify L402 tokens to confirm payment before granting access
š¤ Agent-to-Agent Commerce (Nostr/ASA)
Discover agent services by category, hashtag, or keyword
Publish your agent's capabilities to the Nostr network (requires subscription)
Request services from other agents with a budget (requires subscription)
Settle agent services via L402 Lightning payments
Leave reviews/ratings for agents after service completion (requires subscription)
Check an agent's reputation score from on-protocol attestations
Enables integration with Alby Hub via Nostr Wallet Connect (NWC), allowing agents to make Lightning Network payments and manage wallet balances through a connection string.
Allows agents to interact with the Bitcoin network by sending on-chain transactions, paying BOLT11 invoices via the Lightning Network, and retrieving real-time BTC price data.
Part of Lightning Enable ā infrastructure for agent commerce over Lightning.
Lightning Enable MCP Server
An open-source MCP (Model Context Protocol) server that enables AI agents to make Lightning Network payments and participate in agent-to-agent commerce. 25 tools total: 17 free wallet tools, 2 producer tools, and 6 Agent Service Agreement (ASA) tools for discovering, requesting, settling, and attesting services between agents on Nostr. Producer and ASA tools require an Agentic Commerce subscription.
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, 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)
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
Related MCP server: Lightning Tools MCP Server
Quick Install
# .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:latestClaude Desktop Config
Add to your claude_desktop_config.json:
.NET:
{
"mcpServers": {
"lightning-enable": {
"command": "dotnet",
"args": ["tool", "run", "lightning-enable-mcp"],
"env": {
"STRIKE_API_KEY": "your-strike-api-key"
}
}
}
}Python:
{
"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.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/claude/claude_desktop_config.json
Supported Wallets
Wallet | Setup | L402 Support |
Strike | API key | Yes |
LND | REST + macaroon | Yes (guaranteed) |
NWC (CoinOS) | Connection string | Yes |
NWC (CLINK) | Connection string | Yes |
NWC (Alby Hub) | Connection string | Yes |
OpenNode | API key | No (no preimage) |
Try It: Lightning Enable Store
The Lightning Enable Store is a live L402-powered web store. Ask Claude:
Buy me a Lightning Enable t-shirt from store.lightningenable.comDocumentation
.NET README ā Full .NET documentation
Python README ā Full Python documentation
Full Docs ā Complete guide with all 25 tools
AI Spending Security ā Budget controls and safety
Repository Structure
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 fileAgent Service Agreement (ASA) Tools
These tools enable agent-to-agent commerce on Nostr:
Tool | Description | Subscription |
| Search for agent capabilities by category, hashtag, or keyword | Free |
| Publish your agent's services to the Nostr network (kind 38400) | Agentic Commerce |
| Request a service from another agent (kind 38401) | Agentic Commerce |
| Pay for an agent service via L402 Lightning settlement | Free* |
| Leave a review/rating for an agent after service completion (kind 38403) | Agentic Commerce |
| Check an agent's reputation score from on-protocol attestations | Free |
*settle uses wallet balance, subject to budget limits
How Agent Commerce Works
Discover ā
discover_agent_services(category="translation")finds agents offering translationRequest ā
request_agent_service(capability_id, budget_sats=100)sends a service requestSettle ā
settle_agent_service(l402_endpoint)pays via Lightning and receives the resultReview ā
publish_agent_attestation(pubkey, agreement_id, rating=5)builds on-protocol reputation
For dynamic pricing, providers use create_l402_challenge to generate invoices at the agreed price. Requesters pay and providers verify with verify_l402_payment.
Related Projects
le-agent-sdk (Python) ā
pip install le-agent-sdkle-agent-sdk (TypeScript) ā
npm install le-agent-sdkle-agent-sdk (.NET) ā
dotnet add package LightningEnable.AgentSdk
License
MIT ā see LICENSE.
Links
Lightning Enable ā Payment enablement middleware
Documentation ā Full docs
Store ā Live L402 demo
NuGet ā .NET package
PyPI ā Python package
Docker Hub ā Docker image
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/refined-element/lightning-enable-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server