Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

nwc-mcp-server

MCP.Pizza Chef: getAlby

The nwc-mcp-server is an MCP server that enables integration of Bitcoin Lightning wallets with large language models using Nostr Wallet Connect (NWC) protocol. It leverages the official MCP TypeScript SDK to securely connect and interact with wallets via NIP-47 standards, allowing LLMs to access wallet functionalities in real-time. This server facilitates seamless wallet connection setups in environments like Claude Desktop and Goose, enabling advanced crypto-related workflows within AI applications.

Use This MCP server To

Enable LLMs to access Bitcoin Lightning wallet balances and transactions Facilitate Lightning payments through LLM commands Integrate wallet connection in AI chat clients like Claude Desktop Automate wallet interactions using natural language prompts Securely connect LLMs to user wallets via Nostr Wallet Connect Enable multi-step crypto transaction workflows with LLMs Use LLMs to generate Lightning invoices and process payments

README

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

nwc-mcp-server FAQ

How do I configure nwc-mcp-server with Claude Desktop?
Add the server to claude_desktop_config.json with the NWC_CONNECTION_STRING environment variable set to your Nostr Wallet Connect secret.
What is Nostr Wallet Connect (NWC) in this context?
NWC is a protocol (NIP-47) that allows secure connection between Bitcoin Lightning wallets and applications, enabling this MCP server to bridge wallets with LLMs.
Can I use nwc-mcp-server with other MCP hosts besides Claude Desktop?
Yes, it supports any MCP host that can run command line extensions and set environment variables, such as Goose.
What security measures are in place for wallet connections?
Connections use the Nostr Wallet Connect protocol which includes secure key exchange and scoped permissions to protect wallet access.
Does nwc-mcp-server support multiple wallet connections simultaneously?
The server is designed to handle one connection per instance; multiple instances can be run for multiple wallets.
Is the nwc-mcp-server open source?
Yes, it is available on GitHub and uses the official MCP TypeScript SDK for implementation.
What programming languages or SDKs does nwc-mcp-server use?
It is implemented in TypeScript using the official MCP TypeScript SDK.
How do I update the NWC connection string if my wallet changes?
Update the NWC_CONNECTION_STRING environment variable and restart the MCP server instance.