Skip to main content
Glama
lnfi-network

RGB Lightning Network MCP Server

by lnfi-network

rgb_get_network_info

Retrieve network status and configuration details from the RGB Lightning Node to monitor connectivity and operational parameters.

Instructions

Get network information from the RGB node

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/server.ts:152-165 (registration)
    Registration of the 'rgb_get_network_info' MCP tool, including description, empty input schema, and inline handler that calls the RGB client's getNetworkInfo method and returns formatted JSON or error.
    server.tool( 'rgb_get_network_info', 'Get network information from the RGB node', {}, async ({}) => { try { const networkInfo = await rgbClient.getNetworkInfo(); return { content: [{ type: 'text', text: JSON.stringify(networkInfo, null, 2) }] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: `Error: ${errorMessage}` }], isError: true }; } } );
  • The inline handler function executes the tool logic by fetching network information via rgbClient and responding with JSON.
    server.tool( 'rgb_get_network_info', 'Get network information from the RGB node', {}, async ({}) => { try { const networkInfo = await rgbClient.getNetworkInfo(); return { content: [{ type: 'text', text: JSON.stringify(networkInfo, 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 SDK call to retrieve network information from the RGB node.
    async getNetworkInfo() { return await this.client.node.getNetworkInfo(); }

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