Alby Bitcoin Payments MCP
This tutorial covers how to add the Alby Bitcoin Payments MCP Server as a Goose extension to interact with your lightning wallet, make and receive payments, list transactions, convert fiat amounts to sats, request invoices from lightning addresses, and interact with paid MCP tools (such as ones built with PaidMCP).
- Goose Desktop
- Goose CLI
Command
npx -y @getalby/mcp
Environment Variable
NWC_CONNECTION_STRING: nostr+walletconnect://...
Configuration
You'll need Node.js installed on your system to run this command, as it uses npx
or you can use the Alby-hosted MCP (see remote options below).
- Goose Desktop
- Goose CLI
- Local
- Remote
- Launch the installer
- Press
Yes
to confirm the installation - Obtain a NWC Connection secret from your lightning wallet (
nostr+walletconnect://...
) and paste it in to the "NWC Connection Secret" field - Click
Add Extension
- Scroll to the top and click
Exit
from the upper left corner
- Launch the installer
- Press
Yes
to confirm the installation - Change the type to "Streamable HTTP"
- Change the endpoint to
https://mcp.getalby.com/mcp
- Add a request header with Header name =
Authorization
and Value:
Bearer nostr+walletconnect://...
- Press the
+Add
button to finish adding the request header - Click
Add Extension
- Scroll to the top and click
Exit
from the upper left corner
- Local
- Remote
- Run the
configure
command:
goose configure
- Choose to add a
Command-line Extension
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◆ What type of extension would you like to add?
│ ○ Built-in Extension
│ ● Command-line Extension (Run a local command or script)
│ ○ Remote Extension
└
- Give your extension a name
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new 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
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new 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 300s
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new 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
│
└
- Choose to add a description. If you select "Yes" here, you will be prompted to enter a description for the extension.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new 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
│
◇ Would you like to add a description?
│ No
│
└
- Obtain a NWC connection secret from your lightning wallet and paste it in.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new 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
│
◇ Would you like to add a description?
│ No
│
◆ 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
configure
command:
goose configure
- Choose to add a
Remote Extension
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◆ What type of extension would you like to add?
│ ○ Built-in Extension
│ ○ Command-line Extension (Run a local command or script)
│ ○ Remote Extension (SSE)
│ ● Remote Extension (Streaming HTTP)
└
- Give your extension a name
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Remote Extension
│
◆ What would you like to call this extension?
│ Alby
└
- Enter the Streaming HTTP endpoint URI
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Remote Extension
│
◇ What would you like to call this extension?
│ Alby
│
◆ What is the Streaming HTTP URI?
│ https://mcp.getalby.com/mcp
└
- Enter the number of seconds Goose should wait for actions to complete before timing out. Default is 300s
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Remote Extension
│
◇ What would you like to call this extension?
│ Alby
│
◇ What is the Streaming HTTP endpoint URI?
│ https://mcp.getalby.com/mcp
│
◆ Please set the timeout for this tool (in secs):
│ 300
│
└
- Choose to add a description. If you select "Yes" here, you will be prompted to enter a description for the extension.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Remote Extension
│
◇ What would you like to call this extension?
│ Alby
│
◇ What is the Streaming HTTP endpoint URI?
│ https://mcp.getalby.com/mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◆ Would you like to add a description?
│ No
│
└
- Add a custom header containing
Bearer YOUR_CONNECTIONSECRET
.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Remote Extension
│
◇ What would you like to call this extension?
│ Alby
│
◇ What is the Streaming HTTP endpoint URI?
│ https://mcp.getalby.com/mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◇ Would you like to add a description?
│ No
│
◆ Would you like to add custom headers?
│ ● Yes / ○ No
│
◆ Header name:
│ Authorization
│
◆ Header name:
│ Bearer nostr+walletconnect://...
│
◆ Add another header?
│ ○ Yes / ● No
└
Example Usage
Claude Sonnet 3.7 was used for this task. A similarly capable model is recommended to ensure the tool is used correctly.
Use the built-in memory extension to save your contacts. e.g. "My friend Rene's lightning address is reneaaron@getalby.com. Please save it to your memory."
Goose Prompt
Pay Rene $1 USD, with message "Hi Rene, it's Roland. I'm making a Goose tutorial!"
Goose Output
Tool Calls
─── 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: ...
✅ Payment Successful!
I've successfully sent $1 USD (935 sats) to Rene at reneaaron@getalby.com
with your message: "Hi Rene, it's Roland. I'm making a Goose tutorial!"
Transaction Details:
- Amount: 935 sats ($1 USD)
- Fees: 3 sats
- Total cost: 938 sats
- Message: "Hi Rene, it's Roland. I'm making a Goose tutorial!"
- Payment hash:
cd30642470d81c2e8eb04c9ac95e679c53778537aecdf5554b15288ac42fe129
Rene will receive the message "Thanks, sats received!" as confirmation of the payment.