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).
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install lightning-mcp-server或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install lightning-mcp-server⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/lightning-mcp-server/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- 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). ---
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.
# 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.
Claude Code <--stdio--> lightning-mcp-server <--LNC WebSocket--> Mailbox <--> lnd
lightning-mcp-server as a subprocess (stdio transport)lnc_connect with a pairing phrase and passwordtunnel through the mailbox relay
lnc_disconnect closes the tunnelNo keys, certs, or macaroons are stored on disk — the pairing phrase is the only credential, and it's handled in-memory only.
# 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.
# 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 |
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).
# 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.
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"
]
}
}
}
| Tool | Description | |------|-------------| | lnc_connect | Connect to lnd via LNC pairing phrase | | lnc_disconnect | Close active LNC connection |
| Tool | Description | |------|-------------| | lnc_get_info | Node alias, version, sync status, block height | | lnc_get_balance | Wallet balance (on-chain) and channel balance |
| Tool | Description | |------|-------------| | lnc_list_channels | Active/inactive channels with capacity, balances | | lnc_pending_channels | Channels being opened or closed |
| Tool | Description | |------|-------------| | lnc_decode_invoice | Decode a BOLT11 invoice | | lnc_list_invoices | List invoices with pagination | | lnc_lookup_invoice | Look up invoice by payment hash |
| Tool | Description | |------|-------------| | lnc_list_payments | Payment history with pagination | | lnc_track_payment | Track specific payment by hash |
| Tool | Description | |------|-------------| | lnc_list_peers | Connected peers with stats | | lnc_describe_graph | Lightning Network topology sample | | lnc_get_node_info | Detailed info about a specific node |
| Tool | Description | |------|-------------| | lnc_list_unspent | UTXOs with confirmations | | lnc_get_transactions | On-chain transaction history | | lnc_estimate_fee | Fee estimates for confirmation targets |
ECDSA keypairs are generated per session.
The agent can observe but not modify.
relay. The mailbox cannot read the traffic.
node's gRPC port — all traffic goes through the mailbox.
| | MCP LNC Server | Direct lncli/gRPC | |---|---|---| | Credential | Pairing phrase (in-memory) | TLS cert + macaroon (on disk) | | Network | WebSocket via mailbox relay | Direct TCP to gRPC port | | Firewall | No inbound ports needed | Port 10009 must be reachable | | Permissions | Read-only (hardcoded) | Depends on macaroon scope | | Setup | Pairing phrase from Lightning Terminal | Export cert + macaroon files |
The pairing phrase is generated by Lightning Terminal. It must be exactly 10 space-separated words.
Check that the mailbox server is reachable. For production, ensure mailbox.terminal.lightning.today:443 is not blocked by a firewall.
If using a local regtest setup, enable dev mode and insecure mode:
skills/lightning-mcp-server/scripts/configure.sh --dev --insecure
Restart Claude Code after running setup-claude-config.sh. Check that lightning-mcp-server is on your $PATH:
which lightning-mcp-server安装 Lightning MCP Server 后,可以对 AI 说这些话来触发它
Help me get started with Lightning MCP Server
Explains what Lightning MCP Server does, walks through the setup, and runs a quick demo based on your current project
Use Lightning MCP Server to build and configure the MCP server for Lightning Node Connect (LNC)
Invokes Lightning MCP Server with the right parameters and returns the result directly in the conversation
What can I do with Lightning MCP Server in my marketing & growth workflow?
Lists the top use cases for Lightning MCP Server, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/lightning-mcp-server/ 目录(个人级,所有项目可用),或 .claude/skills/lightning-mcp-server/(项目级)。重启 AI 客户端后,用 /lightning-mcp-server 主动调用,或让 AI 根据上下文自动发现并使用。
Lightning MCP Server 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Lightning MCP Server 可免费安装使用。请查阅仓库了解许可证信息。
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).
Automate my marketing & growth tasks using Lightning MCP Server
Identifies repetitive steps in your workflow and sets up Lightning MCP Server to handle them automatically
Lightning MCP Server 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。