Skip to main content
Glama
praveen030686

@praveen030686/data-apis-mcp

finance_forex_convert

Convert currency amounts using live forex rates with x402 USDC micropayments on Base.

Instructions

Convert an amount from one currency to another using live forex rates. Costs $0.02 USDC per request via x402 on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesSource currency code (e.g., USD, EUR, GBP)
toYesTarget currency code (e.g., INR, JPY, EUR)
amountYesAmount to convert

Implementation Reference

  • Registration and handler implementation for the finance_forex_convert tool.
    server.registerTool(
      "finance_forex_convert",
      {
        title: "Convert Currency",
        description: `Convert an amount from one currency to another using live forex rates.
    Costs $0.02 USDC per request via x402 on Base.`,
        inputSchema: {
          from: z.string().min(3).max(3).describe("Source currency code (e.g., USD, EUR, GBP)"),
          to: z.string().min(3).max(3).describe("Target currency code (e.g., INR, JPY, EUR)"),
          amount: z.number().positive().describe("Amount to convert"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
      },
      async ({ from, to, amount }) => {
        const data = await apiPost(`${FINANCE_API}/api/v1/forex/convert`, { from, to, amount });
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );

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/praveen030686/x402-apis-mcp-server'

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