Skip to main content
Glama

NWC MCP Server

by getAlby
get_balance.ts523 B
import { nwc } from "@getalby/sdk"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; export function registerGetBalanceTool( server: McpServer, client: nwc.NWCClient ) { server.tool( "get_balance", "Get the balance of the connected lightning wallet", async () => { const balance = await client.getBalance(); return { content: [ { type: "text", text: JSON.stringify(balance, null, 2), }, ], }; } ); }

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/getAlby/nwc-mcp-server'

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