NWC MCP Server

NWC MCP Server

Bridge your Bitcoin Lightning wallet with LLMs using Nostr Wallet Connect.

12
Stars
6
Forks
12
Watchers
0
Issues
NWC MCP Server enables users to connect Bitcoin Lightning wallets to language models through Nostr Wallet Connect (NWC) and NIP-47 protocols. It leverages the official Model Context Protocol (MCP) TypeScript SDK and supports various transport modes such as STDIO, HTTP streamable, and SSE. The solution can be integrated with platforms like N8N, Claude Desktop, Goose, and Cline, and allows authentication and context management using NWC connection secrets. Although now deprecated in favor of Alby MCP, it provides tooling for leveraging Lightning payment workflows within AI agent interactions.

Key Features

Connects Bitcoin Lightning wallets to LLM agents
Supports Nostr Wallet Connect (NWC) and NIP-47 protocols
Implements official MCP TypeScript SDK
Multiple communication modes (STDIO, HTTP, SSE)
Bearer token authentication using NWC secret
Compatibility with N8N, Claude Desktop, Goose, and Cline
Streamable and command-line tool support
Tool inspection and local running options
Open source with example workflows
Environment variable based configuration

Use Cases

Automating Lightning payments within AI chat agents
Adding wallet-based payment tools to custom LLM agents
Integrating secure, programmable transactions into N8N workflows
Connecting language models to Bitcoin Lightning wallets for in-chat tipping
Building payment-enabled AI tools for Nostr-based ecosystems
Providing AI-powered financial services via NIP-47
Supercharging Claude Desktop or Goose with wallet actions
Developing workflow automations requiring wallet authentication
Testing and inspecting payment tools outside of an LLM
Enabling authenticated AI actions tied to real-world wallet operations

README

⚠️ DEPRECATED ⚠️

Please use Alby MCP instead!

This repository has been deprecated in favor of Alby MCP, which includes all the NWC tools along with additional Lightning tools.

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

See also the Alby MCP server which includes additional useful tools.

Quick Start

Use the Alby-Hosted MCP Server

If your agent supports SSE (e.g. N8N) or HTTP Streamable transports, you can connect to Alby's MCP server.

  • SSE: https://mcp.getalby.com/sse
  • HTTP Streamable: https://mcp.getalby.com/mcp

Both require providing an NWC connection secret as Bearer authentication.

Add to Claude Desktop

Add this to your claude_desktop_config.json:

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.

json
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 via SSE

You can use the native N8N MCP Client tool connected to an AI agent. Enter your SSE endpoint, set authentication to "Bearer" and paste your NWC connection secret.

Tested with OpenRouter + anthropic/claude-3.7-sonnet

See the N8N workflow for a simple example

Add to N8N via STDIO (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.

bash
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

Modes

STDIO

By default NWC MCP Server runs locally in STDIO mode.

HTTP

You can set the following environment variable: MODE=HTTP which will enable Streamable HTTP (http://localhost:3000/mcp) and SSE (http://localhost:3000/sse Note: SSE is deprecated).

HTTP requires bearer authorization, where the token is a wallet's NWC connection secret.

From Source

Prerequisites

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

Installation

bash
yarn install

Building

bash
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

Star History

Star History Chart

Repository Owner

getAlby
getAlby

Organization

Repository Details

Language TypeScript
Default Branch master
Size 56 KB
Contributors 1
MCP Verified Nov 12, 2025

Programming Languages

TypeScript
76.27%
JavaScript
15.12%
Dockerfile
8.61%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Bitcoin & Lightning Network MCP Server

    Bitcoin & Lightning Network MCP Server

    Enable AI models to safely interact with Bitcoin and Lightning Network in a standardized way.

    The Bitcoin & Lightning Network MCP Server implements the Model Context Protocol, allowing AI models to interface with Bitcoin and Lightning Network functionalities such as key generation, address validation, transaction decoding, blockchain queries, and lightning payments. It provides standardized endpoints for AI model integration, including support for Claude Desktop and Goose. The solution supports querying blockchain data, parsing transactions and invoices, and managing cryptographic operations in a secure and extensible manner.

    • 65
    • MCP
    • AbdelStark/bitcoin-mcp
  • Weblate MCP Server

    Weblate MCP Server

    Seamlessly connect AI assistants to Weblate for translation management via the Model Context Protocol.

    Weblate MCP Server enables AI assistants and clients to directly manage Weblate translation projects through the Model Context Protocol (MCP). It integrates with the Weblate REST API, allowing natural language interaction for project and translation management. The tool offers multiple transport options including HTTP, SSE, and STDIO, and is optimized for large language model workflows. Full support for project, component, and translation operations is provided, with a focus on type safety and flexible environment configuration.

    • 9
    • MCP
    • mmntm/weblate-mcp
  • Braintree MCP Server

    Braintree MCP Server

    Enables AI assistants to securely access and manage Braintree payment processing via MCP.

    Braintree MCP Server implements the Model Context Protocol (MCP) to provide AI assistants with structured, direct access to PayPal Braintree's payment services. It supports both STDIO and Server-Sent Events (SSE) transports, facilitating integration with AI clients and standalone web-based deployments. The server allows execution of GraphQL queries against Braintree, supports multi-client access, and handles authentication through environment-based configuration. Designed for secure, extensible, and automated payment operations in AI-driven workflows.

    • 3
    • MCP
    • QuentinCody/braintree-mcp-server
  • Blockchain MCP powered by Tatum

    Blockchain MCP powered by Tatum

    MCP server for universal blockchain data access across 130+ networks.

    Blockchain MCP powered by Tatum is a Model Context Protocol (MCP) server that enables large language models (LLMs) to read and write blockchain data across more than 130 networks. It provides unified access to both the Tatum Blockchain Data API and direct RPC gateways, supporting tools for retrieving balances, portfolios, transactions, and more. The platform is designed for seamless integration via API key and configurable MCP client setups, making it easier to build blockchain-aware AI solutions. Comprehensive documentation and extensive network compatibility facilitate robust development and scalability.

    • 12
    • MCP
    • tatumio/blockchain-mcp
  • Whale Tracker MCP Server

    Whale Tracker MCP Server

    Monitor and analyze large cryptocurrency transactions using MCP and Whale Alert API integration.

    Whale Tracker MCP Server implements the Model Context Protocol to provide real-time monitoring and analysis of large-scale cryptocurrency transactions. Built in Python, it integrates seamlessly with the Whale Alert API and exposes tools, resources, and prompt templates to MCP-compatible clients such as Claude Desktop. This solution enables users to fetch recent whale transactions, retrieve detailed information, and leverage contextual data directly within their LLM-powered workflows.

    • 44
    • MCP
    • kukapay/whale-tracker-mcp
  • mcp-server-ledger

    mcp-server-ledger

    Model Context Protocol server for interacting with Ledger CLI via AI assistants.

    mcp-server-ledger provides a standardized Model Context Protocol interface for the Ledger CLI, enabling AI-driven querying and analysis of double-entry accounting data. It exposes key Ledger CLI commands as tools accessible by Large Language Models for financial reporting, budget analysis, and account management. It supports deployment via Docker, Smithery, or 'uv', and requires a valid ledger file and appropriate environment setup.

    • 35
    • MCP
    • minhyeoky/mcp-server-ledger
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results