MCPSERV.CLUB
getAlby

Alby Bitcoin Payments MCP Server

MCP Server

Integrate Lightning wallets with LLMs via Nostr Wallet Connect

Active(70)
33stars
1views
Updated 23 days ago

About

This MCP server enables agents to connect a Bitcoin Lightning wallet using Nostr Wallet Connect, supporting LNURL and L402 protocols through Alby SDK. It offers both SSE and HTTP Streamable endpoints for remote integration.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Alby MCP Server Badge

Overview

The Alby Bitcoin Payments MCP Server bridges the gap between AI assistants and the Lightning Network by enabling secure, on‑chain transactions through Nostr Wallet Connect (NWC). For developers building AI workflows that require real‑time, low‑latency payments—such as micro‑transactions for content access or tipping—the server offers a straightforward way to embed Bitcoin payments directly into conversational agents. By exposing NWC, LNURL, and L402 capabilities via a single MCP endpoint, it eliminates the need to write custom wallet integrations or manage private keys within the assistant’s environment.

What It Solves

Traditional AI assistants lack native support for cryptocurrency payments, forcing developers to rely on external payment gateways or manual wallet handling. This can introduce security risks and complicate user experience. The Alby server abstracts these complexities: it authenticates using a NWC connection secret, manages the Lightning channel state internally, and handles payment routing. Developers can therefore focus on crafting prompts and business logic while the server takes care of wallet management, invoice generation, and payment verification.

Core Features

  • NWC Integration – Uses the Nostr Wallet Connect protocol to securely link an external Lightning wallet, allowing the assistant to sign invoices without exposing private keys.
  • LNURL & L402 Support – Implements the Lightning Network’s universal authentication and payment protocols, enabling seamless “pay‑to‑access” flows for web services or content platforms.
  • Alby SDK & Lightning Tools – Leverages Alby’s JavaScript SDK and Lightning tools for robust wallet operations, including invoice creation, payment monitoring, and channel health checks.
  • Dual Transport Modes – Supports both Server‑Sent Events (SSE) and HTTP streamable endpoints, giving clients flexibility to choose the most compatible transport for their platform.
  • Bearer Authentication – Simplifies secure access by allowing agents to pass the NWC secret as a bearer token, ensuring that only authorized clients can trigger payments.

Use Cases

  • Micro‑Payments for Content – Enable AI assistants to charge users a few satoshis per article or chat session, with instant settlement on the Lightning Network.
  • Tipping & Donations – Let users tip AI agents or services directly through the conversation, with instant confirmation and no intermediaries.
  • Subscription Billing – Automate recurring payments for premium features or data access, leveraging LNURL‑auth to authenticate users.
  • Decentralized Marketplace Integration – Connect AI agents to decentralized marketplaces that require Lightning payments, such as NFT minting or digital goods purchasing.

Integration Flow

  1. Authenticate – The agent supplies the NWC connection secret via bearer token or query parameter.
  2. Invoke Tool – The assistant calls a predefined tool (e.g., ) through the MCP interface.
  3. Process Payment – The server generates a Lightning invoice, signs it with the linked wallet, and returns the payment request.
  4. Confirm Settlement – The server streams payment status back to the assistant, allowing it to proceed once confirmation is received.

Unique Advantages

  • Zero‑Trust Wallet Handling – By delegating wallet operations to the server, sensitive keys never leave the user’s environment.
  • Standardized Protocols – Support for LNURL and L402 ensures compatibility with a wide range of Lightning services.
  • Developer‑Friendly – The server is built on the official MCP TypeScript SDK, offering a familiar API surface for developers already working with MCP.
  • Scalable Deployment – Hosted at , the server can be used as a shared resource or self‑hosted for higher control and privacy.

In summary, the Alby Bitcoin Payments MCP Server empowers AI assistants to perform instant, secure Lightning Network transactions without exposing wallet credentials or adding complex payment logic. It is an essential tool for any developer looking to monetize AI interactions or enable cryptocurrency‑based workflows in a seamless, standards‑compliant manner.