Giving an LLM agent a currency tool is easy: wrap Frankfurter in a function and you're done. The problem shows up later, when the agent answers "what's the dollar rate in Sri Lanka?" with a central bank number while the user means what their bank will give them.

What a good currency tool returns

  • the rate,
  • who published it (central bank, customs, a commercial bank, the market),
  • when it was published,
  • what kind of rate it is (reference, buying, selling, customs).

Frankfurter returns the first two for official rates. That's enough for many agents.

An MCP server with more rate types

AllRatesToday publishes an MCP server (@allratestoday/mcp-server on npm) with separate tools for market rates (get_exchange_rate), official tables from central banks and tax or customs authorities (get_official_rates) and commercial bank boards (get_bank_rates). In Claude Desktop or any MCP client:

{ "mcpServers": { "allratestoday": { "command": "npx", "args": ["-y", "@allratestoday/mcp-server"], "env": { "ALLRATES_API_KEY": "YOUR_KEY" } } } } 

Now the agent can answer three different questions correctly:

  • "What's the ECB rate today?" calls get_official_rates for ecb.
  • "What will HSBC Hong Kong give me for USD?" calls get_bank_rates.
  • "What's HMRC's rate this month?" calls get_official_rates for hmrc.

If you build your own

Even if you stay on Frankfurter, put the source and date into your tool's output string. Agents repeat whatever you give them, so give them the citation too.

I work on AllRatesToday.