Lightning Agent Tools
AI agents can read documentation, write code, and orchestrate complex workflows,
but they can't easily pay for things. Traditional payment rails require
government IDs, bank accounts, and manual enrollment, none of which work for
autonomous software. Lightning Agent Tools bridges this gap by giving agents
native access to the Lightning Network, a
decentralized payment protocol capable of instant, high-volume transactions with
no identity requirements.
The toolkit consists of seven composable skills and an MCP server. Together they
let an agent run a Lightning node, pay for resources on the web using the
L402 protocol,
host its own paid API endpoints, manage scoped credentials, and query node state
through the Model Context Protocol. The skills work with any agent framework
that can execute shell commands: Claude Code,
Codex, or your own tooling. The MCP server
follows the Model Context Protocol standard
and works with any compatible client. The security model defaults to a remote
signer architecture that keeps private keys on a separate machine, away from the
agent's runtime environment.
Install
MCP server (zero-install, any MCP client):
claude mcp add --transport stdio lnc -- npx -y @lightninglabs/lightning-mcp-server
Full plugin (all 7 skills via Claude Code):
claude plugin marketplace add lightninglabs/lightning-agent-tools
claude plugin install lightning-agent-tools@lightninglabs
From source (requires Go 1.24+):
git clone https://github.com/lightninglabs/lightning-agent-tools.git
cd lightning-agent-tools
skills/lightning-mcp-server/scripts/install.sh
skills/lightning-mcp-server/scripts/configure.sh --production
skills/lightning-mcp-server/scripts/setup-claude-config.sh --scope project
See Quick Start below for detailed setup options including
environment variables, regtest mode, and the full commerce stack.
How It Works
graph TD
CC["Your Agent"] --> Skills
subgraph Skills["Skills"]
lnd["lnd<br/><i>run a Lightning node</i>"]
lsm["lightning-security-module<br/><i>remote signer</i>"]
mb["macaroon-bakery<br/><i>scoped credentials</i>"]
lg["lnget<br/><i>L402 HTTP client</i>"]
ap["aperture<br/><i>L402 reverse proxy</i>"]
mcp["lightning-mcp-server<br/><i>MCP server</i>"]
com["commerce<br/><i>buyer/seller workflows</i>"]
end
subgraph Runtime["Daemons & Tools"]
lnd_d["lnd daemon"]
signer_d["lnd signer"]
aperture_d["aperture proxy"]
lnget_d["lnget CLI"]
mcp_d["lightning-mcp-server"]
end
lnd --> lnd_d
lsm --> signer_d
lg --> lnget_d
ap --> aperture_d
mcp --> mcp_d
lnd_d <-->|"remote signing"| signer_d
lnget_d -->|"pays invoices"| lnd_d
aperture_d -->|"generates invoices"| lnd_d
mcp_d <-->|"LNC tunnel"| lnd_d
com -.-> lnd
com -.-> lg
com -.-> ap
The skills break down into three functional groups:
Payment infrastructure. The lnd skill runs a Lightning node using the
Neutrino light client (no full Bitcoin node required) with SQLite storage. The
lightning-security-module sets up a remote signer to hold private keys on a
separate machine. The macaroon-bakery bakes least-privilege credentials so
agents only get the permissions they need.
Commerce. The lnget skill installs a command-line HTTP client that handles
L402 payments automatically. When it hits a 402 response, it pays the embedded
Lightning invoice, caches the token, and retries. The aperture skill runs an
L402 reverse proxy that gates access to a backend service behind Lightning
invoices. The commerce skill ties these together into buyer and seller
workflows.
Node access. The lightning-mcp-server skill builds and configures an MCP server that
connects to a Lightning node via Lightning Node Connect (encrypted WebSocket
tunnels, pairing-phrase auth, no stored credentials). It exposes 18 read-only
tools for querying node state and works with any MCP-compatible client.
Quick Start
Option A: Zero-Install MCP via claude mcp add
Register the MCP server with Claude Code in one command — no Go toolchain or
git clone required:
claude mcp add --transport stdio lnc -- npx -y @lightninglabs/lightning-mcp-server
With a specific mailbox server:
claude mcp add --transport stdio \
--env LNC_MAILBOX_SERVER=mailbox.terminal.lightning.today:443 \
lnc -- npx -y @lightninglabs/lightning-mcp-server
For development/regtest: