Lightning MCP Server

Give AI agents a Bitcoin wallet with Lightning Network payments and L402 support.

Local serverstdioPython

What is the Lightning MCP Server?

Give AI agents a Bitcoin wallet with Lightning Network payments and L402 support.

The short version

  1. lw register --email you@example.com (or the register_operator MCP tool with an email) 2. Click the verification link we email you 3. After your account is 3 hours old: lw claim-promo (or the claim_promo MCP tool)
  • Instant Payments — - Lightning Network transactions settle in milliseconds
  • L402 + X402 Protocol Support — - Access any paid API automatically (Lightning or USDC)
  • Operator/Agent Hierarchy — - Manage multiple agents with spending limits
  • No Custody Risk — - Each agent has isolated funds with operator oversight
  • Production Ready — - Battle-tested infrastructure powering real transactions
  • Webhook Notifications — - Get notified instantly when payments arrive

Recorded tools

  • url — string
  • method — string
  • body — string
  • max_payment_sats — number
  • get_info — The get_info tool exposed by this server.
  • whoami — The whoami tool exposed by this server.
  • pay_l402_api — Access paid APIs with automatic payment. Supports both L402 (Lightning) and X402 (USDC on Base) protocols. Protocol is auto-detected from the 402 response headers.
  • keysend — The keysend tool exposed by this server.
  • register_webhook — The register_webhook tool exposed by this server.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
get_infoService status, version and supported features (no key needed)
decode_invoiceDecode a BOLT11 invoice: amount, destination, expiry (no key needed)
whoamiCurrent identity (operator or agent), balance, where the key came from
check_balanceBalance in sats
get_rate_limitsRate-limit status and requests remaining
forget_credentialsDelete the saved credentials file
pay_l402_apiRequest a paid API. Detects L402 (Lightning) or X402 (USDC on Base) on HTTP 402 and pays automatically
pay_invoicePay any BOLT11 invoice; returns the preimage
pay_lightning_addressPay user@domain
keysendPay a node pubkey directly, with an optional message
nostr_zapNIP-57 zap to a Nostr user or event
lnurl_authLog in to a service with LNURL-auth
claim_lnurl_withdrawPull funds from an LNURL-withdraw link
create_invoiceInvoice to receive sats
get_invoice_statusHas an invoice been paid
get_deposit_invoiceInvoice to fund the operator account
get_transactionsTransaction history
register_operatorCreate an account; credentials are saved locally
update_operatorSet email (sends a verification link) or display name
claim_promoClaim the install promo manually (it is also granted automatically after verification)
withdrawWithdraw to an external invoice (minimum 10 sats)
create_withdraw_linkLNURL-withdraw link to sweep into any wallet by QR
recover_accountRecover with the recovery code (rotates the key)
rotate_api_keyNew key; payments pause for 60 minutes
create_agentAgent with its own key and optional budget
list_agentsAgents under this operator
sweep_agentMove sats back to the operator (amount_sats: "all" for everything)

How to install the Lightning MCP Server

{
  "mcpServers": {
    "lightning-wallet": {
      "command": "npx",
      "args": [
        "-y",
        "lightning-wallet-mcp"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Example prompts to try

  • “Use Lightning to url.”
  • “Use Lightning to method.”
  • “Use Lightning to body.”

Frequently asked questions

Give AI agents a Bitcoin wallet with Lightning Network payments and L402 support. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.