nwc
Connect a bitcoin lightning wallet to your LLM using Nostr Wallet Connect and Model Context Protocol
claude mcp add --transport stdio getalby-nwc-mcp-server npx -y @getalby/nwc-mcp-server \ --env NWC_CONNECTION_STRING="YOUR NWC CONNECTION STRING HERE"
How to use
The NWC MCP Server provides a bridge between your agent and a Nostr Wallet Connect (NWC) compatible lightning wallet. It makes the wallet available to your LLM-driven workflows as a set of tools you can test and invoke without embedding wallet logic directly into your agent. This server supports both STDIO and HTTP/SSE/streamable endpoints depending on configuration, and it relies on an NWC connection secret for authentication. You can run the server locally or connect to it via the Alby-hosted MCP server for SSE or HTTP streaming capabilities. The tools exposed by the server allow you to interact with your NWC wallet to perform actions such as generating invoices, paying requests, or querying balance through the MCP tool interface. Note that this repository has been deprecated in favor of the broader Alby MCP package, which bundles NWC tools with additional Lightning tooling.
How to install
Prerequisites:
- Node.js 20+
- Yarn
- An NWC connection string/secret from a compatible NWC wallet
Install locally from source or via npx:
Step 1: Install dependencies (if running from source)
yarn install
Step 2: Build (if the project requires a build step)
yarn build
Step 3: Configure your connection string
- Copy .env.example to .env
- Update your NWC_CONNECTION_STRING with your nostr+walletconnect://... secret
cp .env.example .env
Step 4: Run the server (example using npx with the published package)
npx -y @getalby/nwc-mcp-server
Optional:
- For HTTP/STREAMABLE mode, set MODE=HTTP in your environment to enable http://localhost:3000/mcp and the SSE endpoint. Bearer authorization is required using the NWC connection secret.
- Inspect tools before using them with yarn inspect (if provided by the package).
For source installations, you can also build and run locally using your preferred tooling, following the repository’s standard Node.js workflow.
Additional notes
Tips and caveats:
- This MCP server is deprecated in favor of Alby MCP; consider upgrading to the latest Alby MCP package for continued support and additional tools.
- Ensure your NWC_CONNECTION_STRING is kept secret and not committed to source control.
- If using HTTP mode, remember to include the Bearer token for authentication when connecting SSE/HTTP endpoints.
- The server exposes tools from the NWC ecosystem; verify compatibility with your agent’s tool invocation interface (SSE vs STDIO).
- If you encounter issues, consult the examples (e.g., n8n SSE/STDIO workflows) and ensure you are using a supported Node.js version and the correct package name for npx execution.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud