Provides Lightning Network wallet functionality through the Breez SDK, enabling balance checks, payment sending and receiving, invoice generation, and payment history management.
Breez MCP Server — FastMCP Implementation
A unified MCP server that exposes Lightning functionality through the Breez SDK (Spark implementation) using FastMCP. Supports both stdio and HTTP transport modes.
Prerequisites
Python 3.11+ (for local development or
uvx)Docker (optional, for container workflows)
uv (optional, for ephemeral environments)
Breez API key which you can request here
Configure Credentials
Edit .env with your secrets. Required variables:
Variable | Required | Default | Purpose |
| ✅ | – | Breez Spark API key |
| ✅ | – | 12-word mnemonic controlling the wallet |
| ❌ |
| Set to
for sandbox usage |
| ❌ |
| Wallet storage directory |
| ❌ |
| Transport mode:
,
, or
|
| ❌ |
| HTTP server host (HTTP mode only) |
| ❌ |
| HTTP server port (HTTP mode only) |
| ❌ |
| HTTP endpoint path (HTTP mode only) |
Run the Server
Choose the runtime that transport mode that fits your workflow.
STDIO Mode (Default for MCP clients)
For use with Claude Desktop and other MCP clients:
HTTP Mode (for web API access)
For accessing the MCP server via HTTP API:
The server will be available at http://localhost:8000/mcp
ASGI Mode (for external ASGI servers)
For deployment with external ASGI servers like Gunicorn:
Docker Compose
Run both modes simultaneously:
Docker (direct)
To keep STDIN/STDOUT attached for Claude Desktop, add -i to the docker run command.
Claude Desktop Integration
Quick install
Use -f .env or -v KEY=value to supply credentials during installation if desired.
Docker from Claude Desktop
Ensure the image exists (docker build -t breez-mcp .), then configure:
Docker's -e VAR syntax reads the value of VAR from the environment supplied via the env block.
uvx from Claude Desktop
Verification
Restart Claude Desktop after adding the configuration.
Run
mcp listto ensure the server registered.Ask Claude prompts like “Check my wallet balance” or “Create an invoice for 1000 sats” to validate tool routing.
Available Tools
get_balance— comprehensive wallet balance with limits and formatted amountsget_node_info— detailed node information including capabilities and sync statussend_payment— send a Lightning payment with complete transaction detailscreate_invoice— generate a BOLT11 invoice with all invoice datalist_payments— comprehensive payment history with full details
Example Prompts
"Check my wallet balance"
"Create an invoice for 1000 sats for coffee"
"Send payment to lnbc1…"
"Show me my recent payments"
HTTP API Usage (HTTP Mode)
When running in HTTP mode, you can interact with the MCP server via HTTP requests:
Health Check
List Available Tools
Call a Tool (MCP Protocol)
The HTTP mode follows the MCP protocol over HTTP. You'll need to send properly formatted MCP JSON-RPC requests to http://localhost:8000/mcp.
Example using MCP Inspector or other MCP clients:
Send to:
Security Notes
Never commit
.env; keep secrets in your shell or a secrets manager.Treat the mnemonic as the wallet’s private key. Rotate immediately if leaked.
Default network is
mainnet. For experimentation, explicitly setBREEZ_NETWORK=testnet.When using containers, mount
./datato preserve state between runs and prevent secret leakage in container layers.
Troubleshooting
Missing environment variables — ensure
.envexists or export the required variables before starting.SDK connection failures — verify required env vars, try
python list_payments_cli.py --limit 1 --verboseto confirm SDK connectivity, and checkhttp://localhost:8000/healthin HTTP mode.Claude Desktop cannot find the server — double-check absolute paths in
cwdand restart the application after configuration changes.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables Lightning Network wallet operations through the Breez SDK, allowing users to check balances, send/receive payments, create invoices, and manage Bitcoin Lightning transactions via natural language.