Why give your AI agent an exchange rate API?
Language models don’t know today’s exchange rates – and they shouldn’t make them up. With the fxapi MCP server, an assistant can fetch the current EUR/USD rate, convert an invoice amount at the rate of its date or pull a month of historical data, and show you exactly where the number came from.
Connect in seconds
Claude Code
claude mcp add --transport http fxapi https://api.fxapi.com/mcp --header "apikey: YOUR_API_KEY"
Claude Desktop, Cursor, VS Code and other MCP clients
Add the server to your client’s MCP configuration. File locations and key names vary by client (VS Code, for example, uses a servers key in .vscode/mcp.json), so check your client’s documentation for remote HTTP servers with custom headers:
{
"mcpServers": {
"fxapi": {
"url": "https://api.fxapi.com/mcp",
"headers": { "apikey": "YOUR_API_KEY" }
}
}
}
Replace YOUR_API_KEY with your key from the fxapi dashboard.
Available tools
The tools map one-to-one to the REST endpoints:
| Tool | Endpoint | What it does |
|---|---|---|
getLatest | /v1/latest | Latest exchange rates |
getHistorical | /v1/historical | Rates for a past date |
getConvert | /v1/convert | Convert an amount |
getRate | /v1/rate | The rate of one currency pair, now or at a past date or moment |
getMatrix | /v1/matrix | Cross rates between 2 to 25 currencies in one table |
getRange | /v1/range | Time series |
getOhlc | /v1/ohlc | Hourly or daily OHLC candles (open, high, low, close) |
getFluctuation | /v1/fluctuation | Change between two dates |
getAverage | /v1/average | Period averages |
getCurrencies | /v1/currencies | Supported currencies |
getStatus | /v1/status | Your remaining quota |
Plan restrictions are the same as for the REST API: getConvert requires the Basic plan or higher, and getRange and getOhlc require Professional or higher.
Example prompts
- “What’s the current exchange rate from EUR to USD, GBP and CHF?”
- “Convert 4,250 CHF to EUR at the rate of 30 June 2026.”
- “Show me how the Japanese yen moved against the dollar over the last 30 days.”
- “Give me the monthly average EUR/USD rates for Q1 2026 as a table.”
Prefer to build it yourself?
Use the OpenAPI 3.1 specification to generate tools for your own agent framework, or read the machine-readable docs at /docs/llms.txt.
Read the full walkthrough in exchange rates for AI agents and the MCP documentation.
All of this is part of the fxapi foreign exchange rates API – one key, one response format and 190+ currencies across every endpoint.
Frequently asked questions
What is an MCP server?
Do I need an API key?
apikey header – a free key works. Tool calls count against your plan’s quota like normal API requests.