Give AI agents a Bitcoin wallet with Lightning Network payments and L402 support.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Give your AI agent a Bitcoin wallet. MCP server + CLI. Works with Claude Code, OpenClaw, Cursor, and any agent framework.
update_operator tool / lw set-email - set your operator email from the MCP client or CLI; a verification link is emailed to you.claim_promo tool / lw claim-promo - claim the free-sats install promo directly from your agent. Requirements: verified email + operator account at least 3 hours old.get_info works before registration - service info no longer requires an API key.lw register --email you@example.com (or the register_operator MCP tool with an email)lw claim-promo (or the claim_promo MCP tool)One bonus per operator, first 100 installs only, no deposit required.
v1.3.0 - L402 protocol v0 support per the latest Lightning Labs spec.
version="0", token=, backward compatible with macaroon=.well-known/l402.json on lightningfaucet.com and certvera.comv1.1.0 - X402 protocol support (USDC on Base) as automatic fallback alongside L402 (Lightning).
pay_l402_api seamlessly handles both L402 and X402For CLI-first agents (OpenClaw, Pi, KiloCode, or any agent with Bash access):
This installs the lw command:
Output is JSON by default (pipe to jq). Use --human for readable output.
Run lw help for all commands.
For MCP-native clients, configure as an MCP server:
Option A: Self-Registration
Then ask Claude: "Register a new Lightning Wallet operator account"
Option B: Pre-configured API Key
~/.claude/settings.json):| Tool | Description |
|---|---|
get_info | Get service status, version, and supported features |
decode_invoice | Decode a BOLT11 invoice to see amount, destination, and expiry |
| Tool | Description |
|---|---|
whoami | Get current context - shows if operating as operator or agent |
check_balance | Check current Lightning balance in satoshis |
get_rate_limits | Check current rate limit status and requests remaining |
| Tool | Description |
|---|---|
pay_l402_api | Access paid APIs (L402/X402) - auto-detects protocol and pays |
pay_invoice | Pay any BOLT11 Lightning invoice |
keysend | Send payment directly to a node pubkey (no invoice needed) |
pay_lightning_address | Pay to a Lightning address (user@domain.com format) |
create_invoice | Generate invoice to receive payments |
get_invoice_status | Check if an invoice has been paid |
get_transactions | View transaction history |
| Tool | Description |
|---|---|
lnurl_auth | Authenticate to a service using LNURL-auth protocol |
claim_lnurl_withdraw | Claim funds from an LNURL-withdraw link |
| Tool | Description |
|---|---|
register_operator | Create new operator account |
recover_account | Recover account using recovery code |
rotate_api_key | Generate a new API key (60-min cooldown on withdrawals) |
get_deposit_invoice | Create invoice to fund operator account |
withdraw | Withdraw funds to external Lightning destination |
set_operator_key | Switch to operator credentials |
update_operator - set operator email (sends verification link) and/or nameclaim_promo - claim the free-sats install promo (verified email + 3h account)| Tool | Description |
|---|---|
create_agent | Create agent under operator |
list_agents | List all agents under operator |
fund_agent | Transfer sats from operator to agent |
transfer_to_agent | Transfer sats between agents or from operator to agent |
sweep_agent | Sweep funds from agent back to operator |
deactivate_agent | Temporarily disable an agent |
reactivate_agent | Re-enable a deactivated agent |
delete_agent | Permanently delete an agent (returns balance to operator) |
get_budget_status | Get agent's budget limit and spending |
set_budget | Set or update agent's spending limit |
set_agent_credentials | Switch to agent credentials |
| Tool | Description |
|---|---|
register_webhook | Register a URL to receive event notifications |
list_webhooks | List all registered webhooks |
delete_webhook | Delete a webhook |
test_webhook | Send a test event to verify webhook connectivity |
Webhook Events:
invoice_paid - Payment received on an invoicepayment_completed - Outgoing payment succeededpayment_failed - Outgoing payment failedbalance_low - Balance dropped below thresholdbudget_warning - 80% of budget consumedtest - Manual test eventAll commands output JSON to stdout. Errors go to stderr with exit code 1.
| Command | Description |
|---|---|
lw register [--name "name"] | Create operator account, prints API key |
lw whoami | Current identity (operator or agent) |
lw balance | Balance in satoshis |
lw info | Service status and capabilities |
lw deposit <amount> | Generate deposit invoice |
lw withdraw <invoice> | Withdraw to external wallet |
lw pay <invoice> | Pay BOLT11 invoice [--max-fee <sats>] |
lw pay-api <url> | Pay L402/X402 API [--method GET] [--body "{}"] [--max-sats 1000] |
lw decode <invoice> | Decode BOLT11 invoice |
lw create-agent <name> | Create agent [--budget <sats>] |
lw fund-agent <id> <amount> | Transfer sats to agent |
lw list-agents | List all agents |
lw transactions | Recent transactions [--limit 10] [--offset 0] |
lw help | Show all commands |
Lightning Wallet MCP supports two HTTP 402 payment protocols:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-server-134)<a href="https://allmcps.com/mcp/mcp-server-134"><img src="https://allmcps.com/api/badge/mcp-server-134?style=directory" alt="MCP Server on AllMCPs" /></a>