pblittle_lnd_mcp_server

pblittle_lnd_mcp_server

by pblittle
An MCP server enabling natural language queries for Lightning Network (LND) node data.

Lightning Network Query MCP Server

Overview

The Lightning Network Query MCP Server connects to your Lightning Network (LND) node and enables natural language queries for channel information. It uses the Model Context Protocol (MCP) to provide human-readable responses alongside structured JSON data.

Features

  • Query LND node data using natural language
  • Strong data validation and type safety with Zod schema validation
  • Secure connection via TLS certificates and macaroons
  • Mock LND mode for development without a real node
  • MCP protocol compliant responses for LLM integration
  • Compatible with any MCP-supporting LLM (Block Goose, Claude, etc.)

Quick Start

Installation

git clone https://github.com/pblittle/lnd-mcp-server.git
cd lnd-mcp-server
npm install
npm run build

Run with Mock Data (No LND Node Required)

npm run mcp:mock

Run with Real LND Node

cp .env.example .env
# Edit .env with your LND node details
npm run mcp:prod

Example Queries and Responses

Channel Listing

> Show me all my channels

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 largest 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)

Channel Health

> What is the health of my channels?

Channel Health Summary: 4 healthy, 1 needs attention.

You have 1 inactive channel that needs attention:
1. LN+: 0.00500000 BTC (500,000 sats)

Liquidity Distribution

> How is my channel liquidity distributed?

Liquidity Distribution: 0.02500000 BTC (2,500,000 sats) local (50%),
0.02500000 BTC (2,500,000 sats) remote (50%).

Your most balanced channels:
1. ACINQ: 50% local / 50% remote
2. Bitrefill: 50% local / 50% remote
3. LightningTipBot: 50% local / 50% remote

Your most imbalanced channels:
1. Wallet of Satoshi: 30% local / 70% remote

Testing with Helper Scripts

# List all channels
node test/real-queries/list.js

# Check channel health
node test/real-queries/health.js

# Check liquidity distribution
node test/real-queries/liquidity.js

Using with MCP Inspector

# Install MCP Inspector globally
npm install -g @modelcontextprotocol/inspector

# Run the server (in a separate terminal)
npm run mcp:mock

# Launch MCP Inspector
npx @modelcontextprotocol/inspector

Documentation

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

About

A Model Context Protocol (MCP) for querying Lightning Network (LND) node data using natural language.

Topics

Features & Capabilities

Categories
mcp_server model_context_protocol lightning_network lnd typescript javascript api_integration search

Implementation Details

Stats

0 Views
2 GitHub Stars

Repository Info

pblittle Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300