pay_lightning_address
Send Bitcoin Lightning payments to addresses in user@domain.com format using the Lightning Wallet MCP server, enabling AI agents to execute transactions with specified amounts and optional comments.
Instructions
Pay to a Lightning address (user@domain.com format). REQUIRES AGENT KEY.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Lightning address (user@domain.com) | |
| amount_sats | Yes | Amount in satoshis to send | |
| comment | No | Optional payment comment |
Implementation Reference
- src/lightning-faucet.ts:1076-1107 (handler)Implementation of payLightningAddress in LightningFaucetClient, which sends a request to the Lightning Faucet API.
async payLightningAddress( address: string, amountSats: number, comment?: string ): Promise<{ amountSats: number; feeSats: number; paymentHash: string; newBalance: number; rawResponse: ApiResponse; }> { const data: Record<string, unknown> = { address, amount_sats: amountSats, }; if (comment) data.comment = comment; const result = await this.request<ApiResponse & { amount_sats?: number; fee_sats?: number; payment_hash?: string; new_balance?: number; }>('pay_lightning_address', data); return { amountSats: result.amount_sats || amountSats, feeSats: result.fee_sats || 0, paymentHash: result.payment_hash || '', newBalance: result.new_balance || 0, rawResponse: result, }; } - src/index.ts:1487-1509 (handler)MCP tool handler registration for pay_lightning_address in index.ts.
case 'pay_lightning_address': { const parsed = PayLightningAddressSchema.parse(args); const result = await session.requireClient().payLightningAddress( parsed.address, parsed.amount_sats, parsed.comment ); return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: `Paid ${parsed.amount_sats} sats to ${parsed.address}`, amount_sats: result.amountSats, fee_sats: result.feeSats, payment_hash: result.paymentHash, new_balance: result.newBalance, }, null, 2), }, ], }; } - src/index.ts:226-231 (schema)Zod input schema for pay_lightning_address tool.
const PayLightningAddressSchema = z.object({ address: z.string().regex(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, 'Invalid Lightning address format (expected user@domain)') .describe('Lightning address (user@domain.com format)'), amount_sats: z.number().int().positive().max(10_000_000).describe('Amount in satoshis to send'), comment: z.string().max(144).optional().describe('Optional payment comment'), });