lnlink-mcp-server

lnfi-network/lnlink-mcp-server

3.2

If you are the rightful owner of lnlink-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

LnLink MCP Node Service is a Model Context Protocol server designed to interact with LnLink nodes using the Nostr protocol, facilitating management of Lightning Network and RGB Protocol functionalities.

LnLink MCP Node Service

This is a Model Context Protocol (MCP) Node Service designed to facilitate interaction with LnLink nodes, which are built upon the Nostr protocol. It provides a robust interface for managing and interacting with both Lightning Network (LND/LITD) and RGB Protocol functionalities.

Features

  • Nostr-based Interaction: Seamlessly connects and interacts with LnLink nodes leveraging the Nostr protocol.
  • Comprehensive Lightning Network Management: Provides tools for LND/LITD operations, including:
    • Node status and information queries
    • Wallet management (initialization, unlocking, balance checks, address generation)
    • Peer and channel management (listing peers, opening/closing channels, connecting to peers)
    • Invoice creation and payment
  • RGB Protocol Integration: Supports RGB Protocol functionalities for colored assets, including:
    • Service status and information queries
    • Wallet management (initialization, unlocking, balance checks, address generation)
    • UTXO management
    • Peer and channel management
    • Invoice creation and payment for RGB assets
  • Command-Line Interface (CLI) Ready: Designed to be easily executed via npx as a command-line tool.

Installation

  1. Node.js Requirement: Ensure you have Node.js installed (version 16 or higher recommended).
  2. Clone Repository:
    git clone https://github.com/lnfi-network/lnlink-mcp-server.git
    cd lnlink-mcp-server
    
  3. Install Dependencies:
    npm install
    

Building the Project

To compile TypeScript files to JavaScript, use the following command:

npm run build

This command will:

  1. Compile TypeScript files using Vite.
  2. Make the built JavaScript files (located in the dist/ directory) executable.

Usage

After building the project, you can start the service:

npm start

Running with npx

This service is designed to be run as an npx command. You will need to provide your Nostr private key and a sendTo public key as arguments.

Example mcpServers configuration for your client (replace placeholders with your actual keys):

{
  "mcpServers": {
    "lnlink": {
      "command": "npx",
      "args": [
        "@lnfi-network/lnlink-mcp-service@latest",
        "YOUR_NOSTR_PRIVATE_KEY_HERE",
        "YOUR_NOSTR_PUBLIC_KEY_TO_SEND_TO_HERE"
      ]
    }
  }
}

Note: For local development and testing, after running npm run build in this project, you can use yarn link (in this project's root) and then yarn link @lnfi-network/lnlink-mcp-service (in your client project's root) to use your local development version directly via npx.

Dependencies

  • @modelcontextprotocol/sdk: Core SDK for Model Context Protocol interactions.
  • @lnfi-network/lnlink-js-sdk: JavaScript SDK for interacting with LnLink nodes.
  • zod: TypeScript-first schema validation library.
  • vite: Next generation frontend tooling, used for building this service.