Nwc MCP logo

Nwc MCP

Lightning wallet tools for AI agents using Nostr Wallet Connect, with budgets, confirmations, allowlists, and audit logs.

Install Nwc MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "nwc-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "nwc-mcp"
      ],
      "env": {
        "NWC_CONNECTION_STRING": "YOUR_VALUE_HERE",
        "NWC_DAILY_BUDGET_SATS": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env NWC_CONNECTION_STRING=YOUR_VALUE_HERE --env NWC_DAILY_BUDGET_SATS=YOUR_VALUE_HERE --transport stdio nwc-mcp -- npx -y nwc-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

The install command installed and started the server, which then stopped for configuration (such as an API key) that our sandbox does not have — expected for servers that connect to your account.

npx -y nwc-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The nwc-mcp MCP server exposes NIP-47 Lightning wallet operations to AI agents through Nostr Wallet Connect. It provides read, invoice, and payment tools for balances, invoices, Lightning Addresses, LNURLs, batch payments, and keysend. Spend requests pass through read-only, allowlist, budget, and optional confirmation gates before reaching the wallet. Use it when an agent needs controlled access to a dedicated Lightning sub-wallet rather than unrestricted access to a main wallet.

Use cases

  • Pay metered MCP tools from a capped sub-wallet
  • Send capped Lightning payments from a Nostr bot
  • Create receive invoices in response to agent messages
  • Pay evaluation workers per completed task

Key features

  • NIP-47 wallet operations over Nostr Wallet Connect
  • Rolling, lifetime, and per-payment spending limits
  • Optional destination allowlist and confirmation tokens
  • Invoice, Lightning Address, LNURL, batch, and keysend payments
  • Structured audit logging and persisted budget state

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/17 checks healthy over the last 89d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · nwc-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads243Package downloads in the last 30 days.
Last commit5mo agoMost recent push to the default branch.
Install checkRunsOur sandbox started it; it then asked for an API key or config.

How Nwc MCP works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Nwc MCP

nwc-mcp is an MCP server that connects AI agents to NIP-47-compatible Lightning wallets through Nostr Wallet Connect. Its tools read wallet status, create invoices, decode and look up invoices, list transactions, check budgets, and make gated payments to invoices, Lightning Addresses, LNURLs, batches, or pubkeys.

Install it from source with Node.js 20+, pnpm, and a build of the project, then register `dist/index.js` with your MCP client. The repository also documents an npm `npx -y nwc-mcp` command for once the package is published.

Set `NWC_CONNECTION_STRING` and `NWC_DAILY_BUDGET_SATS` before starting it. The server loads `.env` from the working directory or project root, while variables supplied by the parent process take precedence. Optional variables add total, per-payment, confirmation, allowlist, logging, and read-only controls.

Yes, nwc-mcp works with Cursor through the client’s MCP configuration. Add the server manifest using the repository’s example as a reference, replace the path placeholder, and let the server load its own `.env` values.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewNwc MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/nwc-mcp?style=directory)](https://allmcps.com/mcp/nwc-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/nwc-mcp"><img src="https://allmcps.com/api/badge/nwc-mcp?style=directory" alt="Nwc MCP on AllMCPs" /></a>