Lightning MCP Server

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

Local serverstdioPython

What is the Lightning MCP server?

Most payments and commerce work still happens through a UI a human drives. Lightning MCP server moves it into the conversation instead. 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

The tools it exposes

The server publishes 11 tools. What each one is for:

  • url — string
  • method — string
  • body — string
  • max_payment_sats — number
  • Webhooks — The Webhooks tool exposed by this server
  • 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
  • keysend — The keysend tool exposed by this server
  • register_webhook — The register_webhook tool exposed by this server
  • Configuration — The Configuration tool exposed by this server

What it needs from you

Configuration is passed through the environment: LIGHTNING_WALLET_API_KEY, PRE_PAYMENT_HOOK_URL, AGENT_ID, AGENT_KEY, LIGHTNING_FAUCET_API_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Getting it running

The server ships on npm as lightning-wallet-mcp, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

How it compares

This sits in the payments and commerce group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Lightning's toolset — url, method, body and 8 more — is a fair guide to whether it matches your workflow. It is maintained by lightningfaucet; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 11 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Lightning.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
urlstring
methodstring
bodystring
max_payment_satsnumber
WebhooksThe Webhooks tool exposed by this server.
get_infoThe get_info tool exposed by this server.
whoamiThe whoami tool exposed by this server.
pay_l402_apiAccess paid APIs with automatic payment. Supports both L402 (Lightning) and X402 (USDC on Base) protocols. Protocol is auto-detected from the 402 response headers.
keysendThe keysend tool exposed by this server.
register_webhookThe register_webhook tool exposed by this server.
ConfigurationThe Configuration tool exposed by this server.

How to install the Lightning MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
LIGHTNING_WALLET_API_KEYCredential the server authenticates with.Yes
PRE_PAYMENT_HOOK_URLEndpoint or connection string the server talks to.Yes
AGENT_IDConfiguration value read at startup.Optional
AGENT_KEYCredential the server authenticates with.Yes
LIGHTNING_FAUCET_API_KEYCredential the server authenticates with.Yes

Example prompts to try

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

Frequently asked questions

It connects Lightning to MCP-compatible AI assistants such as Claude and Cursor, exposing 11 tools (url, method, body, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Lightning directly.