LNbits MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Give your AI assistant a Lightning wallet. The LNbits MCP Server connects any MCP-compatible AI client to your LNbits instance - check balances, create invoices, send payments, and manage extensions, all through natural language.
What is MCP?
Model Context Protocol (MCP) is an open standard that lets AI assistants use external tools. Instead of copy-pasting API responses into a chat, MCP gives your AI direct access to your LNbits wallet. You talk naturally, the AI calls the right API endpoint, and you see the result - all in one conversation.
Features
- **Wallet operations** - check balances, view transaction history, get wallet details
- **Send and receive** - pay Lightning invoices, pay Lightning addresses, create invoices
- **Extension support** - LNURLp, TPoS, SatsPay, Watch-only wallets
- **Admin tools** - node info, user management, system stats
- **Runtime config** - configure your LNbits connection through chat, no env files needed
- **Secure** - API keys are stored in memory only, never logged; HTTPS recommended for production
- **Rate limited** - built-in request throttling to prevent accidental API floods
---
Table of Contents
- Quick Start
- What you can say
- Available Tools
- Configuration Reference
- Running the Server Manually
- Troubleshooting
- Development
- Contributing
- Powered by LNbits
---
Quick Start
Three steps, takes about two minutes.
1. Install
> You need Python 3.10+ installed. If you're unsure, run python3 --version first.
2. Add to your AI client
Tell your MCP client where the server lives. For **Claude Desktop**, edit the config file:
**macOS**: ~/Library/Application Support/Claude/claude_desktop_config.json
**Windows**: %APPDATA%\Claude\claude_desktop_config.json
> Restart Claude Desktop after saving. The server only activates after a restart.
3. Connect to your LNbits
Now just talk to your AI. No extra config files needed - tell it your credentials in plain language:
That's it. Try asking "What's my wallet balance?" to confirm it works.
> **Where's my API key?** Open your LNbits instance, look in the sidebar under "Node URL, API keys and API docs". Use the **Admin key** if you want to send payments, or the **Invoice key** if you only need to check balances and create invoices.
What you can say
Just talk naturally. The AI figures out which tool to call.
> You can also chain requests: "Create a 5000 sat invoice and show me the QR code" or "Check if that last payment went through, and if so, what's my new balance?"
Available Tools
These are the tools the AI uses behind the scenes. You don't need to call them directly - just describe what you want and the AI picks the right one.
Configuration
| Tool | Description |
|---|---|
| configure_lnbits | Set LNbits URL, API key, and auth method at runtime |
| get_lnbits_configuration | Show current connection settings |
| test_lnbits_configuration | Verify the connection works |
> You only need to configure once per session. The server remembers your settings until you restart it.
Wallet
| Tool | Description |
|---|---|
| get_wallet_details | Wallet info including balance and keys |
| get_wallet_balance | Current balance |
| get_payments | Payment history |
| check_connection | Test connection to LNbits |
Payments
| Tool | Description |
|---|---|
| pay_invoice | Pay a BOLT11 Lightning invoice |