Lightning Network MCP Server
by pblittle
The Lightning Network MCP Server enables large language model agents to query Lightning node data using natural language. It implements the Model Context Protocol (MCP) specification and is compatible with MCP Inspector.
Last updated: N/A
What is Lightning Network MCP Server?
The Lightning Network MCP Server is a tool that allows LLM agents to interact with Lightning nodes using natural language. It translates natural language prompts into queries, retrieves data from the node, and returns both human-readable summaries and structured JSON output.
How to use Lightning Network MCP Server?
To use the server, configure it with your LND node credentials (gRPC or LNC) in the .env file. Then, run the server using npm run mcp:prod
. You can then query the server using natural language prompts, and it will return responses in plain language and structured JSON. You can also use the MCP Inspector to test the server.
Key features of Lightning Network MCP Server
Natural language querying of Lightning nodes
Support for gRPC and LNC connections
Returns both human-readable summaries and structured JSON output
Modular, testable, and extensible design
Use cases of Lightning Network MCP Server
Enabling LLM agents to manage and monitor Lightning nodes
Building user interfaces that allow users to interact with Lightning nodes using natural language
Automating Lightning node management tasks
Integrating Lightning node data into other applications
FAQ from Lightning Network MCP Server
What Lightning Network nodes are supported?
What Lightning Network nodes are supported?
Currently, the server primarily supports LND nodes via gRPC or Lightning Node Connect (LNC). Support for Core Lightning and Eclair is planned.
What kind of queries can I make?
What kind of queries can I make?
Currently, the system supports basic channel queries like 'Show me my channels'. More robust queries are in development across channels, invoices, nodes, and routing.
What is the Model Context Protocol (MCP)?
What is the Model Context Protocol (MCP)?
The Model Context Protocol (MCP) is a specification that defines how LLM agents can interact with external data sources. This server implements the MCP specification to allow LLM agents to query Lightning node data.
How do I connect to an LND node over Tor?
How do I connect to an LND node over Tor?
Configure your .env
file with the Tor SOCKS proxy settings, including SOCKS_PROXY_HOST
and SOCKS_PROXY_PORT
. Ensure Tor is installed and running on your system.
How do I extract credentials from an lndconnect URL?
How do I extract credentials from an lndconnect URL?
Use the scripts/extract-credentials.js
script, providing the lndconnect URL either as an argument or by setting the LNDCONNECT_URL
environment variable. The script will extract, convert (if needed), and save the necessary credentials.