Lightning Wallet — Claude Code MCP server: a Bitcoin wallet for agents
Hands an AI agent a Bitcoin wallet over Lightning Network: pays invoices and Lightning addresses, settles L402 and X402 APIs. Useful when your agent has to pay for access.
claude mcp add lightning-wallet-mcp -- npx -y lightning-wallet-mcpWhat Lightning Wallet does
Lightning Wallet ships as an MCP server and a CLI called lw. The agent asks in plain language and the tools do the rest: settle a BOLT11 invoice, send sats to user@domain, issue an invoice to receive funds, check the balance and the transaction log. Custody sits with the service, so there is no node to run, no channels to open and no liquidity to babysit.
For Claude the install is one line: claude mcp add lightning-wallet -- npx -y lightning-wallet-mcp. Ask the agent to register a wallet and register_operator writes credentials to ~/.lightning-wallet/credentials.json with mode 0600; later sessions pick the file up on their own. Already holding a key? Set LIGHTNING_WALLET_API_KEY — it takes precedence over the saved file. A remote option exists too, https://lightningfaucet.com/mcp over Streamable HTTP, but without a key you only get the public read-only tools, and register_operator, recover_account plus the local credential tools stay stdio-only.
The platform fee is 1% rounded down with no minimum, and payments below 100 sats cost nothing. Withdrawals start at 10 sats. A payment still in flight comes back as pending: true rather than an error, which stops the model from paying twice. Requests time out after 45s. Give the agent its own agent_... key with a budget and spend policy — otherwise a single bad call can drain the operator balance.
What it helps with
- pay a paid API that answers with HTTP 402
- issue an invoice and wait for sats to arrive
- send a payment to a Lightning address like
user@domain - check the balance and recent transactions
- give an agent its own budget and spend limits
Example prompts for the agent
- Register a Lightning wallet for me with the email [email protected]
- Pay this invoice
lnbc...and show me the preimage - What's my balance and what were the last few transactions?
How to install Lightning Wallet
Platform CLI
claude mcp add lightning-wallet-mcp -- npx -y lightning-wallet-mcpPlatform CLI
codex mcp add lightning-wallet -- npx -y lightning-wallet-mcpConfig file
{
"mcpServers": {
"lightning-wallet": {
"command": "npx",
"args": [
"-y",
"lightning-wallet-mcp"
]
}
}
}Config file
{
"servers": {
"lightning-wallet": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lightning-wallet-mcp"
]
}
}
}Platform CLI
gemini mcp add lightning-wallet npx -y lightning-wallet-mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Lightning Wallet
How do I install Lightning Wallet in Claude Code?
Run claude mcp add lightning-wallet -- npx -y lightning-wallet-mcp. Then ask the agent to register a wallet — credentials are stored locally and reused in later sessions.
What does Lightning Wallet do?
It gives an agent a Bitcoin wallet: paying BOLT11 invoices, Lightning addresses and paid L402 or X402 APIs, receiving payments, and reading transaction history. Everything runs through MCP tool calls in natural language.
Do I need to run a node or manage channels?
No. The wallet is custodial, so there is no node, no channels and no liquidity to manage. Register an operator or supply an existing key through LIGHTNING_WALLET_API_KEY.