MCPSERV.CLUB
getAlby

NWC MCP Server

MCP Server

Connect Lightning wallets to LLMs via Nostr Wallet Connect

Stale(60)
12stars
0views
Updated Sep 1, 2025

About

The NWC MCP Server bridges Bitcoin Lightning wallets with large language models using the Nostr Wallet Connect protocol, providing a command‑line or HTTP/SSE interface for secure, bearer‑authenticated interactions.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Overview

The NWC MCP Server bridges the gap between a Bitcoin Lightning wallet and an LLM by exposing a set of tools over the Model Context Protocol (MCP). It allows AI assistants to perform real‑world actions such as sending payments, querying balance, or retrieving invoice details directly from a Lightning node that supports Nostr Wallet Connect (NWC) or the older NIP‑47 specification. This solves a common pain point for developers building finance‑centric chatbots or automation workflows: how to give an LLM secure, fine‑grained access to a user’s wallet without exposing private keys or writing custom APIs.

At its core, the server runs as a lightweight Node.js process that listens for MCP requests over either standard input/output (STDIO) or HTTP/SSE. When a tool invocation arrives, it authenticates the request using the NWC connection secret (passed as a Bearer token) and forwards the call to the underlying Lightning node via NWC. The response is then returned through MCP, preserving the conversational context and allowing the LLM to seamlessly incorporate wallet data into its replies. This architecture keeps sensitive credentials out of the LLM and delegates all cryptographic work to the wallet, ensuring that payments remain auditable and tamper‑proof.

Key capabilities include:

  • Payment execution – Create, sign, and broadcast Lightning invoices or direct channel payments.
  • Account queries – Retrieve wallet balance, transaction history, and channel status.
  • Invoice management – Generate new invoices with custom amounts or expiry times, and verify existing ones.
  • NWC/NIP‑47 integration – Support for both modern Nostr Wallet Connect and legacy NIP‑47, widening compatibility across wallets.

Developers can integrate the server into a wide range of AI workflows. For example, an autonomous customer support agent could issue a payment to a vendor upon user confirmation, or a financial assistant could report on recent Lightning activity. The server’s command‑line interface makes it trivial to embed in existing toolchains such as Claude Desktop, Goose, Cline, or N8N, while the HTTP/SSE mode enables hosted deployments like Alby’s public MCP endpoint. Because all interactions are authenticated via the wallet’s secret, the LLM never handles private keys, reducing security risk and simplifying compliance.

Unique advantages stem from its focus on Lightning. Unlike generic payment APIs, the server exposes low‑level Lightning primitives that let developers craft complex workflows—such as multi‑invoice batching, dynamic routing, or channel management—directly from the LLM. Its compatibility with both NWC and NIP‑47 ensures that it can serve a broad ecosystem of Lightning wallets, from modern mobile apps to legacy desktop solutions. In short, the NWC MCP Server gives AI assistants a secure, first‑class conduit to Bitcoin Lightning, enabling new classes of real‑time financial interactions within conversational AI.