{"id":30429383,"url":"https://github.com/lnbits/lnbits-mcp-server","last_synced_at":"2026-04-10T09:00:16.134Z","repository":{"id":311936453,"uuid":"1017311647","full_name":"lnbits/LNbits-MCP-Server","owner":"lnbits","description":"An MCP server for LNbits","archived":false,"fork":false,"pushed_at":"2026-03-24T16:38:01.000Z","size":1159,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-10T09:00:08.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rumble.com/v6vxr70-lnbits-mcp-server-lnbits-in-your-ai.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lnbits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-10T10:42:24.000Z","updated_at":"2026-03-24T16:38:07.000Z","dependencies_parsed_at":"2025-08-27T23:52:01.854Z","dependency_job_id":"55cb5508-d054-4935-9ced-d49dd45785ed","html_url":"https://github.com/lnbits/LNbits-MCP-Server","commit_stats":null,"previous_names":["lnbits/lnbits-mcp-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lnbits/LNbits-MCP-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnbits%2FLNbits-MCP-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnbits%2FLNbits-MCP-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnbits%2FLNbits-MCP-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnbits%2FLNbits-MCP-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lnbits","download_url":"https://codeload.github.com/lnbits/LNbits-MCP-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnbits%2FLNbits-MCP-Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31635969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-22T17:01:47.752Z","updated_at":"2026-04-10T09:00:16.104Z","avatar_url":"https://github.com/lnbits.png","language":"Python","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\u003ca href=\"https://lnbits.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://i.imgur.com/QE6SIrs.png\"\u003e\n    \u003cimg src=\"https://i.imgur.com/fyKPgVT.png\" alt=\"LNbits\" style=\"width:280px\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n# LNbits MCP Server\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-success?logo=open-source-initiative\u0026logoColor=white)](./LICENSE)\n[![Built for LNbits](https://img.shields.io/badge/Built%20for-LNbits-4D4DFF?logo=lightning\u0026logoColor=white)](https://github.com/lnbits/lnbits)\n\nGive your AI assistant a Lightning wallet. The LNbits MCP Server connects any [MCP-compatible](https://modelcontextprotocol.io/) AI client to your [LNbits](https://lnbits.com/) instance - check balances, create invoices, send payments, and manage extensions, all through natural language.\n\n### What is MCP?\n\n[Model Context Protocol](https://modelcontextprotocol.io/) (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.\n\n### Features\n\n- **Wallet operations** - check balances, view transaction history, get wallet details\n- **Send and receive** - pay Lightning invoices, pay Lightning addresses, create invoices\n- **Extension support** - LNURLp, TPoS, SatsPay, Watch-only wallets\n- **Admin tools** - node info, user management, system stats\n- **Runtime config** - configure your LNbits connection through chat, no env files needed\n- **Secure** - API keys are stored in memory only, never logged; HTTPS recommended for production\n- **Rate limited** - built-in request throttling to prevent accidental API floods\n\n\u003ca href=\"https://rumble.com/v6vxr70-lnbits-mcp-server-lnbits-in-your-ai.html\"\u003e\n  \u003cimg src=\"https://github.com/lnbits/LNbits-MCP-Server/blob/main/LNbits_MCP.png\" width=\"600\" alt=\"Watch the LNbits MCP Server demo\" /\u003e\n  \u003cbr/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/%E2%96%B6%20Watch%20Demo-LNbits%20MCP%20in%20Action-7C3AED?style=for-the-badge\u0026logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik04IDV2MTRsMTEtN3oiLz48L3N2Zz4=\u0026logoColor=white\" alt=\"Watch Demo\" /\u003e\n\u003c/a\u003e\n\n---\n\n## Table of Contents\n\n- [Quick Start](#quick-start)\n- [What you can say](#what-you-can-say)\n- [Available Tools](#available-tools)\n- [Configuration Reference](#configuration-reference)\n- [Running the Server Manually](#running-the-server-manually)\n- [Troubleshooting](#troubleshooting)\n- [Development](#development)\n- [Contributing](#contributing)\n- [Powered by LNbits](#powered-by-lnbits)\n\n---\n\n## Quick Start\n\nThree steps, takes about two minutes.\n\n### 1. Install\n\n```bash\ngit clone https://github.com/lnbits/LNbits-MCP-Server.git\ncd LNbits-MCP-Server\npip install -e .\n```\n\n\u003e You need Python 3.10+ installed. If you're unsure, run `python3 --version` first.\n\n### 2. Add to your AI client\n\nTell your MCP client where the server lives. For **Claude Desktop**, edit the config file:\n\n**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"lnbits\": {\n      \"command\": \"lnbits-mcp-server\"\n    }\n  }\n}\n```\n\n\u003e Restart Claude Desktop after saving. The server only activates after a restart.\n\n### 3. Connect to your LNbits\n\nNow just talk to your AI. No extra config files needed - tell it your credentials in plain language:\n\n```\nConfigure lnbits.\n\nURL: https://your-lnbits-instance.com\nKey: your_api_key_here\nAuth method: api_key_header\n```\n\nThat's it. Try asking \"What's my wallet balance?\" to confirm it works.\n\n\u003e **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.\n\n\n## What you can say\n\nJust talk naturally. The AI figures out which tool to call.\n\n```\n\"Check my wallet balance\"\n\"Create an invoice for 1000 sats with memo 'Coffee payment'\"\n\"Pay this invoice: lnbc10u1p3...\"\n\"Send 500 sats to alice@lnbits.com\"\n\"Show me my recent payments\"\n\"Decode this invoice and tell me what it's for\"\n```\n\n\u003e 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?\"\n\n\n## Available Tools\n\nThese 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.\n\n### Configuration\n\n| Tool | Description |\n|---|---|\n| `configure_lnbits` | Set LNbits URL, API key, and auth method at runtime |\n| `get_lnbits_configuration` | Show current connection settings |\n| `test_lnbits_configuration` | Verify the connection works |\n\n\u003e You only need to configure once per session. The server remembers your settings until you restart it.\n\n### Wallet\n\n| Tool | Description |\n|---|---|\n| `get_wallet_details` | Wallet info including balance and keys |\n| `get_wallet_balance` | Current balance |\n| `get_payments` | Payment history |\n| `check_connection` | Test connection to LNbits |\n\n### Payments\n\n| Tool | Description |\n|---|---|\n| `pay_invoice` | Pay a BOLT11 Lightning invoice |\n| `pay_lightning_address` | Pay a Lightning address (user@domain.com) |\n| `get_payment_status` | Check status by payment hash |\n| `decode_invoice` | Decode and inspect a Lightning invoice |\n| `create_invoice` | Create a new Lightning invoice |\n\n\u003e **Tip:** You can pay Lightning addresses directly - just say \"Send 1000 sats to user@domain.com\". No need to create an invoice first.\n\n### Extensions (when enabled)\n\nThese tools appear when you have the corresponding extensions installed on your LNbits instance.\n\n| Tool | Description |\n|---|---|\n| `create_lnurlp_link` / `get_lnurlp_links` | LNURLp pay links |\n| `create_tpos` / `get_tpos_list` | TPoS terminals |\n| `create_satspay_charge` / `get_satspay_charges` | SatsPay charges |\n| `create_watchonly_wallet` / `get_watchonly_wallets` | Watch-only wallets |\n\n### Admin (requires admin key)\n\nOnly available when you connect with a Super User or admin-level API key.\n\n| Tool | Description |\n|---|---|\n| `get_node_info` | Lightning node information |\n| `list_users` / `create_user` | User management |\n| `get_system_stats` | System statistics |\n\n\n## Configuration Reference\n\nMost people just use the runtime config (step 3 above). But if you prefer environment variables, these work too:\n\n| Variable | Description | Default |\n|---|---|---|\n| `LNBITS_URL` | LNbits instance URL | `https://demo.lnbits.com` |\n| `LNBITS_API_KEY` | API key | - |\n| `LNBITS_BEARER_TOKEN` | Bearer token (alternative auth) | - |\n| `LNBITS_OAUTH2_TOKEN` | OAuth2 token (alternative auth) | - |\n| `LNBITS_AUTH_METHOD` | `api_key_header`, `api_key_query`, `http_bearer`, or `oauth2` | `api_key_header` |\n| `LNBITS_TIMEOUT` | Request timeout (seconds) | `30` |\n| `LNBITS_MAX_RETRIES` | Max retries on failure | `3` |\n| `LNBITS_RATE_LIMIT_PER_MINUTE` | Rate limit | `60` |\n\n\u003e At least one auth method is required. For most setups, `LNBITS_API_KEY` with `api_key_header` is all you need.\n\n\n## Running the Server Manually\n\nYour AI client usually starts the server automatically. But if you want to test it directly or debug connection issues, you can run it yourself:\n\n```bash\n# Using the installed command\nlnbits-mcp-server\n\n# Or run directly with Python\npython -m lnbits_mcp_server.server\n```\n\nYou can also set credentials via environment variables instead of runtime config:\n\n```bash\nexport LNBITS_URL=\"https://your-lnbits-instance.com\"\nexport LNBITS_API_KEY=\"your_api_key_here\"\nlnbits-mcp-server\n```\n\n\u003e This is useful for testing outside an AI client, running in Docker, or integrating into scripts.\n\n\n## Troubleshooting\n\n**Server won't start**\n- Check that Python 3.10+ is installed: `python3 --version`\n- Make sure you ran `pip install -e .` from the repo directory\n- Verify the `lnbits-mcp-server` command is available: `which lnbits-mcp-server`\n\n**Connection fails after configuring**\n- Verify your LNbits instance is running and reachable from your machine\n- Double-check the API key - Admin and Invoice keys are different\n- Make sure you're using `https://` for remote instances\n\n**AI client doesn't show LNbits tools**\n- Restart your AI client after editing the config file\n- Check that the path in `claude_desktop_config.json` is correct\n- Look at your client's logs for MCP connection errors\n\n**Payments fail**\n- Invoice key can only create invoices and check balances - use Admin key for sending payments\n- Check that your LNbits wallet has sufficient balance\n- For Lightning address payments, the recipient's server must be reachable\n\n\n## Development\n\n```bash\ngit clone https://github.com/lnbits/LNbits-MCP-Server.git\ncd LNbits-MCP-Server\npip install -e .[dev]\n\n# Run tests\npytest\n\n# Format\nblack src tests\nisort src tests\n\n# Type check\nmypy src\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes and add tests\n4. Submit a pull request\n\nQuestions? Drop by the [Telegram group](https://t.me/lnbits) first - a quick chat often saves a round-trip on the PR.\n\n\n## Powered by LNbits\n\n[LNbits](https://lnbits.com) is a free and open-source Lightning accounts system.\n\n[![LNbits Docs](https://img.shields.io/badge/Read-LNbits%20Docs-10B981?logo=book\u0026logoColor=white\u0026labelColor=059669)](https://docs.lnbits.com)\n[![Visit LNbits Shop](https://img.shields.io/badge/Visit-LNbits%20Shop-7C3AED?logo=shopping-cart\u0026logoColor=white\u0026labelColor=5B21B6)](https://shop.lnbits.com/)\n[![Try myLNbits SaaS](https://img.shields.io/badge/Try-myLNbits%20SaaS-2563EB?logo=lightning\u0026logoColor=white\u0026labelColor=1E40AF)](https://my.lnbits.com/login)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnbits%2Flnbits-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flnbits%2Flnbits-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnbits%2Flnbits-mcp-server/lists"}