nostr wallet connect (lightning).com
nostr wallet connect (lightning).com logo

Nostr Wallet Connect (Lightning)

Enables AI interaction with Bitcoin Lightning wallets through Nostr Wallet Connect for checking balances, creating invoi...

Created byApr 23, 2025

NWC MCP Server

Connect a bitcoin lightning wallet to your LLM using Nostr Wallet Connect ([NWC](https://nwc.dev/) or [NIP-47](https://github.com/nostr-protocol/nips/blob/master/47.md)).
This MCP server uses the [official MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)

Quick Start

Add to Claude Desktop

Add this to your claude_desktop_config.json:

Add to Goose

  1. Type `goose configure`
  1. Add extension -> Command Line Extension
  1. Call it `nwc`
  1. What command should be run: `npx -y @getalby/nwc-mcp-server`
  1. Timeout: 30
  1. Description: no
  1. environment variables: yes
  1. environment variable name: `NWC_CONNECTION_STRING`
  1. 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 to N8N (Community Node)

Currently this MCP server only works via command line (STDIO).
You can install the [n8n-nodes-mcp](https://github.com/nerding-io/n8n-nodes-mcp) community node and run n8n with tools enabled e.g.
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](examples/n8n-paid-chat) for a full example

From Source

Prerequisites

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

Installation

Building

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](./src/tools)