# nwc-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/llmops-pro/nwc-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 243  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/nwc-mcp

## Description
Lightning wallet for AI agents via Nostr Wallet Connect (NIP-47): budget caps, confirm, audit log.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "nwc-mcp": {
    "command": "npx",
    "args": ["-y","nwc-mcp"],
    "env": {
      "NWC_CONNECTION_STRING": "",
      "NWC_DAILY_BUDGET_SATS": ""
    }
  }
}
```

**Requires environment variables:** `NWC_CONNECTION_STRING`, `NWC_DAILY_BUDGET_SATS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What nwc-mcp MCP server does

The nwc-mcp MCP server connects an MCP-speaking AI client to a NIP-47-compatible Lightning wallet through a Nostr Wallet Connect connection string. It exposes wallet inspection, invoice creation, invoice decoding, transaction lookup, budget status, and payment operations as agent-callable tools.

Read and receive operations include checking wallet capabilities and balance, listing transactions, looking up invoice state, decoding bolt11 invoices locally, checking budget usage, and generating receive invoices. Payment tools support bolt11 invoices, Lightning Addresses using LUD-16, raw LNURLs using LUD-01, batches of up to 20 invoices, and direct keysend payments. Keysend is disabled unless explicitly enabled.

Typical uses include agents paying for metered tools, Nostr bots sending capped zaps, evaluation workers paying per task, and storefront agents creating invoices in response to messages.

## How it works

The agent calls an MCP tool, and the server communicates with the configured wallet using NIP-47. Payment tools are evaluated by a safety pipeline before execution. Read-only mode can reject spending immediately. For applicable payments, the server resolves the amount, checks an optional destination allowlist, evaluates rolling daily and lifetime budgets, and enforces an optional per-payment maximum.

When confirmation is enabled, the server returns a one-time token instead of paying. The agent must submit that token to the confirmation tool within its five-minute lifetime. Successful payments record the principal and estimated fees against the budget. Every attempt, including blocked and failed calls, is written as one structured JSON record to the audit log.

The budget tracker is persisted to a local state file. The wallet’s own connection-level spending limit remains an additional control outside the server.

## Setup and configuration

The nwc-mcp MCP server requires Node.js 20 or newer and a connection string from a NIP-47 wallet. The documented setup uses a dedicated sub-wallet, with Alby Hub PRO used for smoke testing; the protocol also supports other NIP-47-compatible wallets such as Mutiny, Coinos, and Phoenix.

Install from source with pnpm, build the project, and register `dist/index.js` with an MCP client. The repository includes a Claude Desktop configuration example. Claude Code can register the server with a project- or user-scoped command, while Cursor and other MCP clients can use the corresponding manifest configuration.

Set these required variables:

- `NWC_CONNECTION_STRING`: the wallet’s `nostr+walletconnect://...` connection string. Treat it as a secret because it can authorize spending up to configured limits.
- `NWC_DAILY_BUDGET_SATS`: the rolling 24-hour spending cap. The server will not start without it.

Optional controls include `NWC_TOTAL_BUDGET_SATS`, `NWC_MAX_INVOICE_SATS`, `NWC_READ_ONLY`, `NWC_REQUIRE_CONFIRM`, `NWC_KEYSEND_ENABLED`, and `NWC_ALLOWED_DESTINATIONS`. `NWC_LOG_PATH` and `NWC_BUDGET_STATE_PATH` change the audit-log and budget-state locations. Environment variables supplied by the parent process take precedence over values loaded from `.env`.

## Tools and capabilities

- Inspect wallet information, balance, supported methods, network, alias, and node public key.
- Decode bolt11 invoices without a network request.
- Create invoices and inspect invoice status, transactions, and budget usage.
- Pay invoices, Lightning Addresses, LNURLs, multiple invoices, or keysend destinations.
- Require confirmation tokens before payment execution.
- Restrict destinations and persist spending state.

## Limitations and notes

The nwc-mcp MCP server requires a live NIP-47-compatible wallet and a valid connection string. Payment safety controls are server-side safeguards; the wallet connection’s own cap should also be configured. Keysend has a weaker safety surface than bolt11 payments and is off by default. Audit logs are append-only by intent, so log rotation remains an operational responsibility. Read-only mode disables all spend tools, while invoice creation remains a receive operation rather than a wallet spend.

_Full upstream README: https://allmcps.com/mcp/nwc-mcp/readme_

