# pay_invoice

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

Agent View of the PolicyLayer registry record for `pay_invoice`. HTML page: https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/pay-invoice

## Facts

- Tool: `pay_invoice`
- Server: Lightning Wallet (`lightning-wallet-mcp`) — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp.md
- Install: `npx -y lightning-wallet-mcp`
- Homepage: https://github.com/lightningfaucet/lightning-wallet-mcp
- Risk category: Financial (Critical risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Approval-gated

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pay_invoice",
    "arguments": {}
  }
}
```

## Why pay_invoice is rated Critical

This tool directly transfers cryptocurrency from a wallet balance to settle Lightning invoices. Even with authorization checks ('REQUIRES AGENT KEY'), an AI agent with compromised or malicious instructions could drain funds, incur unauthorized financial obligations, or be exploited by third parties to receive payments.

From the tool's own definition: "Tool name 'pay_invoice' combined with description 'Pay a BOLT11 Lightning invoice from the agent balance' explicitly moves money (Bitcoin via Lightning Network). The phrase 'from the agent balance' confirms debit of funds."

## Use case

AI agents use pay_invoice to commit financial operations through Lightning Wallet, usually the final step of a payment, billing, or trading workflow. A call moves real money.

## Recommended policy (PolicyLayer)

Verdict: **Approval-gated**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Lightning Wallet:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "pay_invoice": {
      "deny_if": [
        {
          "conditions": [],
          "on_deny": "Requires human approval."
        }
      ]
    }
  }
}
```

## Other tools on Lightning Wallet (44)

- `delete_agent` — Destructive — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/delete-agent.md
- `delete_webhook` — Destructive — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/delete-webhook.md
- `lnurl_auth` — Execute — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/lnurl-auth.md
- `test_webhook` — Execute — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/test-webhook.md
- `board_vote` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/board-vote.md
- `claim_lnurl_withdraw` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/claim-lnurl-withdraw.md
- `claim_promo` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/claim-promo.md
- `create_invoice` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/create-invoice.md
- `create_withdraw_link` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/create-withdraw-link.md
- `fund_agent` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/fund-agent.md
- `get_deposit_invoice` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/get-deposit-invoice.md
- `keysend` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/keysend.md
- `nostr_zap` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/nostr-zap.md
- `pay_l402_api` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/pay-l402-api.md
- `pay_lightning_address` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/pay-lightning-address.md
- `recover_account` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/recover-account.md
- `set_budget` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/set-budget.md
- `sweep_agent` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/sweep-agent.md
- `transfer_to_agent` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/transfer-to-agent.md
- `withdraw` — Financial — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/withdraw.md
- `board_read` — Read — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/board-read.md
- `check_balance` — Read — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/check-balance.md
- `decode_invoice` — Read — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/decode-invoice.md
- `get_budget_status` — Read — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/get-budget-status.md
- `get_info` — Read — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/get-info.md
- `get_invoice_status` — Read — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/get-invoice-status.md
- `get_nostr_identity` — Read — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/get-nostr-identity.md
- `get_rate_limits` — Read — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/get-rate-limits.md
- `get_transactions` — Read — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/get-transactions.md
- `list_agents` — Read — https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp/list-agents.md
- …and 14 more: https://policylayer.com/tools/io-github-lightningfaucet-lightning-wallet-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=io-github-lightningfaucet-lightning-wallet-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-lightningfaucet-lightning-wallet-mcp
