Lightning Network MCP Server logo

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.

View on GitHub

Last updated: N/A

What is Lightning Network MCP Server?

The Lightning Network MCP Server is a tool that allows large language model (LLM) agents to interact with and query data from Lightning Network nodes using natural language. It acts as an intermediary, translating natural language prompts into queries and returning both human-readable summaries and machine-readable JSON output.

How to use Lightning Network MCP Server?

To use the server, configure your environment with your LND credentials (gRPC or LNC) in the .env file. Then, run the server using npm run mcp:prod. You can then query your Lightning node using natural language prompts. The server can be tested using the MCP inspector.

Key features of Lightning Network MCP Server

  • Natural language querying of Lightning node data

  • Compatibility with Model Context Protocol (MCP)

  • Support for gRPC and Lightning Node Connect (LNC)

  • Human-readable summaries and machine-readable JSON output

  • Modular, testable, and extensible design

Use cases of Lightning Network MCP Server

  • Allowing LLM agents to understand and interact with Lightning Network nodes

  • Building user interfaces that provide natural language access to Lightning node data

  • Automating tasks related to Lightning node management and monitoring

  • Integrating Lightning Network data into downstream applications

  • Enabling more intuitive and accessible Lightning Network interactions

FAQ from Lightning Network MCP Server

What is the Model Context Protocol (MCP)?

The Model Context Protocol (MCP) is a specification that defines a standard way for language models to interact with external data sources.

What Lightning Network nodes are supported?

Currently, the server primarily supports LND nodes. Support for Core Lightning and Eclair is planned.

What kind of queries are supported?

Currently, the server supports basic channel queries. More robust queries related to channels, invoices, nodes, and routing are under development.

How do I connect to my LND node over Tor?

Configure your .env file with the Tor SOCKS proxy settings, ensuring your TLS certificate is in PEM format.

How do I extract credentials from an lndconnect URL?

Use the scripts/extract-credentials.js script to extract the host, port, certificate, and macaroon from the URL.