Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计通过

lightning-mcp-serverlightning MCP server 开发

Agent Skill

lightning-mcp-server 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

33,477

周安装

1,438

GitHub Stars

公开资料未说明

下载量

11,734
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:lightning-mcp-server(lightning MCP server 开发)
来源仓库:https://github.com/roasbeef/lightning-mcp-server
安装命令:
openclaw skills install lightning-mcp-server
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install lightning-mcp-server

简介

为 Lightning Node Connect (LNC) 构建并配置 MCP 服务器。使用配对短语通过加密的 WebSocket 隧道将 AI 助手连接到 lnd 节点 - 无需直接网络访问或 TLS 证书。默认只读(18 个用于查询节点状态、通道、支付、发票、对等点、链上数据的工具)。

SKILL.md

name
lightning-mcp-server
description
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).

MCP LNC Server

Build and configure the MCP server that connects AI assistants to Lightning nodes via Lightning Node Connect (LNC). LNC uses encrypted WebSocket tunnels through a mailbox relay, so the agent never needs direct gRPC access, TLS certificates, or macaroons — just a 10-word pairing phrase from Lightning Terminal.

The MCP server is read-only by default — it exposes 18 tools for querying node state but cannot send payments or modify channels.

Quick Start

# 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.

How It Works

Claude Code  <--stdio-->  lightning-mcp-server  <--LNC WebSocket-->  Mailbox  <-->  lnd
  1. Claude Code launches lightning-mcp-server as a subprocess (stdio transport)
  2. Agent calls lnc_connect with a pairing phrase and password
  3. Server generates an ephemeral ECDSA keypair and opens an encrypted WebSocket

tunnel through the mailbox relay

  1. Once connected, the agent can call any of the 18 read-only tools
  2. lnc_disconnect closes the tunnel

No keys, certs, or macaroons are stored on disk — the pairing phrase is the only credential, and it's handled in-memory only.

Installation

# Build from source (requires Go 1.24+)
skills/lightning-mcp-server/scripts/install.sh

# Verify
lightning-mcp-server -version

The install script builds from the lightning-mcp-server/ directory in this repo.

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:

VariableDefaultDescription
LNC_MAILBOX_SERVERmailbox.terminal.lightning.today:443Mailbox relay server
LNC_DEV_MODEfalseEnable development mode
LNC_INSECUREfalseSkip TLS verification (dev only)
LNC_CONNECT_TIMEOUT30Connection timeout in seconds

Claude Code Integration

Option 1: claude mcp add (recommended)

Register the MCP server with a single command — no build step required:

# Zero-install via npx (downloads pre-built binary)
claude mcp add --transport stdio lnc -- npx -y @lightninglabs/lightning-mcp-server

# With environment variables for production
claude mcp add --transport stdio \
  --env LNC_MAILBOX_SERVER=mailbox.terminal.lightning.today:443 \
  lnc -- npx -y @lightninglabs/lightning-mcp-server

# For development/regtest
claude mcp add --transport stdio \
  --env LNC_MAILBOX_SERVER=localhost:11110 \
  --env LNC_DEV_MODE=true \
  --env LNC_INSECURE=true \
  lnc -- npx -y @lightninglabs/lightning-mcp-server

Scope options: --scope local (default, just you), --scope project (shared via .mcp.json), --scope user (all your projects).

Option 2: Setup script (from source)

# Add lightning-mcp-server to Claude Code's MCP config
skills/lightning-mcp-server/scripts/setup-claude-config.sh

# Project-level config (current project only)
skills/lightning-mcp-server/scripts/setup-claude-config.sh --scope project

# Global config (all projects)
skills/lightning-mcp-server/scripts/setup-claude-config.sh --scope global

This adds the server to Claude Code's .mcp.json (project) or ~/.claude.json (global) configuration. After restarting Claude Code, the LNC tools will be available.

Option 3: Manual configuration

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "lnc": {
      "command": "npx",
      "args": ["-y", "@lightninglabs/lightning-mcp-server"],
      "env": {
        "LNC_MAILBOX_SERVER": "mailbox.terminal.lightning.today:443"
      }
    }
  }
}

Or with a locally built binary:

{
  "mcpServers": {
    "lnc": {
      "command": "lightning-mcp-server",
      "env": {
        "LNC_MAILBOX_SERVER": "mailbox.terminal.lightning.today:443"
      }
    }
  }
}

Or run via Docker:

{
  "mcpServers": {
    "lnc": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i", "--network", "host",
        "--env", "LNC_MAILBOX_SERVER",
        "--env", "LNC_DEV_MODE",
        "--env", "LNC_INSECURE",
        "lightning-mcp-server"
      ]
    }
  }
}

Available Tools (18)

Connection

ToolDescription
lnc_connectConnect to lnd via LNC pairing phrase
lnc_disconnectClose active LNC connection

Node

ToolDescription
lnc_get_infoNode alias, version, sync status, block height
lnc_get_balanceWallet balance (on-chain) and channel balance

Channels

ToolDescription
lnc_list_channelsActive/inactive channels with capacity, balances
lnc_pending_channelsChannels being opened or closed

Invoices

ToolDescription
lnc_decode_invoiceDecode a BOLT11 invoice
lnc_list_invoicesList invoices with pagination
lnc_lookup_invoiceLook up invoice by payment hash

Payments

ToolDescription
lnc_list_paymentsPayment history with pagination
lnc_track_paymentTrack specific payment by hash

Peers & Network

ToolDescription
lnc_list_peersConnected peers with stats
lnc_describe_graphLightning Network topology sample
lnc_get_node_infoDetailed info about a specific node

On-Chain

ToolDescription
lnc_list_unspentUTXOs with confirmations
lnc_get_transactionsOn-chain transaction history
lnc_estimate_feeFee estimates for confirmation targets

Security Model

  • No stored credentials: Pairing phrase is handled in-memory only. Ephemeral

ECDSA keypairs are generated per session.

  • Read-only: No payment, channel, or state-changing operations are exposed.

The agent can observe but not modify.

  • Encrypted tunnels: All traffic is encrypted end-to-end through the mailbox

relay. The mailbox cannot read the traffic.

  • No direct access: The agent machine never connects directly to the lnd

node's gRPC port — all traffic goes through the mailbox.

Comparison with Direct gRPC Access

MCP LNC ServerDirect lncli/gRPC
CredentialPairing phrase (in-memory)TLS cert + macaroon (on disk)
NetworkWebSocket via mailbox relayDirect TCP to gRPC port
FirewallNo inbound ports neededPort 10009 must be reachable
PermissionsRead-only (hardcoded)Depends on macaroon scope
SetupPairing phrase from Lightning TerminalExport cert + macaroon files

Prerequisites

  • Go 1.24+ for building from source
  • Lightning Terminal (litd) on the target node for generating pairing phrases
  • Claude Code for MCP integration

Troubleshooting

"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

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

72.89%
按下载量换算8,553

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills