Real-time currency exchange rates, historical data, and multi-currency lookups for MCP clients.
This Model Context Protocol (MCP) server provides real-time currency exchange rates, historical data, and multi-currency lookups to MCP-compatible clients. It retrieves rates from the AllRatesToday API, sourced from institutional interbank market data, for use in Claude Code, Cursor, Claude Desktop, Windsurf, and other MCP clients.
๐ ๏ธ Key Features
Real-time exchange rates
Historical series data
Multi-currency lookup support
Data source: AllRatesToday API (institutional interbank market data)
๐ Use Cases
Fetch current FX rates for applications
Retrieve historical exchange rate data for analysis
Compare or look up multiple currencies in one request
โก Developer Benefits
Compatible with MCP clients (e.g., Claude Code, Cursor, Claude Desktop, Windsurf)
Standardized access to real-time and historical currency data via MCP
Supported by an external currency API: AllRatesToday
โ ๏ธ Limitations
Limited to currency rates and lookups provided by the AllRatesToday API
Realtime Exchange Rate MCP Server โ @allratestoday/mcp-server
A Model Context Protocol server that lets Claude Code, Cursor, Claude Desktop, Windsurf, and any other MCP-compatible client fetch real-time currency rates, historical series, and multi-currency lookups from the AllRatesToday API. Rates are mid-market, with no retail spread.
๐ฑ Live mid-market rates โ current rate for any supported ISO 4217 pair
๐ Historical series built in โ 1d (hourly), 7d (daily), 30d (daily), 1y (weekly)
๐งฐ Eight focused tools โ get_exchange_rate, get_historical_rates, get_rates_authenticated, list_currencies, list_central_banks, get_official_rates, get_reference_rate, request_trial_key; a small surface the model uses correctly (the hosted endpoint https://allratestoday.com/api/mcp lists 11: these plus get_official_rate_history, compare_official_rates, get_publication_calendar)
๐๏ธ Official rates โ the latest table from 121 central banks + 3 tax authorities, keyless
๐ Works everywhere MCP does โ stdio transport, MCP SDK 1.x; Claude Code, Cursor, Claude Desktop, Windsurf, or any generic stdio host
๐ Works with no API key โ starts in keyless mode and never exits for a missing key; keyless answers say which official table they came from and its rate_date
๐ก๏ธ Honest errors โ relays upstream API errors instead of guessing, and tools that need a key say how to get one
๐ Nothing leaks โ only the request parameters and your API key ever reach allratestoday.com; never conversation context
๐ฆ Two runtime dependencies โ @modelcontextprotocol/sdk and zod; Node.js โฅ 18
With a key, get_exchange_rate, get_historical_rates and get_rates_authenticated return a mid-market rate โ the right number for price display and conversion. It is not the official rate a tax authority or auditor may require; for those use get_official_rates (latest published table of any of 121 central banks + 3 tax authorities, keyless), or see the AllRatesToday docs.
๐ Get your API key
The key is optional. Without ALLRATES_API_KEY the server starts in keyless mode:
Tool
Keyless
What you get
get_exchange_rate
โ
An official central-bank rate: the ECB table first, else the central bank that issues the target or source currency (e.g. USD/GBP โ Bank of England). Only pairs one bank publishes, or their inverses (flagged derived: true), work keyless
list_currencies
โ
All 160+ supported codes
list_central_banks
โ
All 121 central banks + 3 tax authorities with codes and latest publication date
get_official_rates
โ
Latest official table (or one pair); a dated table needs a paid-plan key
get_reference_rate
โ
Latest Daily Reference Rate table (16:00 London); a past date needs a paid-plan key
request_trial_key
โ
Self-issues a 100-call, 7-day key with no account and adopts it for the session
get_historical_rates
๐
Paid-plan key (free and trial keys get 403)
get_rates_authenticated
๐
Free key for latest rates; time (a past datetime) needs a paid plan
A free key unlocks real-time mid-market rates for 160+ currencies and multi-target lookups. The free tier is 300 requests, lifetime โ it never resets. All history and dated rates โ mid-market history, point-in-time lookups, dated official and reference-rate tables โ need a paid plan; free and trial keys get 403 historical_requires_paid_plan (pricing).
Copy your key from the dashboard (format: art_live_xxxxx)
Use it as ALLRATES_API_KEY in the configs below
If the key is missing, the server prints a short keyless-mode summary on stderr and keeps running โ it never exits for a missing key.
๐ฆ Installation
The simplest install is zero-install via npx, which is what every config below uses:
bash
# Run without installing (recommended)
npx -y @allratestoday/mcp-server
bash
# Or install globally
npm install -g @allratestoday/mcp-server
allratestoday-mcp
Both commands launch the stdio MCP server and wait for a client to connect โ they are not meant to be run interactively from your shell; your MCP client launches them as a subprocess.
๐ Quick start
Each client reads MCP servers from a different config file. Pick yours below.
Claude Code
The fastest path uses the built-in CLI:
bash
claude mcp add allratestoday -- npx -y @allratestoday/mcp-server
claude mcp env allratestoday ALLRATES_API_KEY=art_live_xxxxx
Restart Claude Code, then ask: "What's the current USD to EUR rate?"
Cursor
Edit ~/.cursor/mcp.json (or .cursor/mcp.json inside your project for a project-scoped server):
Fully quit and reopen Claude Desktop (Cmd+Q on macOS, right-click tray icon โ Exit on Windows). Closing the window alone keeps the old config loaded.
Windsurf
Edit ~/.codeium/windsurf/mcp_config.json with the same mcpServers block as above, then restart Windsurf.
Generic stdio MCP client
Any MCP host that supports stdio transport works. The launch command is:
bash
npx -y @allratestoday/mcp-server
โฆoptionally with ALLRATES_API_KEY set in the subprocess environment. The same block, ready to copy, also lives in .mcp.json in this repo; smithery.yaml describes the same stdio launch for Smithery, and server.json is the MCP registry manifest.
Verify it works
Server starts โ open the client. It starts with or without a key, so a red dot or "failed to connect" means the client could not launch it โ usually npx or Node โฅ 18 (see Troubleshooting).
Tools are listed โ most clients have a "tools" or "MCP" panel showing all eight tools.
A live call returns a number โ ask "What's the current USD to EUR rate?" The assistant should call get_exchange_rate(source: "USD", target: "EUR") and reply with a real rate. If it produces a number without a tool call, the server is not connected.
Official table (or one pair) a named institution published
bank
get_reference_rate
Daily Reference Rate, one fixed mid-market table per business day (16:00 London)
โ
request_trial_key
Self-issue a 100-call, 7-day trial key, no account
โ
Only get_historical_rates and get_rates_authenticated require ALLRATES_API_KEY: a free key covers latest multi-target rates; get_historical_rates and time need a paid plan. Input schemas set additionalProperties: false โ unknown fields are rejected. Full per-tool reference: mcp-server README.
get_exchange_rate
Current mid-market rate between two currencies. Calls GET /rate with a key; keyless it calls GET /open/central-bank/{bank} (ECB first, then the bank issuing the target, then the source currency).
Field
Type
Required
Description
source
string (exactly 3 chars)
yes
ISO 4217 code, e.g. USD
target
string (exactly 3 chars)
yes
ISO 4217 code, e.g. EUR
json
{"source":"USD","target":"EUR"}
Response with a key:
json
{"rate":0.888889,"source":"mid-market"}
Response keyless (USD โ GBP is not in the ECB table, so the Bank of England answers; derived: true because it publishes the inverse):
json
{"rate":0.7598784195,"source":"Bank of England official rate (keyless mode)","bank":"boe","rate_date":"2026-10-14","derived":true,"note":"Keyless mode: this is the Bank of England official rate published on 2026-10-14, not a live mid-market quote. For real-time rates across 160+ currencies set ALLRATES_API_KEY โ free tier at https://allratestoday.com/register."}
get_historical_rates
Time-series data points for a currency pair over a fixed period. Calls GET /historical-rates. Needs an API key on a paid plan (free and trial keys get a 403).
All supported currencies with codes, names, and symbols. Calls GET /v1/symbols, cached 24 h upstream โ cheap to call for validating user input before the other tools.
Every official source โ 121 central banks plus HMRC, the US Treasury and Swiss BAZG โ with the code that get_official_rates takes as bank. Keyless. Calls GET /open/central-banks (or /v1/central-banks with a key).
json
{"sources":[{"code":"ecb","name":"European Central Bank","latest":"2026-10-15","age_days":1,"stale":false,"cadence":"daily"},{"code":"fed","name":"US Federal Reserve (H.10)","latest":"2026-10-09","age_days":7,"stale":false,"cadence":"weekly"},"..."],"stale_count":3,"checked_at":"2026-10-16T12:16:46.232Z"}
get_official_rates
The fixed, citable rate an institution published. Input: bank (required), optional date (YYYY-MM-DD, paid plan โ a free key gets 403 Historical central bank rates require a paid plan), optional source + target for one pair. Keyless for the latest table.
json
{"bank":"ecb","rate_date":"2026-10-15","source":"EUR","target":"USD","rate":1.1208,"rate_type":"reference","derived":false,"method":"published","age_days":1,"stale":false,"cadence":"daily","attribution":{"source":"Official rates published by ECB, served by AllRatesToday","url":"https://allratestoday.com/central-bank-rates-api/ecb/","terms":"Free to use with visible attribution linking to allratestoday.com"}}
๐บ๏ธ Currencies covered
Every currency the AllRatesToday API serves is available through these tools โ call list_currencies for the authoritative live list. Commonly used codes include:
The source and target fields of get_exchange_rate and get_historical_rates are validated as exactly three characters, so pass ISO 4217 codes, not currency names.
โ๏ธ Environment variables
Variable
Default
Required
Purpose
ALLRATES_API_KEY
โ
no
Your API key, sent as a Bearer token in the Authorization header. Unset โ keyless mode; the server never exits for a missing key.
ALLRATES_BASE_URL
https://allratestoday.com/api
no
Override for a self-hosted or staging deployment. Trailing slashes are stripped.
Set these in your MCP client's config (in the env block), not in your shell โ MCP servers are launched as subprocesses with isolated environments.
๐ก๏ธ Error handling
Tool failures come back as an MCP tool result with isError: true. The text is AllRatesToday error (<status>): <message>.
HTTP status
Message
400
The API's error field, else Bad request โ possibly an unknown currency code
401
Invalid AllRatesToday API key
403
HTTP 403 โ <upstream message>, e.g. Historical rates require a paid planโฆ for get_historical_rates or time on a free or trial key, or Historical central bank rates require a paid planโฆ for a dated table
404 (keyless)
No keyless official source covers X/Y. Real-time rates for 160+ currencies need an API key โฆ
429
AllRatesToday API quota exceeded
5xx
HTTP <status> โ <upstream message>
Errors raised locally, before any HTTP call:
Keyless call to get_rates_authenticated (no time) โ โฆ needs an AllRatesToday API key. The free tier covers it โ sign up at https://allratestoday.com/register โฆ
Keyless call to get_historical_rates, or get_rates_authenticated with time โ โฆ needs an AllRatesToday API key on a paid plan โฆ
Keyless call with a date to get_official_rates / get_reference_rate โ โฆ needs an AllRatesToday API key on a paid plan โฆ
Unrecognised tool name โ MCP error -32602: Tool <name> not found
Because these arrive as text, the assistant relays them to the user โ a 429 surfaces as "the API quota has been exceeded."
๐ ๏ธ Troubleshooting
Symptom
Likely cause
Fix
Client shows "MCP server failed to start" or a red dot
Not a missing key (0.5.0+ starts without one) โ usually npx cannot reach the registry, or Node is older than 18
Run npx -y @allratestoday/mcp-server in a shell and read stderr
Every call returns a 401 error
Key malformed, truncated, or revoked
Copy a fresh key from the dashboard
Calls return a 429 error
Quota used up โ the free tier is 300 requests lifetime and never resets
No output means healthy โ stdout is reserved for the MCP protocol; errors print to stderr.
๐ก Notes
Do you store my conversation or query data? No. Only your API key and the request parameters (source, target, period, time, group) are sent to allratestoday.com โ never the model's conversation context.
What happens to my API key? It is only sent as a Bearer token in the Authorization header on requests to the AllRatesToday API. The server does not log it.
Why is the first call slow? Cold start of npx (the first run downloads the package) plus an upstream cache miss.
Can I run this without npm/Node? Not currently โ engines requires Node โฅ 18. If a standalone binary matters to you, open an issue.
Is there a self-hosted option? Point ALLRATES_BASE_URL at your own instance.
Does it work with other clients? Any MCP-compatible host with stdio transport works, and remote-MCP clients can use the hosted endpoint https://allratestoday.com/api/mcp; the four clients above are simply the ones with documented config paths here.
๐ฉโ๐ป Development
The src/ in this repo is an older 0.3.x snapshot. The published package is built from AllRates-Today/mcp-server โ develop there:
bash
git clone https://github.com/AllRates-Today/mcp-server.git
cd mcp-server
npm install
npm run build
ALLRATES_API_KEY=art_live_xxxxx node dist/index.js
npm run build runs tsc; npm run dev watches and rebuilds; npm start runs the compiled server. CI (.github/workflows/ci.yml) runs npm ci && npm run build on Node 22 for every push to main and every pull request.
Issues and PRs are welcome. Before opening a PR: npm run build must succeed, exercise the change against a real API key, and update both the tool descriptions in src/index.ts and the API reference above if tool behaviour changes.
0.7.6 โ Keyless get_rates_authenticated with time says a paid plan is needed; history documented as paid-only
0.7.4 โ Keyless get_exchange_rate falls back from the ECB table to the central bank issuing either currency (USD/GBP, GBP/JPY, USD/INR answer keyless), like the hosted endpoint; dated-table errors say a paid plan is needed
AI agents: Claude Code plugin /plugin marketplace add AllRates-Today/claude-code-plugin ยท hosted MCP endpoint https://allratestoday.com/api/mcp (keyless)
New in Oct 2026: agents can self-issue a trial key โ POST https://allratestoday.com/api/agent/keys (JSON) โ 100 calls / 7 days โ and read the keyless Daily Reference Rate (16:00 London fix) at https://allratestoday.com/api/open/reference-rate