Give your LLM agent live FX rates over MCP
exchangerate.dev runs a Model Context Protocol server so an LLM agent can request currency rates as structured tool calls, without writing a line of REST client code.
Connect your agent to https://api.exchangerate.dev/v1/mcp and it gains four tools: discover supported currencies, fetch the latest rate for a pair, convert an amount, or pull a historical series. The server counts each tool call against the same per-minute rate limit and monthly quota as your REST key, so plan capacity the same way you would for any API integration.
https://api.exchangerate.dev/v1/mcp, server name exchangerate-dev.list_currencies, get_rate, convert, and get_range.What MCP gives an LLM agent
The Model Context Protocol lets an LLM call external tools during inference without manual HTTP wiring. Rather than asking a developer to build a REST client, the agent discovers the tool list from the server and invokes tools by name. exchangerate.dev exposes its rate data this way: the server at /v1/mcp describes four tools, the agent picks the right one for the task, and the result comes back as structured JSON that feeds straight into the next reasoning step.
This is useful when the agent needs rates dynamically. A user might ask "how much is 500 USD in JPY right now?"; the agent calls convert and answers from the response, with no hard-coded rate in the prompt.
The four tools and when to use each
Each tool maps to a specific REST endpoint on the API. The agent chooses between them based on what the task requires.
A typical agent workflow runs list_currencies once at setup or when the user names an unfamiliar code. After that it calls get_rate or convert per user query, and get_range when a trend, comparison, or historical context is needed.
Configuring an MCP client
Most MCP clients accept a JSON config block. Point the client at the server URL and pass your API key in the Authorization header:
Replace exr_live_... with your key from the dashboard. The server name exchangerate-dev is what surfaces in the agent's tool list. Some clients (Claude for Desktop, Cursor) support an npm package for local (stdio) connections instead of the HTTP URL; the four tools and their behaviour are identical either way.
Authorization header still works for a quick test; anonymous calls are capped per IP address. Add a key at https://exchangerate.dev/signup to raise the limit to 50,000 calls a month and for production use.Quota and rate limits
Every tool call counts as one API call against your key. The free tier allows 50,000 calls per month at 30 requests per minute. An agent that calls get_rate on every user message in a busy chat interface can exhaust the per-minute limit quickly. Design the agent to batch or cache where the task allows.
get_range is efficient for historical work: one call returns a full date series for multiple symbols rather than one call per day. If an agent needs rates for the past two weeks across three pairs, a single get_range call covers it.
Reading freshness from tool responses
Each tool response includes source and market_session. source tells the agent where the rate came from: live for aggregated spot (including weekends), ecb_daily for the European Central Bank reference fix, or fred_daily for the Federal Reserve daily series. market_session says whether the FX day is open, weekend, or between sessions.
These fields let the agent give honest context to the user. Rather than stating a number without qualification, the agent can note that the rate is from the ECB daily fix or that the market is currently closed. The notice field on every response carries the indicative disclaimer the agent should surface when presenting rates to end users.
Indicative rates only
notice field.This applies to the agent's output too. If users ask "should I exchange my money now?" or for a forecast, the agent should decline rather than extrapolate from the rate data. The tools provide the current or historical number; any forward-looking interpretation is out of scope.