MCP Server for Bitcoin Lightning
by ehallmark
This repository provides an MCP server for interacting with a local Lightning Network Daemon (lnd). It wraps btc-lightning-client in a Model Context Protocol (MCP) server, enabling Agentic systems to utilize the Lightning Network.
Last updated: N/A
What is MCP Server for Bitcoin Lightning?
This is a Model Context Protocol (MCP) server that allows Agentic systems to interact with the Bitcoin Lightning Network. It uses a local Lightning Network Daemon (lnd) and the btc-lightning-client library to facilitate communication.
How to use MCP Server for Bitcoin Lightning?
- Ensure you have Python >= 3.10 and uv installed. 2. Have a running Lightning Network Daemon (lnd) instance. 3. Configure environment variables for LIGHTNING_RPC_PORT, LIGHTNING_CERT_PATH, LIGHTNING_MACAROON_PATH, UVICORN_PORT, and UVICORN_HOST. 4. Run the server using
uv run main.py
. 5. Connect to the server using SSE, for example, via the LangGraph framework and the langchain-mcp-adapters library.
Key features of MCP Server for Bitcoin Lightning
MCP Interface
Lightning Network Interaction
SSE Transport
Integration with Agentic Systems
Uses btc-lightning-client
Use cases of MCP Server for Bitcoin Lightning
Automated Lightning Payments
Agent-driven Lightning Channel Management
Integrating Lightning Network into AI workflows
Programmatic access to Lightning Network functionality
FAQ from MCP Server for Bitcoin Lightning
What is LND?
What is LND?
LND stands for Lightning Network Daemon, a full implementation of a Lightning Network node.
What is MCP?
What is MCP?
MCP stands for Model Context Protocol. It provides a standardized way for agents to interact with services.
What is SSE?
What is SSE?
SSE stands for Server-Sent Events, a server push technology enabling real-time data streaming from the server to the client.
What are the prerequisites for running this server?
What are the prerequisites for running this server?
You need Python >= 3.10, uv for package management, and a running Lightning Network Daemon (lnd) instance.
How do I connect to the MCP server?
How do I connect to the MCP server?
The server uses SSE for transport. You can connect to it using libraries like langchain-mcp-adapters within the LangGraph framework.