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).
Why use this skill?
Securely connect your AI agent to Lightning Network nodes using encrypted LNC tunnels. Monitor node state and channels with read-only MCP tools.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/roasbeef/lightning-mcp-serverWhat This Skill Does
The lightning-mcp-server skill allows AI agents to securely connect to Lightning Network nodes via Lightning Node Connect (LNC). It creates an encrypted WebSocket tunnel between an AI assistant and an LND (Lightning Network Daemon) node, bypassing the need for direct network exposure, TLS certificates, or macaroon management. By using a simple 10-word pairing phrase, the server acts as a gateway that grants the AI read-only access to node data, enabling the model to inspect channels, analyze payment history, and monitor on-chain statistics without risking node funds.
Installation
You can install this skill directly into your OpenClaw environment using the command: clawhub install openclaw/skills/skills/roasbeef/lightning-mcp-server. After installation, ensure you have Go 1.24+ if building from source, or use the pre-built binary via npx. Run the configuration script using skills/lightning-mcp-server/scripts/configure.sh to generate the necessary .env file. For integration with Claude Code, you can register the MCP server via claude mcp add --transport stdio lnc -- npx -y @lightninglabs/lightning-mcp-server.
Use Cases
This skill is perfect for lightning node operators who want to build custom dashboards, automate reporting, or gain deep insights into their liquidity without compromising node security. Developers can use it to build automated health checkers that alert when channels go offline or when liquidity is depleted. Furthermore, it serves as a powerful research tool for understanding network trends by querying real-time node activity.
Example Prompts
- "Connect to my node using the pairing phrase [PHRASE_HERE] and summarize my current active channel balance and total inbound liquidity."
- "Review the last 10 successful payments processed by the node and identify any recurring routing failures that might indicate a need to adjust my fee strategy."
- "List all my currently open channels and highlight which ones are approaching low local liquidity thresholds, then suggest potential rebalancing actions."
Tips & Limitations
The server is read-only by design; it cannot perform on-chain transactions or modify channel states, which ensures the safety of your funds. Always handle your pairing phrases with care, as they are the sole key to your node's metadata. If you are operating in a development environment, use the --dev flag during configuration to test with regtest nodes before moving to mainnet. Ensure your LNC connection is monitored for latency, as the mailbox relay can occasionally experience jitter depending on network conditions.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-roasbeef-lightning-mcp-server": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access
Related Skills
lnd
Install and run Lightning Terminal (litd) which bundles lnd, loop, pool, tapd, and faraday in a single Docker container. Defaults to neutrino backend with SQLite storage on testnet. Supports watch-only mode with remote signer, standalone mode, and regtest development. Use when setting up a Lightning node for payments, channel management, liquidity management (loop), channel marketplace (pool), taproot assets (tapd), or enabling agent L402 commerce.
aperture
Install and run Aperture, the L402 Lightning reverse proxy from Lightning Labs. Use when creating L402 paywalls, configuring paid API endpoints, hosting paid content for other agents, or testing L402 authentication flows.
lnget
Install and use lnget, a Lightning-native HTTP client with automatic L402 payment support. Use when downloading files behind Lightning paywalls, managing L402 tokens, checking Lightning backend status, or making HTTP requests that may require micropayments.
macaroon-bakery
Bake, inspect, and manage lnd macaroons for least-privilege agent access. Use when an agent needs scoped credentials — pay-only, invoice-only, read-only, or custom permissions. Also covers signer macaroon scoping and macaroon rotation.
commerce
End-to-end agentic commerce workflow using Lightning Network. Use when an agent needs to set up a full payment stack (lnd + lnget + aperture), buy or sell data via L402, or enable agent-to-agent micropayments.