Skip to main content
Glama

Lightning Tools MCP Server

by getAlby
fiat_to_sats.ts638 B
import { fiat } from "@getalby/lightning-tools"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; export function registerFiatToSatsTool(server: McpServer) { server.tool( "fiat_to_sats", "Convert fiat amounts to sats", { currency: z.string().describe("the fiat currency"), amount: z.number().describe("amount in sats"), }, async (params) => { const satoshi = await fiat.getSatoshiValue(params); return { content: [ { type: "text", text: satoshi.toString(), }, ], }; } ); }

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/lightning-tools-mcp-server'

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