Nostr Wallet Connect (Lightning)

by getalby

7 stars
336 downloads
Not rated
GitHub

About

Enables AI interaction with Bitcoin Lightning wallets through Nostr Wallet Connect for checking balances, creating invoices, and managing payments without complex Lightning Network implementation.

Details

Author
getalby
Repository
getAlby/nwc-mcp-server
GitHub stars
7
Downloads
336
Categories
Other, Design, Developer Tools, AI, Knowledge Base, Frontend, Infrastructure

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Nostr Wallet Connect (Lightning)
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @getalby/nwc-mcp-server
    Environment
    • NWC_CONNECTION_STRING YOUR NWC CONNECTION STRING HERE

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

Linux

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

Macos

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

Windows

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

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

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

This MCP server uses theofficial MCP TypeScript SDK

See also theAlby MCP serverwhich includes additional useful tools.

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 asBearerauthentication.

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" } } } }

- Typegoose configure
- Add extension -> Command Line Extension
- Call itnwc
- What command should be run:npx -y @getalby/nwc-mcp-server
- Timeout: 30
- Description: no
- environment variables: yes
- environment variable name:NWC_CONNECTION_STRING
- environment variable value:nostr+walletconnect://...(your NWC connection secret here)

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": [] }

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 theN8N workflowfor a simple example

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

You can install then8n-nodes-mcpcommunity 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:npxarguments:-y @getalby/nwc-mcp-serverenvironmentsNWC_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 theN8N paid chat workflowfor a full example

By default NWC MCP Server runs locally inSTDIOmode.

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

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

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

Copy.env.exampleto.envand update your connection string

Inspect the tools (use/test without an LLM)

Zen7 Payment Agent is the first implementation project of DePA (Decentralized Payment Agent), pioneers next-generation intelligent payment infrastructure.

x402 payment gateway for AI agents — 12 crypto data tools (price, whale activity, gas, TVL, Fear & Greed, Dune queries) paid per-call in USDC on Stellar or Base. No API keys, no subscriptions.

Perform bulk BNB and BEP20 token transfers on the BNB Smart Chain (BSC).

Send CHR transactions using the Chromia Wallet.

Crypto Market Pulse & Base USDC Stats

x402-paid MCP server: live crypto market pulse ($0.001) and Base USDC on-chain stats ($0.005), settled in USDC on Base mainnet.

Crypto Market Pulse & Base USDC Stats (cryptopulse)

Pay-per-call crypto market data on Base via x402 USDC micropayments: BTC/ETH/SOL/USDC prices, Base chain stats, USDC analytics, DNS, JSON repair.

Engagement marketplace on Base, native to the Bankr ecosystem: AI agents and communities fund quests (follows, reposts, replies, quotes, original posts) and verified-X humans complete them, paid per approved action from a non-custodial x402 escrow in USDC, BNKR, or any Bankr-launched token.

An MCP server for accessing useful Bitcoin Lightning tools.

Non-custodial USDC checkout on Solana: agents inspect a checkout and get unsigned transactions to sign locally, settling 99.5% straight to the merchant's own wallet.

Multi-chain x402 payment gateway and DeFi automation MCP server. 161 tools across 39 categories — batch payments, token swaps, bridges, escrow, AI inference, staking, governance, oracles, geospatial, GPU compute, research, and more. Supports Base, Ethereum, and Solana with 10+ additional chains. Integrated into AWS Strands Agents tools and Google ADK Community Toolkit.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.