Lightning Network MCP Server

by MCP-Mirror

262 downloads
Not rated
GitHub

About

Lightning Network MCP Server lets large language model (LLM) agents query Lightning node data using natural language. It implements the Model Context Protocol (MCP) specification version 2025-03-26, connects to your node via gRPC or Lightning Node Connect (LNC), and returns both…

Details

Author
MCP-Mirror
Downloads
262
Categories
Other

- Natural‑language queries for Lightning node data
- Human‑readable summaries and structured JSON output
- gRPC and Lightning Node Connect (LNC) support
- Credential extraction from lndconnect URLs
- Tor hidden service support for remote nodes
- Compatible with MCP Inspector 1.7.0 and Goose

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Lightning Network MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Copy .env.example to .env and configure with your LND credentials, then run npm run mcp:prod. For connections over Tor, configure SOCKS proxy settings and ensure your TLS certificate is in PEM format. Use the provided credential extraction script to convert lndconnect URLs into the required configuration files.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "lightning network mcp server": {
            "pblittle_lightning-mcp-server": {
                "command": "node",
                "args": [
                    "scripts/extract-credentials.js"
                ]
            }
        }
    }
}

McpServers

{
    "pblittle_lightning-mcp-server": {
        "command": "node",
        "args": [
            "scripts/extract-credentials.js"
        ]
    }
}

Lightning Network MCP Server

The Lightning Network MCP Server allows large language model (LLM) agents—such as those running in Goose—to query Lightning node data using natural language. It implements the Model Context Protocol (MCP) specification version 2025-03-26 and is fully compatible with MCP Inspector 1.7.0.

The server connects to your node using gRPC or Lightning Node Connect (LNC), and returns both readable summaries and machine-readable JSON output. It is designed to be modular, testable, and extensible to support additional node types such as Core Lightning and Eclair.

For architecture details, see ARCHITECTURE.md.

What It Does

The system interprets natural-language prompts, determines user intent, evaluates domain logic, and queries your Lightning node. Responses are returned in plain language and structured JSON. It currently supports basic channel queries and is actively evolving to cover broader node status, invoices, and routing data.

Example Query

Ask in natural language:

Show me my channels

Get human-readable responses:

Your node has 5 channels with a total capacity of 0.05000000 BTC (5,000,000 sats).
4 channels are active and 1 is inactive.

Your channels:
1. ACINQ: 0.02000000 BTC (2,000,000 sats) (active)
2. Bitrefill: 0.01000000 BTC (1,000,000 sats) (active)
3. LightningTipBot: 0.00800000 BTC (800,000 sats) (active)
4. Wallet of Satoshi: 0.00700000 BTC (700,000 sats) (active)
5. LN+: 0.00500000 BTC (500,000 sats) (inactive)

Plus structured JSON data for applications:

{
  "channels": [
    {
      "remote_alias": "ACINQ",
      "capacity": 2000000,
      "local_balance": 800000,
      "active": true
    },
    ...
  ],
  "summary": {
    "total_capacity": 5000000,
    "active_channels": 4,
    "inactive_channels": 1,
    "largest_channel_alias": "ACINQ",
    "average_local_balance": 750000
  }
}

_The JSON output provides a structured version of the same data and is optimized for use by LLM agents, UI layers, or downstream applications._

Supported Features

Today, the system supports basic channel queries:

- _“Show me my channels”_

More robust queries are in development across the following domains:

- Channels
_“What is the health of my channels?”_
_“Do I have any inactive channels?”_

- Invoices
_“How many invoices have I received this week?”_
_“What was my last payment?”_

- Nodes
_“What node am I connected to the most?”_
_“What node did I last forward a payment to?”_

- Routing
_“How much have I routed in the last 24 hours?”_
_“Which channels are doing most of the routing?”_

Quick Start

This provides a zero-configuration development experience using real nodes.

Run with a Real Node (LND via gRPC or LNC)

```bash
cp .env.example .env

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.