Skip to main content
Glama
lnfi-network

RGB Lightning Network MCP Server

by lnfi-network

rgb_generate_address

Create a new on-chain Bitcoin address for receiving RGB assets or Bitcoin through the RGB Lightning Network MCP Server.

Instructions

Generate a new on-chain address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler function for 'rgb_generate_address'. It calls rgbClient.generateAddress() and returns the result as JSON text or an error.
    async ({}) => { try { const address = await rgbClient.generateAddress(); return { content: [{ type: 'text', text: JSON.stringify(address, null, 2) }] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: `Error: ${errorMessage}` }], isError: true }; } }
  • src/server.ts:122-135 (registration)
    Registration of the 'rgb_generate_address' MCP tool with empty input schema and inline handler.
    server.tool( 'rgb_generate_address', 'Generate a new on-chain address', {}, async ({}) => { try { const address = await rgbClient.generateAddress(); return { content: [{ type: 'text', text: JSON.stringify(address, null, 2) }] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: `Error: ${errorMessage}` }], isError: true }; } } );
  • Helper method in RGBApiClientWrapper that wraps the underlying SDK's onchain.getAddress() call.
    async generateAddress() { return await this.client.onchain.getAddress(); }

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