Alby Bitcoin Payments MCP Server
Enables Bitcoin Lightning wallet integration with LLMs through Nostr Wallet Connect (NWC). Supports lightning payments, LNURL operations, and L402 authentication for AI-powered bitcoin transactions.
README
Alby Bitcoin Payments MCP Server
Connect a bitcoin lightning wallet to your LLM using Nostr Wallet Connect (NWC).
This MCP server uses the official MCP TypeScript SDK
This MCP server has knowledge of NWC, LNURL and L402 using Alby SDK and Alby Lightning Tools.
<a href="https://glama.ai/mcp/servers/@getAlby/mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@getAlby/mcp/badge" /> </a>
Quick Start
In case you get stuck, see troubleshooting section below.
Use the Alby-Hosted MCP Server
If your agent supports remote MCP servers - 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
Authentication
Both require providing an NWC connection secret as authentication, either as Bearer authentication (preferred) or via the nwc query parameter.
Bearer Auth
Example: Authorization: Bearer nostr+walletconnect://...
If your agent UI supports bearer auth, just paste the connection secret into the bearer auth field.
Query Parameter
If your agent doesn't support bearer auth, you can pass the NWC connection secret as a query parameter.
Example: https://mcp.getalby.com/sse?nwc=ENCODED_CONNECTION_SECRET or https://mcp.getalby.com/mcp?nwc=ENCODED_CONNECTION_SECRET
To get ENCODED_CONNECTION_SECRET, open browser devtools (right click -> inspect) and enter this in the console, with your own NWC connection secret set:
encodeURIComponent("nostr+walletconnect://...");
In case there is a message asking for confirmation for pasting, follow the instructions, and then enter the above command again.
Once the command has run, copy the output and replace ENCODED_CONNECTION_SECRET. It will look like this: nostr%2Bwalletconnect%3A%2F%2F...
Add to Claude Web or Claude Desktop
Use the remote Alby MCP server
Currently, at least a Claude Pro subscription is required to be able to connect to remote MCP servers.
- Go to Settings -> Integrations
- Click on "Add Integration"
- Call it
alby - What is the endpoint URI:
https://mcp.getalby.com/mcp?nwc=ENCODED_NWC_URL(see above for instructions)
Client-side
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"nwc": {
"command": "npx",
"args": ["-y", "@getalby/mcp"],
"env": {
"NWC_CONNECTION_STRING": "YOUR NWC CONNECTION STRING HERE"
}
}
}
}
Add to Goose Desktop
- Open Goose Desktop
- Go To Settings -> Advanced Settings
- Click on "Add custom Extension"
- Call it
alby, and change the type toHTTP Streamable - What is the SSE endpoint URI:
https://mcp.getalby.com/mcp - Timeout: 30
- Description: no
- environment variables: no
Add to Goose CLI
Use the Alby MCP server
- Type
goose configure - Add extension -> Remote Extension (HTTP Streamable)
- Call it
alby - What is the HTTP Streamable endpoint URI:
https://mcp.getalby.com/mcp - Timeout: 30
- Description: no
- environment variables: no
- add custom headers: yes
- header name:
Authorization - header value:
Bearer nostr+walletconnect://...(replace with your connection secret)
Client-side
- Type
goose configure - Add extension -> Command Line Extension
- Call it
alby - What command should be run:
npx -y @getalby/mcp - Timeout: 30
- Description: no
- environment variables: yes
- environment variable name:
NWC_CONNECTION_STRING - 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/mcp"],
"env": {
"NWC_CONNECTION_STRING": "nostr+walletconnect://..."
},
"disabled": false,
"autoApprove": []
}
Add to Claude Code
Use the Alby MCP server
claude mcp add --transport http alby https://mcp.getalby.com/mcp --header "Authorization: Bearer nostr+walletconnect://..."
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.
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/mcp
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
Add to Windsurf
Use the remote Alby MCP server
- Download and open your Windsurf Editor
- Click on "Windsurf - Settings" in the toolbar at the bottom -> "Advanced Settings" -> "Cascade" -> Plugins (MCP Servers): Click on "Manage plugins" -> "View raw config" -> you'll see your "mcp_config.json"
- Paste this to your mcp_config.json:
{
"mcpServers": {
"alby": {
"serverUrl": "https://mcp.getalby.com/sse?nwc=ENCODED_NWC_URL"
}
}
}
- Replace "ENCODED_NWC_URL" as descripted above. Click "Save" and restart the Windsurf editor.
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. See the authentication section further above in the README.
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
Troubleshooting
Model Usage
Make sure you use a decent model (e.g. Claude Sonnet 3.7) otherwise the MCP server will not work.
Failure to connect to wallet, secret missing
Make sure you copied the entire NWC connection secret, without spaces
Contact Alby Support
Visit support.getalby.com and we're happy to help you get the MCP server working.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。