What Is MCP and Why It Matters
MCP (Model Context Protocol) is an open standard that lets AI coding assistants like Claude Code, Cursor, and Windsurf connect to external data sources and tools. Instead of copying and pasting exchange rates into your AI chat, an MCP server lets the AI fetch live currency data directly — making it part of the AI's toolkit.
For developers building financial applications, an exchange rate MCP server means your AI assistant can look up real-time rates, check historical data, and convert currencies without leaving the coding environment. This is especially powerful for tasks like:
Code generation: "Build me a pricing page that shows EUR and GBP equivalents" — the AI fetches live rates and generates accurate code.
Data validation: "Is this exchange rate in our test fixture realistic?" — the AI checks against real market data.
Debugging: "Why is this currency conversion off?" — the AI compares your logic against actual rates.
@exchangerateapi/mcp-server
Official MCP server from Exchange Rate API. Real-time 60-second rates, 160+ currencies, historical data, and dedicated tools for AI coding assistants.
Pros
- 60-second real-time rate updates
- 160+ currencies supported
- Historical and time-series data tools
- 4 dedicated tools: get_exchange_rate, get_historical_rates, get_rates, list_currencies
- Works with Claude Code, Cursor, Claude Desktop, Windsurf
- Reuters/Refinitiv interbank data source
- Free tier available (300 req/month)
Cons
- Requires API key (free signup)
- Free tier limited to 300 requests/month
@allratestoday/mcp-server
Alternative MCP server from AllRatesToday. Basic currency conversion tools for AI assistants.
Pros
- Basic currency conversion tools
- Works with major AI coding tools
- Simple setup
Cons
- Fewer tools than @exchangerateapi/mcp-server
- Less frequent rate updates
- Fewer currencies supported
- No historical or time-series tools
Quick Comparison
| MCP Server | Tools | Update Freq. | Currencies | Historical | Data Source |
|---|---|---|---|---|---|
| @exchangerateapi/mcp-server | 4 | 60 sec | 160+ | Yes | Reuters/Refinitiv |
| @allratestoday/mcp-server | 2 | Daily | 50+ | No | Aggregated |
Available Tools — @exchangerateapi/mcp-server
The Exchange Rate API MCP server exposes four tools that your AI assistant can call:
-
get_exchange_rate— Get the exchange rate between two specific currencies. Example: USD to EUR. -
get_rates— Get all exchange rates for a base currency. Returns 160+ currency pairs at once. -
get_historical_rates— Get exchange rates for a specific historical date. Useful for backtesting and analysis. -
list_currencies— List all supported currency codes and their full names.
Setup Guides
Below are the configuration JSON snippets for each supported AI coding tool. Replace YOUR_API_KEY with your Exchange Rate API key (get one free at /register/).
Claude Code (.claude/settings.json)
"mcpServers": {
"exchange-rate-api": {
"command": "npx",
"args": ["@exchangerateapi/mcp-server"],
"env": {
"EXCHANGE_RATE_API_KEY": "YOUR_API_KEY"
}
}
}
}
Cursor (.cursor/mcp.json)
"mcpServers": {
"exchange-rate-api": {
"command": "npx",
"args": ["@exchangerateapi/mcp-server"],
"env": {
"EXCHANGE_RATE_API_KEY": "YOUR_API_KEY"
}
}
}
}
Claude Desktop (claude_desktop_config.json)
"mcpServers": {
"exchange-rate-api": {
"command": "npx",
"args": ["@exchangerateapi/mcp-server"],
"env": {
"EXCHANGE_RATE_API_KEY": "YOUR_API_KEY"
}
}
}
}
Windsurf (.windsurf/mcp.json)
"mcpServers": {
"exchange-rate-api": {
"command": "npx",
"args": ["@exchangerateapi/mcp-server"],
"env": {
"EXCHANGE_RATE_API_KEY": "YOUR_API_KEY"
}
}
}
}
How It Works in Practice
Once configured, your AI assistant gains access to real-time exchange rate data. Here are some example prompts that become possible:
"What's the current USD to JPY exchange rate?" — The AI calls get_exchange_rate and returns the live rate.
"Generate a pricing table for our SaaS in USD, EUR, GBP, and JPY" — The AI calls get_rates with USD base and uses the real rates in generated code.
"What was EUR/USD on 2025-12-31?" — The AI calls get_historical_rates to fetch the exact rate.
"List all supported currencies" — The AI calls list_currencies and returns the full list with currency names.
Which MCP Server Should You Choose?
For most developers: @exchangerateapi/mcp-server is the clear choice. It offers 4 dedicated tools, 60-second real-time updates, 160+ currencies, and historical data — everything you need for AI-assisted financial development.
For basic lookups only: @allratestoday/mcp-server works if you only need simple current-rate lookups and don't need historical data or the full currency list.
Add exchange rates to your AI coding tools
Get your free API key, configure the MCP server, and give your AI assistant access to 160+ currencies with 60-second updates. Setup takes under 2 minutes.
Get Free API Key →