mcp-server
v2.0.5Give 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.
| Parameter | Type | Description |
|---|---|---|
url * | string | The URL to request |
body | string | Request body for POST/PUT requests |
max_payment_sats | integer | Maximum amount in satoshis to pay for this request |
method | string | HTTP method |
pay_invoice
Pay a BOLT11 Lightning invoice from the agent balance. Returns preimage as proof of payment. REQUIRES AGENT KEY.
| Parameter | Type | Description |
|---|---|---|
bolt11 * | string | BOLT11 invoice string to pay (starts with lnbc...) |
max_fee_sats | integer | Maximum routing fee in satoshis |
create_invoice
Create a Lightning invoice to receive payment. Use get_invoice_status to check if paid.
| Parameter | Type | Description |
|---|---|---|
amount_sats * | integer | Amount in satoshis to request |
memo | string | Description/memo for the invoice |
get_invoice_status
Check if a created invoice has been paid. Use the payment_hash from create_invoice.
| Parameter | Type | Description |
|---|---|---|
payment_hash * | string | Payment hash of the invoice to check |
get_transactions
Get the agent transaction history. Returns both incoming and outgoing payments.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max transactions to return |
offset | integer | Number to skip for pagination |
register_operator
Register a new operator account. Returns API key and recovery code. SAVE THESE - they cannot be retrieved later!
| Parameter | Type | Description |
|---|---|---|
name | string | Name 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.
| Parameter | Type | Description |
|---|---|---|
amount_sats * | integer | Amount in satoshis to deposit |
create_agent
Create a new agent under your operator account. Returns the agent API key.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name for the agent |
budget_limit_sats | integer | Optional spending limit in sats |
description | string | Optional description |
fund_agent
Transfer sats from operator balance to an agent.
| Parameter | Type | Description |
|---|---|---|
agent_id * | integer | ID of the agent to fund |
amount_sats * | integer | Amount 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.
| Parameter | Type | Description |
|---|---|---|
api_key * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
api_key * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
url * | string | HTTPS webhook URL to receive events |
events | array | Event 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.
| Parameter | Type | Description |
|---|---|---|
webhook_id * | integer | ID of the webhook to delete |
test_webhook
Send a test event to a webhook to verify it works. REQUIRES AGENT KEY.
| Parameter | Type | Description |
|---|---|---|
webhook_id * | integer | ID 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.
| Parameter | Type | Description |
|---|---|---|
agent_id | integer | Agent ID (operators only, omit for current agent) |
set_budget
Set or update budget limit for an agent. REQUIRES OPERATOR KEY.
| Parameter | Type | Description |
|---|---|---|
agent_id * | integer | Agent ID to update |
budget_limit_sats * | integer | New budget limit in sats (0 for unlimited) |
deactivate_agent
Deactivate an agent - it cannot make payments until reactivated. REQUIRES OPERATOR KEY.
| Parameter | Type | Description |
|---|---|---|
agent_id * | integer | Agent ID to deactivate |
reactivate_agent
Reactivate a previously deactivated agent. REQUIRES OPERATOR KEY.
| Parameter | Type | Description |
|---|---|---|
agent_id * | integer | Agent 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.
| Parameter | Type | Description |
|---|---|---|
recovery_code * | string | Recovery 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.
| Parameter | Type | Description |
|---|---|---|
agent_id | integer | Agent 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.
| Parameter | Type | Description |
|---|---|---|
bolt11 * | string | BOLT11 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.
| Parameter | Type | Description |
|---|---|---|
invoice * | string | BOLT11 invoice to pay out to |
sweep_agent
Sweep funds from agent back to operator balance. REQUIRES OPERATOR KEY.
| Parameter | Type | Description |
|---|---|---|
agent_id * | integer | Agent ID to sweep funds from |
amount_sats * | integer | Amount in sats (use large number for full balance) |
pay_lightning_address
Pay to a Lightning address (user@domain.com format). REQUIRES AGENT KEY.
| Parameter | Type | Description |
|---|---|---|
address * | string | Lightning address (user@domain.com) |
amount_sats * | integer | Amount in satoshis to send |
comment | string | Optional payment comment |
export_transactions
Export transaction history in JSON or CSV format.
| Parameter | Type | Description |
|---|---|---|
end_date | string | ISO date for end of range |
format | string | Export format |
include_pending | boolean | Include pending transactions |
start_date | string | ISO date for start of range |
get_agent_analytics
Get detailed spending analytics for an agent.
| Parameter | Type | Description |
|---|---|---|
agent_id | integer | Agent ID (defaults to current agent) |
period | string | Time period |
transfer_to_agent
Transfer sats between agents or from operator to agent. REQUIRES OPERATOR KEY.
| Parameter | Type | Description |
|---|---|---|
amount_sats * | integer | Amount to transfer |
to_agent_id * | integer | Destination agent ID |
from_agent_id | integer | Source agent ID (omit to use operator balance) |
delete_agent
Permanently delete an agent. Remaining balance is returned to operator. REQUIRES OPERATOR KEY.
| Parameter | Type | Description |
|---|---|---|
agent_id * | integer | Agent ID to delete |
confirm * | boolean | Must be true to confirm deletion |
lnurl_auth
Authenticate to a service using LNURL-auth protocol. REQUIRES AGENT KEY.
| Parameter | Type | Description |
|---|---|---|
lnurl * | string | LNURL-auth string to authenticate with |
claim_lnurl_withdraw
Claim funds from an LNURL-withdraw link. REQUIRES AGENT KEY.
| Parameter | Type | Description |
|---|---|---|
lnurl * | string | LNURL-withdraw string to claim from |
keysend
Send a payment directly to a node without an invoice (keysend/spontaneous payment). REQUIRES AGENT KEY.
| Parameter | Type | Description |
|---|---|---|
amount_sats * | integer | Amount in satoshis |
destination * | string | Destination node public key |
message | string | Optional TLV message |