Skip to main content
Glama

NWC MCP Server

by getAlby
lookup_invoice.ts912 B
import { nwc } from "@getalby/sdk"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; export function registerLookupInvoiceTool( server: McpServer, client: nwc.NWCClient ) { server.tool( "lookup_invoice", "Look up lightning invoice details from a BOLT-11 invoice or payment hash", { payment_hash: z .string() .describe("The payment hash of the invoice to look up") .nullish(), invoice: z.string().describe("The BOLT 11 invoice to look up").nullish(), }, async (params) => { const result = await client.lookupInvoice({ invoice: params.invoice || undefined, payment_hash: params.payment_hash || undefined, }); return { content: [ { type: "text", text: JSON.stringify(result, 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