🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Lightning MCP Server

by @roasbeef

Build and configure the MCP server for Lightning Node Connect (LNC). Connects AI assistants to lnd nodes via encrypted WebSocket tunnels using pairing phrases β€” no direct network access or TLS certs needed. Read-only by default (18 tools for querying node state, channels, payments, invoices, peers, on-chain data).

πŸ’‘ Examples

# 1. Build the MCP server binary
skills/lightning-mcp-server/scripts/install.sh

2. Configure environment (mailbox server, dev mode, etc.)

skills/lightning-mcp-server/scripts/configure.sh

3. Add to Claude Code as an MCP server

skills/lightning-mcp-server/scripts/setup-claude-config.sh

Then restart Claude Code. The lnc_connect tool will be available to connect to any lnd node using a pairing phrase.

βš™οΈ Configuration

# Generate .env with defaults
skills/lightning-mcp-server/scripts/configure.sh

Production (mainnet via Lightning Terminal)

skills/lightning-mcp-server/scripts/configure.sh --production

Development (local regtest)

skills/lightning-mcp-server/scripts/configure.sh --dev --mailbox aperture:11110

Configuration is stored in lightning-mcp-server/.env. Key settings:

| Variable | Default | Description | |----------|---------|-------------| | LNC_MAILBOX_SERVER | mailbox.terminal.lightning.today:443 | Mailbox relay server | | LNC_DEV_MODE | false | Enable development mode | | LNC_INSECURE | false | Skip TLS verification (dev only) | | LNC_CONNECT_TIMEOUT | 30 | Connection timeout in seconds |

πŸ“‹ Tips & Best Practices

"pairing phrase must be exactly 10 words"

The pairing phrase is generated by Lightning Terminal. It must be exactly 10 space-separated words.

"connection timeout"

Check that the mailbox server is reachable. For production, ensure mailbox.terminal.lightning.today:443 is not blocked by a firewall.

"TLS handshake failure"

If using a local regtest setup, enable dev mode and insecure mode:
skills/lightning-mcp-server/scripts/configure.sh --dev --insecure

Tools not appearing in Claude Code

Restart Claude Code after running setup-claude-config.sh. Check that lightning-mcp-server is on your $PATH:
which lightning-mcp-server

View on ClawHub
TERMINAL
clawhub install lightning-mcp-server

πŸ§ͺ Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

πŸ” Can't find the right skill?

Search 60,000+ AI agent skills β€” free, no login needed.

Search Skills β†’