透過 MCP 為 AI Agent 接入真實匯率:即時中間價、123 家央行及 1,219 家銀行
Giving an AI Agent Real Exchange Rates: Mid-Market, 123 Central Banks and 1,219 Banks via MCP
AllRatesToday 的 MCP 伺服器讓 AI Agent 查詢真實匯率,提供涵蓋 160+ 種貨幣、每 60 秒更新的即時中間價,以及 123 家央行和 6 個税務機關的官方匯率。服務亦整合 124 個國家 1,219 家銀行的牌價;答案附有時間戳記及具名來源,具備 HTTP 工具的 Agent 框架亦可透過 REST API 使用。
Ask a language model "what is USD to INR today?" and it will give you a number from its training data. That number is out of date, and the model can't tell you whose rate it is.
An MCP server fixes this by letting the agent call a real data source. AllRatesToday's MCP server gives an agent three kinds of rate:
- Real-time mid-market for 160+ currencies, refreshed every 60 seconds
- Official rates from 123 central banks and 6 tax authorities, with history
- Commercial bank boards from 1,219 banks in 124 countries
So the agent can answer more than "what's the rate". It can answer "what does the RBI say the rate was on 30 June" or "which bank in Sri Lanka pays the most for dollars today".
Setup
Add the server to your MCP client config (Claude Desktop, Claude Code, Cursor and others). The exact snippet for each client is on allratestoday.com/mcp/.
What the agent can now do
- Convert with a source: "Convert 1,200 USD to EUR at the ECB rate for 31 March"
- Compare banks: "Which UAE bank has the best USD buy rate right now?"
- Check a quote: "My bank offered 82.10 for USD/INR. How far is that from mid-market?"
Every answer comes with a timestamp and a named source, so the agent can show where its number came from.
Without MCP
The same data is a plain REST API, so any agent framework with HTTP tools can use it:
curl -H "Authorization: Bearer $KEY" \
"https://allratestoday.com/api/v1/central-banks/rates?source=USD&target=EUR"
Links
- MCP setup: allratestoday.com/mcp/
- Free API key: allratestoday.com/register
- Docs: allratestoday.com/docs
來源:DEV Community · dev.to