Skip to main content
Glama
yantrix-ai

@praveen030686/data-apis-mcp

finance_forex_rate

Retrieve foreign exchange rates between currency pairs with 5-day historical data to support financial analysis and currency conversion decisions.

Instructions

Get foreign exchange rate between two currencies with 5-day history. Costs $0.01 USDC per request via x402 on Base. Format: FROM-TO (e.g., USD-EUR, GBP-JPY, EUR-INR)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairYesCurrency pair in FROM-TO format (e.g., USD-EUR, GBP-JPY)

Implementation Reference

  • The tool "finance_forex_rate" is registered here with its schema and handler implementation. It uses a helper 'apiFetch' to call a finance API endpoint.
    server.registerTool(
      "finance_forex_rate",
      {
        title: "Get Forex Rate",
        description: `Get foreign exchange rate between two currencies with 5-day history.
    Costs $0.01 USDC per request via x402 on Base.
    Format: FROM-TO (e.g., USD-EUR, GBP-JPY, EUR-INR)`,
        inputSchema: {
          pair: z.string().min(5).max(10).describe("Currency pair in FROM-TO format (e.g., USD-EUR, GBP-JPY)"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
      },
      async ({ pair }) => {
        const data = await apiFetch(`${FINANCE_API}/api/v1/forex/rate/${pair.toUpperCase()}`);
        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/yantrix-ai/x402-apis-mcp-server'

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