Skip to main content
Glama
lnfi-network

RGB Lightning Network MCP Server

by lnfi-network

rgb_list_transactions

Retrieve a list of on-chain Bitcoin transactions to track payment history and monitor network activity through the RGB Lightning Network MCP Server.

Instructions

List on-chain transactions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/server.ts:137-150 (registration)
    Registration of the 'rgb_list_transactions' MCP tool with empty input schema and inline handler that lists on-chain transactions using rgbClient.listTransactions() and returns formatted JSON or error.
    server.tool(
      'rgb_list_transactions',
      'List on-chain transactions',
      {},
      async ({}) => {
        try {
          const transactions = await rgbClient.listTransactions();
          return { content: [{ type: 'text', text: JSON.stringify(transactions, null, 2) }] };
        } catch (error) {
          const errorMessage = error instanceof Error ? error.message : String(error);
          return { content: [{ type: 'text', text: `Error: ${errorMessage}` }], isError: true };
        }
      }
    );
  • Inline handler function executing the tool logic: calls rgbClient.listTransactions(), stringifies result as text content, handles errors.
    async ({}) => {
      try {
        const transactions = await rgbClient.listTransactions();
        return { content: [{ type: 'text', text: JSON.stringify(transactions, null, 2) }] };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return { content: [{ type: 'text', text: `Error: ${errorMessage}` }], isError: true };
      }
    }
  • Supporting method in RGBApiClientWrapper class that wraps and calls the underlying SDK client.onchain.listTransactions() method.
    async listTransactions() {
      return await this.client.onchain.listTransactions();
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lnfi-network/rgb-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server