Tools · Agent-integration primitives
Alby & Nostr Wallet Connect (NWC)
A standard for controlling a Lightning wallet remotely — scoped, budgeted, and revocable — without ever handing over the keys.
What it is
Nostr Wallet Connect (NWC, NIP-47) is an open protocol that lets an application or agent control a Lightning wallet remotely — create invoices, send payments, check balances — without ever holding the wallet’s private keys. The wallet (which holds the keys and signs) and the app (which signs nothing) talk over Nostr relays. The agent holds a revocable, scoped connection string instead of a key, which drastically shrinks its attack surface.
Alby is the primary builder and promoter of the standard: the Alby browser extension, Alby Hub (a self-custodial node manager), a JavaScript SDK, and — most relevant for agents — the nwc-mcp-server, which exposes NWC payments to Claude, Cursor, or n8n as MCP tools.
When to use it
- Giving an agent the ability to pay without giving it custody of keys.
- Wiring Lightning payments into an MCP-capable agent (Claude, Cursor, n8n) via
nwc-mcp-server. - Any app that needs delegated, budget-limited spend from a wallet the user still controls.
Quick start
Connect an MCP-capable agent to a wallet with Alby’s nwc-mcp-server: generate an NWC connection string from Alby Hub (or any NWC-compatible wallet) with a spending budget, then point the MCP server at it. The agent gets payment tools; the keys stay in the wallet.
Gotchas
- The NWC connection string embeds a secret that grants wallet control — treat it as sensitive, and prefer budgeted, scoped connections (per-app spend caps) over full access.
- Transport runs over Nostr relays; relay availability and latency affect payment reliability — use multiple relays.
- Custody depends on the wallet behind the connection (self-custodial Alby Hub vs. a hosted wallet differ) — be explicit about which you are delegating from.