
使用 Nostr Wallet Connect 和 Model Context Protocol 将比特币闪电钱包连接到你的大型语言模型
概览
另外可以看看Alby CLI里不支持MCP的代理。 使用 Nostr Wallet Connect(NWC)将比特币闪电钱包连接到你的大型语言模型(LLM)。 该MCP服务器使用官方MCP TypeScript SDK 该MCP服务器掌握了使用Alby SDK和Alby Lightning Tools的NWC、LNURL和L402知识。 看看有哪些地方可以使用Alby MCP。 如果你遇到卡住了,请参见下面的故障排除部分。 如果你的代理支持远程MCP服务器——SSE(如N8N)或HTTP可流传输,你可以连接到Alby的MCP服务器。 - SSE:https://mcp.getalby.com/sse - HTTP Streamable:https://mcp.getalby.com/mcp
概述(AI 翻译)
新消息: 也可以查看 Alby CLI 中不支持 MCP 的代理。
使用 Nostr Wallet Connect(NWC)将比特币闪电钱包连接到你的大型语言模型(LLM)。
该MCP服务器使用官方MCP TypeScript SDK
该MCP服务器掌握了使用Alby SDK和Alby Lightning Tools的NWC、LNURL和L402知识。
看看Awesome AI Bitcoin,里面有可以使用Alby MCP的地方。
快速启动
如果你遇到卡住了,请参见下面的故障排除部分。
使用Alby托管的MCP服务器
如果你的代理支持远程MCP服务器——SSE(如N8N)或HTTP可流传输,你可以连接到Alby的MCP服务器。
- SSE:
https://mcp.getalby.com/sse - HTTP 可流式传输:
https://mcp.getalby.com/mcp
认证
两者都要求提供NWC连接秘密作为认证,可以作为Bearer认证(优先)或通过nwc查询参数。
持有者授权
示例:Authorization: Bearer nostr+walletconnect://...
如果你的代理界面支持承载认证,只需将连接密钥粘贴到承载认证字段中即可。
查询参数
如果你的代理不支持承载认证,你可以把NWC连接秘密作为查询参数传递给你。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Alby Bitcoin Payments MCP Server
NEW: also checkout Alby CLI for agents that don’t support MCP.
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.
Take a look at Awesome AI Bitcoin for places where you can use the Alby MCP.
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 -> Connectors
- Click on “Add custom connector”
- 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"
}
}
安装
npx -y @getalby/mcp配置
{
"mcpServers": {
"nwc": {
"command": "npx",
"args": ["-y", "@getalby/mcp"],
"env": {
"NWC_CONNECTION_STRING": "YOUR NWC CONNECTION STRING HERE"
}
}
}
}