NWC MCP Server

Official

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Connects with Alby's Lightning wallet infrastructure through the NWC protocol, as evidenced by the package name (@getalby/nwc-mcp-server) and focus on Lightning Network integration.

  • Enables interaction with the Bitcoin Lightning Network for payment processing, allowing AI agents to initiate transactions and manage lightning wallet operations via Nostr Wallet Connect (NWC).

  • Provides tools for Bitcoin Lightning Network operations, enabling payment processing and wallet management through the Nostr Wallet Connect protocol.

NWC MCP Server

Connect a bitcoin lightning wallet to your LLM using Nostr Wallet Connect (NWC or NIP-47).

This MCP server uses the official MCP TypeScript SDK

Quick Start

Add to Claude Desktop

Add this to your claude_desktop_config.json:

{ "mcpServers": { "nwc": { "command": "npx", "args": ["-y", "@getalby/nwc-mcp-server"], "env": { "NWC_CONNECTION_STRING": "YOUR NWC CONNECTION STRING HERE" } } } }

Add to Goose

  1. Type goose configure
  2. Add extension -> Command Line Extension
  3. Call it nwc
  4. What command should be run: npx -y @getalby/nwc-mcp-server
  5. Timeout: 30
  6. Description: no
  7. environment variables: yes
  8. environment variable name: NWC_CONNECTION_STRING
  9. environment variable value: nostr+walletconnect://... (your NWC connection secret here)

Add to Cline

Copy the below and paste it into a cline prompt. It should prompt you to update the connection string.

Add the following to my MCP servers list: "nwc": { "command": "npx", "args": ["-y", "@getalby/nwc-mcp-server"], "env": { "NWC_CONNECTION_STRING": "nostr+walletconnect://..." }, "disabled": false, "autoApprove": [] }

Add to N8N (Community Node)

Currently this MCP server only works via command line (STDIO).

You can install the n8n-nodes-mcp community node and run n8n with tools enabled e.g.

N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true npx n8n

Create a blank workflow and add an AI agent node. Configure your LLM model and add a new tool "MCP Client" (which will have a cube next to it showing it's a community node).

Configure the MCP Client by adding a credential with Command Line (STDIO) selected.

command: npx arguments: -y @getalby/nwc-mcp-server environments NWC_CONNECTION_STRING=nostr+walletconnect://your_key_here (create the whole line in a text editor and paste it in, since the password field cannot be switched to plaintext)

See the N8N paid chat workflow for a full example

From Source

Prerequisites

  • Node.js 20+
  • Yarn
  • A connection string from a lightning wallet that supports NWC

Installation

yarn install

Building

yarn build

Add your NWC connection

Copy .env.example to .env and update your connection string

Inspect the tools (use/test without an LLM)

yarn inspect

Supported Tools

See the tools directory

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Connects a Bitcoin Lightning wallet to your LLM using Nostr Wallet Connect, enabling payment functionalities within language models like Claude.

  1. Quick Start
    1. Add to Claude Desktop
    2. Add to Goose
    3. Add to Cline
    4. Add to N8N (Community Node)
  2. From Source
    1. Prerequisites
    2. Installation
    3. Building
    4. Add your NWC connection
    5. Inspect the tools (use/test without an LLM)
    6. Supported Tools
ID: 0xq1g0rw52