Skip to main content
Glama
@exchangerateapi/mcp-server

@exchangerateapi/mcp-server

Official

@exchangerateapi/mcp-server

Exchange Rate API is now AllRatesToday. This package keeps working against exchange-rateapi.com, but it is no longer updated. For new projects use @allratestoday/mcp-server (or the hosted endpoint https://allratestoday.com/api/mcp) — the same real-time API plus official rates from 121 central banks. Docs: allratestoday.com/docs.

Powered by Exchange-RateAPI

npm license

MCP server that gives AI coding tools (Claude Code, Cursor, Claude Desktop, Windsurf) access to real-time and historical currency exchange rates from Exchange Rate API.

160+ currencies. Mid-market rates updated every 60 seconds, no retail spread.

Quick Setup

1. Get a Free API Key

Sign up at exchange-rateapi.com/register — free tier, no credit card.

2. Add to Your MCP Client

Claude Code (~/.claude/settings.json):

{
  "mcpServers": {
    "exchange-rateapi": {
      "command": "npx",
      "args": ["-y", "@exchangerateapi/mcp-server"],
      "env": { "EXCHANGE_RATE_API_KEY": "era_live_..." }
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "exchange-rateapi": {
      "command": "npx",
      "args": ["-y", "@exchangerateapi/mcp-server"],
      "env": { "EXCHANGE_RATE_API_KEY": "era_live_..." }
    }
  }
}

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "exchange-rateapi": {
      "command": "npx",
      "args": ["-y", "@exchangerateapi/mcp-server"],
      "env": { "EXCHANGE_RATE_API_KEY": "era_live_..." }
    }
  }
}

Windsurf (~/.windsurf/mcp.json):

{
  "mcpServers": {
    "exchange-rateapi": {
      "command": "npx",
      "args": ["-y", "@exchangerateapi/mcp-server"],
      "env": { "EXCHANGE_RATE_API_KEY": "era_live_..." }
    }
  }
}

Related MCP server: UniRate MCP

Tools

Tool

Description

get_exchange_rate

Get the current mid-market rate between two currencies

get_historical_rates

Get historical data for a pair over 1d, 7d, 30d, or 1y

get_rates

Multi-target rates with date ranges and grouping (day/week/month)

list_currencies

List all 160+ supported currencies

Example Prompts

Once configured, ask your AI assistant:

  • "What's the current USD to EUR exchange rate?"

  • "Show me GBP/JPY rates for the last 30 days"

  • "Convert 5000 USD to EUR, GBP, and JPY"

  • "List all supported currencies"

  • "What's the monthly average EUR/USD rate for 2026?"

Environment Variables

Variable

Required

Description

EXCHANGE_RATE_API_KEY

Yes

Your API key from exchange-rateapi.com

EXCHANGE_RATE_BASE_URL

No

Override API base URL (default: https://exchange-rateapi.com/api)

License

MIT

Available Tools

4 tools
get_exchange_rateA

Use this when the user asks 'what is X in Y?', 'convert X to Y', 'current rate of EUR/USD', or any single fiat-to-fiat live exchange rate question. Returns the latest mid-market rate as a JSON object like { rate: 0.9234, source, target, time } meaning 1 source = 0.9234 target. Does NOT support cryptocurrencies, commodities (XAU/XAG), or arithmetic on amounts. For multiple targets in one call use get_rates; for a past date or fixed lookback (7d/30d/1y) use get_historical_rates.

Inputs: source (required), target (required).

get_historical_ratesA

Use this for fixed-window time-series questions like 'how has EUR/USD moved this week', 'show me the last month of GBP/JPY', or 'chart 1-year history of AUD/USD'. Returns { source, target, period, data: [{ date, rate, timestamp }, ...] } — sampling is fixed per period (1d=hourly, 7d/30d=daily, 1y=weekly) and the window always ends NOW. For a specific past datetime or custom date range use get_rates with time or from/to. For a single live rate use get_exchange_rate.

Inputs: source (required), target (required), period.

get_ratesA

Use this for (a) one source against multiple targets in a single call ('USD vs EUR, GBP, JPY'), (b) the rate at a specific past datetime ('EUR/USD on 2025-03-14T12:00Z'), or (c) a custom date range optionally bucketed by day/week/month. Returns an array [{ rate, source, target, time }, ...] — one row per target × time bucket. For a single live pair use get_exchange_rate. For fixed lookback windows (1d/7d/30d/1y ending now) use get_historical_rates.

Inputs: source (required), target (required), to, from, +2 more.

list_currenciesA

Call this BEFORE other tools when you are unsure whether a currency code is supported, or when the user asks 'what currencies do you support?', 'is X a valid currency?', or 'what is the symbol for X?'. Returns { currencies: [{ code: 'USD', name: 'US Dollar', symbol: '$' }, ...], count } covering 160+ ISO 4217 fiat currencies. Does NOT include cryptocurrencies. Cheap to call — use it to validate user input and prevent downstream errors in get_exchange_rate / get_rates / get_historical_rates.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.7/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a clearly distinct query shape: single live rate, fixed historical windows, multi-target/custom ranges, and currency metadata. The descriptions cross-reference each other to explicitly route potentially ambiguous cases, so an agent should not confuse them.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case: get_exchange_rate, get_historical_rates, get_rates, list_currencies. There are no mixed conventions, vague verbs, or stylistic outliers.

    Tool Count5/5

    Four tools is well-scoped for an exchange-rate server: currency discovery, a live single rate, historical windows, and flexible multi-target/custom-range queries. Each tool earns its place with no redundancy or bloat.

    Completeness5/5

    Within the stated fiat-only scope, the surface covers lookup, live rates, historical time series, multi-target requests, and custom date ranges. The list_currencies tool also provides a validation path that prevents dead-end calls to the rate tools.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides real-time and historical foreign exchange rates for 31+ currencies, enabling currency conversion, historical rate lookups, and time series analysis using data from the Frankfurter API.
      -
    • A
      license
      A
      quality
      C
      maintenance
      Currency conversion and exchange rates for AI assistants. 170+ currencies, historical data back to 1999.
      4
      62 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Provides real-time foreign-exchange rates, historical data, and multi-currency lookups to MCP-compatible AI coding assistants like Claude Code and Cursor.
      4
      802 npm
      MIT
    • F
      license
      C
      quality
      D
      maintenance
      Enables real-time currency exchange rate queries between any two currencies using ExchangeRate API, with automatic triggering by AI models through the MCP protocol.
      1
      1
      -