get_wallet_service_info
Get NWC capabilities, supported encryption and notification types of the connected lightning wallet
Give an assistant a bitcoin lightning wallet, over Nostr Wallet Connect.
LABSCO SUMMARY
The connection secret is the whole authorisation story: whatever spending limits your NWC connection carries are the limits the model has, which is the part worth setting before you paste it anywhere.
An MCP server that connects a lightning wallet to an LLM through Nostr Wallet Connect. Run it locally over stdio with npx -y @getalby/mcp, or point a client at Alby's hosted server — https://mcp.getalby.com/mcp for Streamable HTTP, https://mcp.getalby.com/sse for SSE.
Authorization: Bearer nostr+walletconnect://..., or pass the secret URL-encoded as an nwc query parameter for clients with no bearer fieldNWC_CONNECTION_STRING from the environment, and MODE=HTTP to expose Streamable HTTP at http://localhost:3000/mcpyarn inspect to exercise the tools without an LLM in the loopA lightning wallet that supports NWC and its connection secret. Building from source needs Node.js 20+ and Yarn. Connecting Claude to the remote server currently requires at least a Claude Pro subscription. The author notes that a capable model matters here — a weak one will not drive it.
One command plus credentials — npx -y @getalby/mcp, then supply credentials
USE CASES
The wallet is reachable from the same session, so a payment does not mean leaving to open an app.
L402 is one of the protocols the server already understands, so a paywalled API call can be completed rather than abandoned.
n8n connects over SSE with bearer auth, or over stdio through the community MCP node, with the connection secret supplied as an environment variable.
Run the inspector locally against your connection string and call the tools by hand first.
Listed in project code.
get_wallet_service_infoGet NWC capabilities, supported encryption and notification types of the connected lightning wallet
get_infoGet NWC capabilities of the connected lightning wallet, and general information about the wallet and underlying lightning node
make_invoiceCreate a lightning invoice
pay_invoicePay a lightning invoice
get_balanceGet the balance of the connected lightning wallet
lookup_invoiceLook up lightning invoice details from a BOLT-11 invoice or payment hash
list_transactionsList all transactions from the connected wallet with optional filtering by time, type, and limit
fetch_l402Fetch a paid resource protected by L402
fiat_to_satsConvert fiat amounts to sats
parse_invoiceParse a BOLT-11 lightning invoice
request_invoiceRequest an invoice from a lightning address
BEFORE YOU INSTALL
11 tools registered in the project's code.
INSTALLATION
npx -y @getalby/mcphttps://mcp.getalby.com/sse?nwc=ENCODED_NWC_URLAdd this hosted endpoint to your MCP client using the credentials listed under Requirements.
Settings -> Connectors -> Add custom connector, endpoint URI:
https://mcp.getalby.com/mcp?nwc=ENCODED_NWC_URL{
"mcpServers": {
"nwc": {
"command": "npx",
"args": [
"-y",
"@getalby/mcp"
],
"env": {
"NWC_CONNECTION_STRING": "<YOUR_NWC_CONNECTION_STRING>"
}
}
}
}claude mcp add --transport http alby https://mcp.getalby.com/mcp --header "Authorization: Bearer <YOUR_NWC_CONNECTION_STRING>"Settings -> Advanced Settings -> Add custom Extension, type HTTP Streamable, URI https://mcp.getalby.com/mcp
goose configureAdd extension → Remote Extension (HTTP Streamable), and call it alby
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 followed by your NWC connection secret (it starts with nostr+walletconnect://)
goose configureAdd extension → Command Line Extension, and call it alby
Command to run: npx -y @getalby/mcp — Timeout: 30, Description: no
Environment variables: yes — name NWC_CONNECTION_STRING, value <YOUR_NWC_CONNECTION_STRING> (your NWC connection secret)
{
"mcpServers": {
"nwc": {
"command": "npx",
"args": [
"-y",
"@getalby/mcp"
],
"env": {
"NWC_CONNECTION_STRING": "<YOUR_NWC_CONNECTION_STRING>"
},
"disabled": false,
"autoApprove": []
}
}
}Add the native n8n MCP Client tool to an AI agent node
Enter the SSE endpoint https://mcp.getalby.com/sse, set authentication to "Bearer", and paste your NWC connection secret
Install the n8n-nodes-mcp community node (https://github.com/nerding-io/n8n-nodes-mcp) and start n8n with tools enabled: N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true npx n8n
In a blank workflow add an AI agent node, configure your model, and add the "MCP Client" tool
Give it a credential with Command Line (STDIO) selected — command npx, arguments -y @getalby/mcp, environment NWC_CONNECTION_STRING=nostr+walletconnect://<YOUR_KEY> (type the whole line in a text editor and paste it, since the field cannot show plain text)
{
"mcpServers": {
"alby": {
"serverUrl": "https://mcp.getalby.com/sse?nwc=ENCODED_NWC_URL"
}
}
}