mcp-server

v2.0.5
io.github.lightningfaucet/mcp-server Checked 8 hours ago Published 10 months ago

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

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_balance

Check your current Lightning balance in satoshis. Works with both operator and agent keys.

pay_l402_api

Make a request to an L402-protected API. If payment is required (HTTP 402), automatically pay the Lightning invoice and complete the request. REQUIRES AGENT KEY - use set_agent_credentials first if operating as an operator.

ParameterTypeDescription
url *stringThe URL to request
bodystringRequest body for POST/PUT requests
max_payment_satsintegerMaximum amount in satoshis to pay for this request
methodstringHTTP method

pay_invoice

Pay a BOLT11 Lightning invoice from the agent balance. Returns preimage as proof of payment. REQUIRES AGENT KEY.

ParameterTypeDescription
bolt11 *stringBOLT11 invoice string to pay (starts with lnbc...)
max_fee_satsintegerMaximum routing fee in satoshis

create_invoice

Create a Lightning invoice to receive payment. Use get_invoice_status to check if paid.

ParameterTypeDescription
amount_sats *integerAmount in satoshis to request
memostringDescription/memo for the invoice

get_invoice_status

Check if a created invoice has been paid. Use the payment_hash from create_invoice.

ParameterTypeDescription
payment_hash *stringPayment hash of the invoice to check

get_transactions

Get the agent transaction history. Returns both incoming and outgoing payments.

ParameterTypeDescription
limitintegerMax transactions to return
offsetintegerNumber to skip for pagination

register_operator

Register a new operator account. Returns API key and recovery code. SAVE THESE - they cannot be retrieved later!

ParameterTypeDescription
namestringName for the operator account (optional)

get_deposit_invoice

Create a Lightning invoice to fund your operator account. Pay this invoice to add sats to your balance.

ParameterTypeDescription
amount_sats *integerAmount in satoshis to deposit

create_agent

Create a new agent under your operator account. Returns the agent API key.

ParameterTypeDescription
name *stringName for the agent
budget_limit_satsintegerOptional spending limit in sats
descriptionstringOptional description

fund_agent

Transfer sats from operator balance to an agent.

ParameterTypeDescription
agent_id *integerID of the agent to fund
amount_sats *integerAmount in satoshis to transfer

list_agents

List all agents under your operator account.

set_operator_key

Switch to a different operator API key for subsequent requests. Use after register_operator to start using the new credentials.

ParameterTypeDescription
api_key *stringThe operator API key

set_agent_credentials

Switch to an agent API key for subsequent requests. Use to operate as a specific agent after creating it.

ParameterTypeDescription
api_key *stringThe agent API key

whoami

Get current context - returns whether you are operating as an operator or agent, along with ID, name, and balance.

register_webhook

Register a webhook URL to receive payment notifications. Max 5 webhooks per agent. REQUIRES AGENT KEY.

ParameterTypeDescription
url *stringHTTPS webhook URL to receive events
eventsarrayEvent types to subscribe to

list_webhooks

List all registered webhooks for the current agent. REQUIRES AGENT KEY.

delete_webhook

Delete a registered webhook. REQUIRES AGENT KEY.

ParameterTypeDescription
webhook_id *integerID of the webhook to delete

test_webhook

Send a test event to a webhook to verify it works. REQUIRES AGENT KEY.

ParameterTypeDescription
webhook_id *integerID of the webhook to test

get_budget_status

Get budget status for an agent - shows limit, spent, and remaining. Works with operator or agent keys.

ParameterTypeDescription
agent_idintegerAgent ID (operators only, omit for current agent)

set_budget

Set or update budget limit for an agent. REQUIRES OPERATOR KEY.

ParameterTypeDescription
agent_id *integerAgent ID to update
budget_limit_sats *integerNew budget limit in sats (0 for unlimited)

deactivate_agent

Deactivate an agent - it cannot make payments until reactivated. REQUIRES OPERATOR KEY.

ParameterTypeDescription
agent_id *integerAgent ID to deactivate

reactivate_agent

Reactivate a previously deactivated agent. REQUIRES OPERATOR KEY.

ParameterTypeDescription
agent_id *integerAgent ID to reactivate

recover_account

Recover an operator account using the recovery code from registration. Returns a new API key. Triggers 60-min withdrawal cooldown.

ParameterTypeDescription
recovery_code *stringRecovery code from registration

rotate_api_key

Generate a new API key, invalidating the old one. For operators: triggers 60-min withdrawal cooldown. For agents: 30-min cooldown.

ParameterTypeDescription
agent_idintegerAgent ID (operators only). Omit to rotate operator key.

get_info

Get service information including version, status, limits, and supported features.

decode_invoice

Decode a BOLT11 invoice without paying it. Returns amount, description, expiry, and destination.

ParameterTypeDescription
bolt11 *stringBOLT11 invoice string to decode

get_rate_limits

Get current rate limit status - requests remaining and reset time.

withdraw

Withdraw funds from operator account to external Lightning invoice. REQUIRES OPERATOR KEY. Subject to security cooldown.

ParameterTypeDescription
invoice *stringBOLT11 invoice to pay out to

sweep_agent

Sweep funds from agent back to operator balance. REQUIRES OPERATOR KEY.

ParameterTypeDescription
agent_id *integerAgent ID to sweep funds from
amount_sats *integerAmount in sats (use large number for full balance)

pay_lightning_address

Pay to a Lightning address (user@domain.com format). REQUIRES AGENT KEY.

ParameterTypeDescription
address *stringLightning address (user@domain.com)
amount_sats *integerAmount in satoshis to send
commentstringOptional payment comment

export_transactions

Export transaction history in JSON or CSV format.

ParameterTypeDescription
end_datestringISO date for end of range
formatstringExport format
include_pendingbooleanInclude pending transactions
start_datestringISO date for start of range

get_agent_analytics

Get detailed spending analytics for an agent.

ParameterTypeDescription
agent_idintegerAgent ID (defaults to current agent)
periodstringTime period

transfer_to_agent

Transfer sats between agents or from operator to agent. REQUIRES OPERATOR KEY.

ParameterTypeDescription
amount_sats *integerAmount to transfer
to_agent_id *integerDestination agent ID
from_agent_idintegerSource agent ID (omit to use operator balance)

delete_agent

Permanently delete an agent. Remaining balance is returned to operator. REQUIRES OPERATOR KEY.

ParameterTypeDescription
agent_id *integerAgent ID to delete
confirm *booleanMust be true to confirm deletion

lnurl_auth

Authenticate to a service using LNURL-auth protocol. REQUIRES AGENT KEY.

ParameterTypeDescription
lnurl *stringLNURL-auth string to authenticate with

claim_lnurl_withdraw

Claim funds from an LNURL-withdraw link. REQUIRES AGENT KEY.

ParameterTypeDescription
lnurl *stringLNURL-withdraw string to claim from

keysend

Send a payment directly to a node without an invoice (keysend/spontaneous payment). REQUIRES AGENT KEY.

ParameterTypeDescription
amount_sats *integerAmount in satoshis
destination *stringDestination node public key
messagestringOptional TLV message