Alby Bitcoin Payments 扩展
本教程介绍如何将 Alby Bitcoin Payments MCP 服务器 添加为 goose 扩展,以便与 Lightning 钱包交互、收付款、列出交易、把法币金额换算为 sats、向 Lightning 地址请求发票,以及与付费 MCP 工具交互(例如用 PaidMCP 构建的工具)。
- goose Desktop
- goose CLI
命令
npx -y @getalby/mcp
环境变量
NWC_CONNECTION_STRING: nostr+walletconnect://...
配置
运行此命令需要在系统上安装 Node.js,因为它使用 npx。
或者你可以使用 Alby 托管的 MCP(见下方远程选项)。
- goose Desktop
- goose CLI
- 本地
- 远程
- Launch the installer
- Click
Yesto confirm the installation - 从你的 Lightning 钱包获取 NWC 连接密钥(nostr+walletconnect://...),并粘贴到 “NWC Connection Secret” 字段
- Click
Add Extension - Click the button in the top-left to open the sidebar
- Navigate to the chat
- Launch the installer
- Click
Yesto confirm the installation - 从你的 Lightning 钱包获取 NWC 连接密钥,并将其作为 Bearer 令牌粘贴(Bearer nostr+walletconnect://...)
- Click
Add Extension - Click the button in the top-left to open the sidebar
- Navigate to the chat
- 本地
- 远程
- Run the
configurecommand:
goose configure
- Choose to add a
Command-line Extension.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◆ What type of extension would you like to add?
│ ○ Built-in Extension
│ ● Command-line Extension (Run a local command or script)
│ ○ Remote Extension (Streamable HTTP)
└
- Give your extension a name.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◆ What would you like to call this extension?
│ Alby
└
- Enter the command to run when this extension is used.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ Alby
│
◆ What command should be run?
│ npx -y @getalby/mcp
└
- Enter the number of seconds goose should wait for actions to complete before timing out. Default is
300seconds.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ Alby
│
◇ What command should be run?
│ npx -y @getalby/mcp
│
◆ Please set the timeout for this tool (in secs):
│ 300
└
- Enter a description for this extension.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ Alby
│
◇ What command should be run?
│ npx -y @getalby/mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◆ Enter a description for this extension:
│ 将 goose 连接到你的 Bitcoin Lightning 钱包
└
- Add an environment variable for this extension.
nostr+walletconnect://...)并粘贴到此处。┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ Alby
│
◇ What command should be run?
│ npx -y @getalby/mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◇ Enter a description for this extension:
│ 将 goose 连接到你的 Bitcoin Lightning 钱包
│
◆ Would you like to add environment variables?
│ Yes
│
◇ Environment variable name:
│ NWC_CONNECTION_STRING
│
◇ Environment variable value:
│ ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
│
◇ Add another environment variable?
│ No
│
└ Added Alby extension
- Run the
configurecommand:
goose configure
- Choose to add a
Remote Extension (Streamable HTTP).
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◆ What type of extension would you like to add?
│ ○ Built-in Extension
│ ○ Command-line Extension
│ ● Remote Extension (Streamable HTTP) (Connect to a remote extension via MCP Streamable HTTP)
└
- Give your extension a name.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Remote Extension (Streamable HTTP)
│
◆ What would you like to call this extension?
│ Alby
└
- Enter the Streamable HTTP endpoint URI.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Remote Extension (Streamable HTTP)
│
◇ What would you like to call this extension?
│ Alby
│
◆ What is the Streamable HTTP endpoint URI?
│ https://mcp.getalby.com/mcp
└
- Enter the number of seconds goose should wait for actions to complete before timing out. Default is
300seconds.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Remote Extension (Streamable HTTP)
│
◇ What would you like to call this extension?
│ Alby
│
◇ What is the Streamable HTTP endpoint URI?
│ https://mcp.getalby.com/mcp
│
◆ Please set the timeout for this tool (in secs):
│ 300
└
- Enter a description for this extension.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Remote Extension (Streamable HTTP)
│
◇ What would you like to call this extension?
│ Alby
│
◇ What is the Streamable HTTP endpoint URI?
│ https://mcp.getalby.com/mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◆ Enter a description for this extension:
│ 将 goose 连接到你的 Bitcoin Lightning 钱包
└
- Add a custom header for this extension.
Bearer 令牌粘贴。┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Remote Extension (Streamable HTTP)
│
◇ What would you like to call this extension?
│ Alby
│
◇ What is the Streamable HTTP endpoint URI?
│ https://mcp.getalby.com/mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◇ Enter a description for this extension:
│ 将 goose 连接到你的 Bitcoin Lightning 钱包
│
◆ Would you like to add custom headers?
│ Yes
│
◇ Header name:
│ Authorization
│
◇ Header value:
│ Bearer nostr+walletconnect://...
│
◇ Add another header?
│ No
│
└ Added Alby extension
使用示例
使用内置的 memory 扩展保存联系人。例如:“我朋友 Rene 的 Lightning 地址是 reneaaron@getalby.com。请把它保存到你的记忆里。”
goose 提示词
向 Rene 支付 1 美元,附言 “Hi Rene, it's Roland. I'm making a goose tutorial!”
goose 输出
工具调用
─── fiat_to_sats | alby ──────────────────────────
fiat_amount: 1
fiat_currency: USD
─── request_invoice | alby ──────────────────────────
amount_in_sats: 935
description: ...
lightning_address: reneaaron@getalby.com
─── pay_invoice | alby ──────────────────────────
invoice: ...
✅ 支付成功!
我已成功向 Rene 的 reneaaron@getalby.com 发送 1 美元(935 sats),附言为:“Hi Rene, it's Roland. I'm making a goose tutorial!”
交易详情:
- 金额:935 sats(1 美元)
- 手续费:3 sats
- 总花费:938 sats
- 附言:“Hi Rene, it's Roland. I'm making a goose tutorial!”
- 支付哈希:
cd30642470d81c2e8eb04c9ac95e679c53778537aecdf5554b15288ac42fe129
Rene 会收到确认消息 “Thanks, sats received!”。