Skip to main content
Glama
Exchange-RateAPI

@exchangerateapi/mcp-server

Official

@exchangerateapi/mcp-server

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. Sourced from institutional interbank market data.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesISO 4217 currency code, uppercase 3 letters (e.g. 'USD', 'EUR', 'GBP', 'JPY'). For a source/target pair, the returned rate is how much 1 unit of source is worth in target. Fiat only — no crypto, no commodities. Call list_currencies if unsure whether a code is supported.
targetYesISO 4217 currency code, uppercase 3 letters (e.g. 'USD', 'EUR', 'GBP', 'JPY'). For a source/target pair, the returned rate is how much 1 unit of source is worth in target. Fiat only — no crypto, no commodities. Call list_currencies if unsure whether a code is supported.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden, and it delivers: it discloses the return shape as a JSON object with rate/source/target/time, the semantic meaning (1 source = X target), and the important behavioral limitation that crypto, commodities, and arithmetic are not supported. This goes well beyond a basic restatement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with usage triggers, then the return format, then exclusions, then sibling routing. Every sentence adds distinct value, and there is no redundant filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool with no output schema, the description is complete: it explains when to use it, what the output looks like, what it explicitly cannot do, and which sibling tools cover adjacent cases. An agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and both source and target parameters already have detailed schema descriptions including ISO 4217 format, case, examples, rate-direction semantics, fiat-only constraint, and a pointer to list_currencies. The tool description repeats the rate direction but adds little that is not already in the schema, so a baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the exact operation: returning the latest mid-market rate for a single fiat-to-fiat pair. It gives concrete user phrasings and explicitly distinguishes itself from sibling tools like get_rates and get_historical_rates. Nothing about the tool's core purpose is ambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states clear when-to-use conditions ('single fiat-to-fiat live exchange rate question'), explicit exclusions (crypto, commodities, arithmetic), and direct alternatives (get_rates for multiple targets, get_historical_rates for past dates/lookbacks). This gives an agent strong routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
periodNoLookback window ending NOW. '1d' returns ~24 hourly points, '7d' returns 7 daily points, '30d' returns 30 daily points, '1y' returns ~52 weekly points. Defaults to '7d' if omitted.7d
sourceYesISO 4217 currency code, uppercase 3 letters (e.g. 'USD', 'EUR', 'GBP', 'JPY'). For a source/target pair, the returned rate is how much 1 unit of source is worth in target. Fiat only — no crypto, no commodities. Call list_currencies if unsure whether a code is supported.
targetYesISO 4217 currency code, uppercase 3 letters (e.g. 'USD', 'EUR', 'GBP', 'JPY'). For a source/target pair, the returned rate is how much 1 unit of source is worth in target. Fiat only — no crypto, no commodities. Call list_currencies if unsure whether a code is supported.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden. It discloses that sampling is fixed per period (1d=hourly, 7d/30d=daily, 1y=weekly), the window always ends NOW, and it provides the return shape. It does not mention rate limits or auth, but for a read-only historical data tool the disclosed behavior is substantial and accurate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the primary use case, followed by the return format, key behavioral constraints, and sibling routing. Every sentence earns its place and there is no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Even without an output schema, the description gives the full return structure, sampling rules, window semantics, and explicit alternative tools. Combined with fully documented parameters, an agent has everything needed to call this tool correctly in the intended scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already describes source, target, and period in detail, including defaults and exact point counts. The description mostly restates the period sampling behavior and adds use-case flavor, but does not add significant new meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific operation ('get historical rates') with a clear resource and scope: fixed-window time-series. It gives concrete example queries and explicitly distinguishes itself from sibling tools, so an agent can tell exactly what this tool does without inspecting others.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states exactly when to use this tool ('fixed-window time-series questions') and when not to: use get_rates for specific past datetimes or custom ranges, and get_exchange_rate for a single live rate. This explicit routing to alternatives leaves no ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
toNoInclusive end of range, ISO 8601 UTC. Must be paired with `from`. Mutually exclusive with `time`.
fromNoInclusive start of range, ISO 8601 UTC (e.g. '2025-01-01T00:00:00Z'). Must be paired with `to`. Mutually exclusive with `time`.
timeNoSingle point-in-time ISO 8601 UTC timestamp (e.g. '2025-03-14T12:00:00Z'). Mutually exclusive with from/to. Omit for the latest rate.
groupNoAggregation bucket when using from/to. 'day' = one rate per day, 'week' = one per ISO week, 'month' = one per calendar month. Omit for raw points.
sourceYesISO 4217 currency code, uppercase 3 letters (e.g. 'USD', 'EUR', 'GBP', 'JPY'). For a source/target pair, the returned rate is how much 1 unit of source is worth in target. Fiat only — no crypto, no commodities. Call list_currencies if unsure whether a code is supported.
targetYesOne or more ISO 4217 codes, comma-separated, no spaces. Examples: 'EUR' (single) or 'EUR,GBP,JPY' (multi). Each target becomes a separate row in the response.

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry behavioral disclosure, and it does: it reveals the response is an array with one row per target×time bucket, defines the shape [{ rate, source, target, time }], and implies the operation is read-only. It does not cover potential rate limits or error behavior, but those are secondary for a straightforward retrieval tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence carries information: use cases, output shape, and routing to siblings. It is front-loaded with the most important selection criteria and contains no filler or repetition of schema text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter tool with no output schema, the description covers the core usage modes, mutual exclusivity of parameters, grouping behavior, and response cardinality. It could also state ordering or time format of returned rows, but enough is present for an agent to call the tool correctly in the main scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents all six parameters at 100% coverage, so the baseline is 3. The description adds meaningful semantics on top: it links the target multiplicity to row count, explains the output row format, and frames parameters in concrete usage scenarios like 'USD vs EUR, GBP, JPY'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('get rates') and enumerates three distinct use cases with concrete examples: multi-target queries, point-in-time rates, and custom date ranges. It also distinguishes itself from siblings by explicitly covering what this tool is for, rather than restating the tool's name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage guidance is explicit and actionable: single live pairs should use get_exchange_rate, and fixed lookback windows should use get_historical_rates. It also references list_currencies for code validation, giving clear when-to-use and when-not-to-use direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations present, the description carries the full burden and does so well: it discloses the exact return shape, includes a count field, states the currency universe (160+ ISO 4217 fiat), notes the exclusion of crypto, and flags that it is cheap to call. This gives the agent a clear behavioral model for invoking it safely.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact, front-loaded with the most important usage instruction ('Call this BEFORE other tools'), and every sentence earns its keep: when to use, return shape, coverage, exclusion, and downstream value. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter read-only tool with no output schema, the description fully compensates by defining the response structure and enumerating coverage. It also answers likely agent questions about validity, symbols, quantity, and relationship to sibling rate tools. Nothing needed for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the description cannot add meaning beyond the schema; baseline 4 applies. It still usefully explains what the returned codes represent and how they relate to other tools, but there is no parameter-specific detail needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the specific resource (supported currencies and their metadata) and the action (list/validate), and clearly differentiates itself from the rate-focused sibling tools. It also adds scope details like '160+ ISO 4217 fiat currencies' and explicitly excludes cryptocurrencies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use triggers ('before other tools... when unsure whether a currency code is supported'), user-phrase examples, and tells the agent to use it to prevent downstream errors in get_exchange_rate, get_rates, and get_historical_rates. It also states what it does NOT cover (cryptocurrencies), leaving no ambiguity about its role versus siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.2
    • First observedget_exchange_rate
    • First observedget_historical_rates
    • First observedget_rates
    • First observedlist_currencies

TDQS

A4.7/5.0
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

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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
    81
    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
    127
    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
    -

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/Exchange-RateAPI/mcp-server'

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