Lightning Enable MCP Server
v2.4.0AI agent Lightning payments: L402, invoices, wallets, API discovery, budgets, self-serve signup.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
setup_wallet
Report the wallet this server pays from, or connect one. Call with no arguments first - it also returns the setup steps when no wallet is configured.
| Parameter | Type | Description |
|---|---|---|
nwc_connection_string | string | NWC connection string (nostr+walletconnect://...). Omit to just report. |
access_l402_resource
Fetch a URL with GET or HEAD, automatically paying any L402 challenge and retrying. Read-only: other HTTP methods are refused. Returns the response plus what was paid.
| Parameter | Type | Description |
|---|---|---|
url * | string | URL to fetch |
body | string | Optional request body (rarely needed) |
confirmation_nonce | string | Code the human reads off the server console (never returned to you). Omit to request one. |
headers | object | Extra headers |
max_sats | integer | Max sats to pay |
method | string | GET or HEAD only (paid HTTP is read-only) |
pay_invoice
Pay a BOLT11 Lightning invoice directly and get the preimage as proof.
| Parameter | Type | Description |
|---|---|---|
invoice * | string | BOLT11 invoice to pay |
confirmation_nonce | string | Code the human reads off the server console (never returned to you). Omit to request one. |
max_sats | integer | Max sats to pay |
pay_l402_challenge
Pay an L402 or MPP invoice yourself and get the authorization token. Omit macaroon for MPP; pass challenge_header for a draft-00 Payment challenge.
| Parameter | Type | Description |
|---|---|---|
challenge_header | string | Raw WWW-Authenticate value of a 'Payment' challenge; draft-00 yields a single-use credential. |
confirmation_nonce | string | Code the human reads off the server console (never returned to you). Omit to request one. |
invoice | string | BOLT11 invoice. Optional if challenge_header carries one. |
macaroon | string | null | Base64 macaroon from the challenge. Omit for MPP. |
max_sats | integer | Max sats to pay |
test_l402_payment
Self-test the wallet by paying the public 1-sat L402 test endpoint end to end. A 'needs_confirmation' verdict means the server printed a code to its console; re-run with confirmation_nonce.
| Parameter | Type | Description |
|---|---|---|
confirmation_nonce | string | Code the human reads off the server console (never returned to you). Omit to request one. |
get_balance
Get the connected wallet's balance in sats, plus all currency balances and wallet info where the wallet reports them.
budget
View or tighten this session's spending limits. Tightening is one-way - an agent can lower its caps but never raise the operator's config limits.
| Parameter | Type | Description |
|---|---|---|
action * | string | status: read limits, tiers and session spend. tighten: lower the runtime sats caps. |
per_request | integer | tighten: max sats per request |
per_session | integer | tighten: max sats per session |
receipts
List payments this wallet made. The durable log persists across restarts and says how to revoke the wallet; the session list is in-memory only.
| Parameter | Type | Description |
|---|---|---|
source * | string | durable: the append-only log at ~/.lightning-enable/receipts.jsonl. session: payments since startup. |
limit | integer | Max entries (durable clamps to 1-200) |
since | string | session: ISO timestamp to filter from |
create_invoice
Create a BOLT11 Lightning invoice to receive a payment.
| Parameter | Type | Description |
|---|---|---|
amount_sats * | integer | Satoshis to receive |
expiry_secs | integer | Expiry in seconds |
memo | string | Invoice memo |
check_invoice_status
Check whether an invoice from create_invoice has been paid.
| Parameter | Type | Description |
|---|---|---|
invoice_id * | string | Invoice ID from create_invoice |
verify_confirmation_code
Check whether a payment confirmation code is still valid and what it authorizes. Verification ONLY - it never pays; to pay, re-call the payment tool with confirmation_nonce.
| Parameter | Type | Description |
|---|---|---|
nonce * | string | The 6-character code from the payment request |
discover_api
Discover L402 APIs: search the registry with query/category, or fetch one API's manifest with url.
| Parameter | Type | Description |
|---|---|---|
budget_aware | boolean | Annotate endpoints with affordable call counts |
category | string | Registry category filter, e.g. 'ai' |
query | string | Registry keyword search, e.g. 'weather' |
url | string | Base URL of an L402 API, or a manifest URL. Omit to search the registry. |
docs
Search or read the Lightning Enable docs. search: query -> sections. read: path, optional section -> text.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
limit | integer | default 5, max 20 |
path | string | e.g. /nwc-setup/account-setup |
query | string | |
section | string | heading text |
create_lightning_enable_account
Self-bootstrapping signup: pay a ~100-sat activation fee for a Lightning Enable merchant API key. Needs only a wallet; the key is saved to ~/.lightning-enable/config.json.
| Parameter | Type | Description |
|---|---|---|
email * | string | Email to register |
confirmation_nonce | string | Code the human reads off the server console (never returned to you). Omit to request one. |
max_sats | integer | Max sats for the ~100-sat fee |
wallet_ops
Wallet operations beyond invoices: BTC price, currency exchange, on-chain sends. Strike only (send_onchain also works on LND).
| Parameter | Type | Description |
|---|---|---|
action * | string | price: BTC/USD. exchange: convert currency in your wallet. send_onchain: irreversible - ALWAYS needs confirmation_nonce, so the first call only prints a code to the server console. |
address | string | send_onchain: destination address |
amount | number | exchange: amount in source_currency |
amount_sats | integer | send_onchain: satoshis to send |
confirmation_nonce | string | Code the human reads off the server console (never returned to you). Omit to request one. |
intent_id | string | send_onchain: optional idempotency scope. Omit for normal use. Supply a NEW value only when you intentionally need to pay the same address the same amount again; a repeat with the same address, amount… |
source_currency | string | exchange: from, USD or BTC |
target_currency | string | exchange: to, BTC or USD |
l402_producer
Sell access with L402: charge for your API or monetize an endpoint. sell_url turns a URL and a Lightning Address into a paid endpoint in one call, paid from this wallet, no account needed. verify with proxy_id proves domain ownership to get listed. Other actions need LIGHTNING_ENABLE_API_KEY.
| Parameter | Type | Description |
|---|---|---|
action * | string | create: mint an invoice + macaroon challenge. verify: check a payer's token before granting access, or with proxy_id your API ownership. configure_receive: point payouts at your own NWC wallet. status… |
accept_terms | string | sell_url: terms version the operator accepted; omit for the quote |
categories | array | publish: registry categories |
challenge_status | string | list_challenges: filter; omit for all |
confirmation_nonce | string | sell_url: code the human reads off the server console; omit to request one |
default_price_sats | integer | create_proxy/sell_url: per-call price buyers pay |
description | string | create: invoice text; create_proxy/sell_url: what the API does |
endpoint_id | string | add_endpoint: stable id for the route |
http_method | string | add_endpoint: GET, POST, ... (default GET) |
lightning_address | string | sell_url: name@domain paid per call |
limit | integer | status/list_challenges: max rows |
list_publicly | boolean | sell_url: list once verified |
macaroon | string | verify: base64 macaroon |
method | string | verify*: well-known, dns-txt or header |
name | string | create_proxy/sell_url: service name |
nwc_connection_string | string | configure_receive: nostr+walletconnect:// string; omit to reuse this server's own NWC wallet |
offset | integer | list_challenges: rows to skip |
path | string | add_endpoint: route path like /forecast |
preimage | string | verify: hex preimage |
price_sats | integer | create/add_endpoint: price in sats |
proxy_id | string | add_endpoint/publish/verify*: proxy id |
recovery_email | string | sell_url: recovery email |
recovery_nostr_pubkey | string | sell_url: recovery Nostr pubkey, hex |
reissue | boolean | verification_token: rotate a verified token |
resource | string | create: URL or name you are charging for |
service_description | string | publish: registry description |
service_name | string | publish: rename the listed service |
summary | string | add_endpoint: one-line summary |
target_base_url | string | create_proxy: https:// base URL to monetize |
target_url | string | sell_url: https URL to sell |
agent_services
Agent Service Agreements over Nostr: discover, request, settle, publish and review agent services. Requires LIGHTNING_ENABLE_API_KEY (review/reviews/reviewer_key do not).
| Parameter | Type | Description |
|---|---|---|
action * | string | discover: search listings. request: ask for a service. settle: PAY an agreement's L402 endpoint. publish: list your service once; to change it, unpublish then publish. unpublish: remove it. attest/rep… |
agreement_id | string | settle/attest/review: agreement id |
allow_unknown_payment | boolean | review: unrecorded proof, unbacked |
body | string | settle: request body |
budget_sats | integer | request: max sats |
capability_event_id | string | request: capability event id |
categories | array | publish: categories |
category | string | discover: category |
checks | object | review: {responded,on_time,well_formed,price_honored}: bool |
confirmation_nonce | string | Code the human reads off the server console (never returned to you). Omit to request one. |
content | string | publish: service text; attest/review: note (never prompt/response) |
hashtags | array | discover/publish: hashtags |
l402_endpoint | string | settle/publish/review(s): L402 endpoint |
limit | integer | discover/reputation: max results |
max_sats | integer | settle: max sats |
method | string | settle: HTTP method |
parameters | string | request: extra params, JSON string |
price_sats | integer | publish: price per request |
proof | string | attest: preimage hash; review: payment hash |
pubkey | string | reputation: agent pubkey |
query | string | discover: keyword |
rating | integer | attest: 1-5; review: quality 1-5 |
reason | string | unpublish: reason |
service_id | string | publish/unpublish: listing d-tag |
subject_pubkey | string | attest/review(s): subject pubkey |
target_url | string | publish: API URL to wrap in a new L402 proxy |
renew_lightning_enable_subscription
Pay the L402 invoice that buys or extends 30 days of Lightning Enable Agentic Commerce for the configured API key. Needs a preimage-capable wallet.
| Parameter | Type | Description |
|---|---|---|
confirmation_nonce | string | Code the human reads off the server console (never returned to you). Omit to request one. |
max_sats | integer | Max sats to pay |