currency-exchange-mcp

currency-exchange-mcp

Real-time currency exchange rates and crypto prices via MCP. Convert between 60+ fiat currencies and 30+ cryptocurrencies with multi-source failover. No API keys needed for upstream data.

Category
访问服务器

README

Currency Exchange & Crypto Rates MCP Server

GitHub stars License: ISC Node.js >= 20 CI

A currency exchange MCP server for real-time forex rates and cryptocurrency prices via the Model Context Protocol. Convert between 60+ fiat currencies and 30+ cryptocurrencies — with multi-source failover, smart currency resolution, batch conversion, and historical rate lookups. No API keys needed for upstream data sources.

Tools

convert_currency

Convert an amount between any supported fiat or cryptocurrency pair.

Input:

{ "amount": 100, "from": "USD", "to": "INR" }

Output:

{
  "amount": 100,
  "from": "USD",
  "to": "INR",
  "result": 8312,
  "rate": 83.12,
  "inverseRate": 0.012031,
  "timestamp": "2026-02-14T12:00:00.000Z",
  "source": "exchangerate-api",
  "cached": false
}

Natural language works too:

{ "amount": 1, "from": "bitcoin", "to": "rupees" }

batch_convert

Convert an amount from one currency to multiple targets in a single call. More cost-effective than multiple individual conversions.

Input:

{ "amount": 1000, "from": "USD", "to": ["EUR", "GBP", "INR", "JPY", "BTC"] }

Output:

{
  "amount": 1000,
  "from": "USD",
  "conversions": [
    { "to": "EUR", "result": 920, "rate": 0.92, "inverseRate": 1.086957, "source": "exchangerate-api", "cached": false },
    { "to": "GBP", "result": 790, "rate": 0.79, "inverseRate": 1.265823, "source": "exchangerate-api", "cached": false },
    { "to": "INR", "result": 83120, "rate": 83.12, "inverseRate": 0.012031, "source": "exchangerate-api", "cached": false },
    { "to": "JPY", "result": 149500, "rate": 149.5, "inverseRate": 0.006689, "source": "exchangerate-api", "cached": false },
    { "to": "BTC", "result": 0.02, "rate": 0.00002, "inverseRate": 50000, "source": "coinbase", "cached": false }
  ],
  "timestamp": "2026-02-14T12:00:00.000Z"
}

Supports up to 50 targets per call. Duplicate and same-as-source currencies are automatically filtered.

get_exchange_rates

Get current exchange rates for a base currency against multiple targets.

Input:

{ "base": "USD" }

Returns rates for the top 20 currencies (USD, EUR, GBP, JPY, INR, AED, CAD, AUD, CHF, CNY, SGD, HKD, KRW, BRL, MXN, ZAR, TRY, THB, SAR, BTC) by default, or specify targets:

{ "base": "BTC", "targets": ["USD", "EUR", "INR", "GBP"] }

Output:

{
  "base": "BTC",
  "rates": {
    "USD": 51234.56,
    "EUR": 47345.12,
    "INR": 4258567.12,
    "GBP": 40567.89
  },
  "timestamp": "2026-02-14T12:00:00.000Z",
  "source": "coinbase",
  "cached": false
}

get_historical_rate

Get historical exchange rates for a single date or a date range (max 365 days).

Single date:

{ "base": "USD", "target": "INR", "date": "2025-01-15" }

Output:

{
  "base": "USD",
  "target": "INR",
  "date": "2025-01-15",
  "rate": 86.45,
  "source": "frankfurter",
  "cached": false
}

Date range:

{ "base": "USD", "target": "EUR", "startDate": "2025-01-01", "endDate": "2025-01-31" }

Output:

{
  "base": "USD",
  "target": "EUR",
  "period": { "startDate": "2025-01-01", "endDate": "2025-01-31" },
  "rates": [
    { "date": "2025-01-02", "rate": 0.9234 },
    { "date": "2025-01-03", "rate": 0.9241 }
  ],
  "change": {
    "high": 0.9312,
    "low": 0.9189,
    "average": 0.9248,
    "changePct": 0.94
  },
  "source": "frankfurter",
  "cached": false
}

Supported Currencies

Fiat (60+ currencies)

Major Gulf/Middle East Asia-Pacific Americas Europe Africa
USD AED INR BRL EUR ZAR
EUR SAR JPY MXN GBP NGN
GBP KWD CNY ARS CHF KES
JPY QAR SGD CLP SEK EGP
AUD BHD HKD COP NOK GHS
CAD OMR KRW PEN DKK MAD
CHF JOD TWD UYU PLN TND
CNY ILS THB CZK
INR EGP MYR HUF
IQD PHP RON
IRR IDR BGN
LBP VND ISK
BDT RUB
PKR UAH
LKR HRK

Crypto (30 coins)

Symbol Name Symbol Name
BTC Bitcoin XRP Ripple
ETH Ethereum LTC Litecoin
SOL Solana BCH Bitcoin Cash
DOGE Dogecoin ATOM Cosmos
ADA Cardano NEAR NEAR Protocol
DOT Polkadot APT Aptos
AVAX Avalanche ARB Arbitrum
MATIC Polygon OP Optimism
LINK Chainlink SHIB Shiba Inu
UNI Uniswap USDT Tether
BNB BNB USDC USD Coin
XLM Stellar ALGO Algorand
FIL Filecoin AAVE Aave
CRO Cronos PEPE Pepe
SUI Sui TRX Tron

Smart Currency Resolution

Accepts ISO 4217 codes, crypto symbols, and natural language:

Input Resolves To
USD, dollars, bucks USD
EUR, euro, euros EUR
GBP, pounds, sterling GBP
INR, rupees, rupee INR
JPY, yen JPY
CNY, yuan, renminbi, rmb CNY
AED, dirham, dirhams AED
SAR, riyal, riyals SAR
BTC, bitcoin BTC
ETH, ethereum, ether ETH
SOL, solana SOL
DOGE, dogecoin DOGE

Data Sources

Data Primary Fallback
Fiat rates (current) ExchangeRate-API (160 currencies, daily) fawazahmed0/exchange-api (CDN, 150+ currencies)
Crypto rates (current) Coinbase Public API (200+ coins, real-time) CoinGecko (10K+ coins, keyless)
Historical rates Frankfurter.app (ECB data, 33 currencies, back to 1999) fawazahmed0 date endpoints

All upstream APIs are zero-auth (no API keys required).

Features

  • Multi-source fallback — automatic failover between providers
  • Fiat-to-fiat, crypto-to-fiat, fiat-to-crypto, and crypto-to-crypto conversions
  • Crypto-to-crypto via USD cross-rate (e.g., BTC to ETH)
  • Batch conversion — convert to up to 50 currencies in a single call
  • Smart currency resolution — natural language, ISO codes, and crypto symbols
  • Historical rates with time-series and change statistics (high, low, average, % change)
  • LRU cache with tiered TTLs — 30 min fiat, 2 min crypto, 24 hours historical
  • Per-domain rate limiting (1.5s between requests to same upstream API)
  • Zod schema validation on all tool inputs
  • Date validation — rejects future dates, invalid formats, ranges over 365 days

Pricing

Event Description Price (USD)
currency-convert Single pair conversion $0.003
batch-convert Convert to up to 50 currencies at once $0.008
exchange-rates Exchange rates lookup $0.003
historical-rate Historical rate lookup $0.008

Limitations

  • Historical crypto rates: Not supported — Frankfurter and fawazahmed0 only cover fiat
  • Frankfurter coverage: ~33 ECB currencies only — Gulf currencies (AED, SAR, KWD, QAR) use fawazahmed0 fallback for historical
  • Fiat rate freshness: ExchangeRate-API updates daily, not real-time
  • Crypto rate freshness: Cached for 2 minutes to respect upstream API limits
  • Time-series: Only available for Frankfurter-supported (ECB) currencies
  • Upstream rate limits: CoinGecko keyless has ~10 req/min; Coinbase ~10 req/sec
  • 1MB response size cap per request
  • Rate limited to 1 request per 1.5 seconds per upstream domain

Usage

MCP Endpoint: POST /mcp

# Convert 100 USD to INR
curl -X POST https://your-actor.apify.actor/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_APIFY_API_TOKEN" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"convert_currency","arguments":{"amount":100,"from":"USD","to":"INR"}},"id":1}'

# Get BTC exchange rates
curl -X POST https://your-actor.apify.actor/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_APIFY_API_TOKEN" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_exchange_rates","arguments":{"base":"BTC","targets":["USD","EUR","INR"]}},"id":2}'

# Historical rate for a specific date
curl -X POST https://your-actor.apify.actor/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_APIFY_API_TOKEN" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_historical_rate","arguments":{"base":"USD","target":"INR","date":"2025-01-15"}},"id":3}'

Running Locally

npm install
npm run start:dev

Server starts at http://localhost:3000/mcp.

Connect to Your AI Client

Add this to your MCP client config (Claude Desktop, Cline, Cursor, etc.):

{
  "mcpServers": {
    "currency-exchange": {
      "url": "https://vector384--currency-exchange-mcp.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_API_TOKEN"
      }
    }
  }
}

Replace YOUR_APIFY_API_TOKEN with your Apify API token.

Deployment

apify login
apify push

Configure standby mode on the Apify platform after pushing.

FAQ

Do I need API keys for the upstream exchange rate providers? No. All 5 data sources (ExchangeRate-API, fawazahmed0, Frankfurter, Coinbase, CoinGecko) are public and free. You only need an Apify API token for your deployed Actor.

How does multi-source failover work? Each request tries the primary provider first. If it fails or times out, the server automatically retries with the fallback provider. Fiat: ExchangeRate-API → fawazahmed0. Crypto: Coinbase → CoinGecko. Historical: Frankfurter → fawazahmed0.

Can I convert between two cryptocurrencies (e.g., BTC to ETH)? Yes. Crypto-to-crypto conversions use a USD cross-rate automatically.

What's the rate freshness? Fiat rates update daily. Crypto rates are cached for 2 minutes. Historical rates are cached for 24 hours.

Are historical crypto rates supported? No. The historical data sources (Frankfurter/ECB and fawazahmed0) only cover fiat currencies.

How do I run it locally? npm install && npm run start:dev — the MCP endpoint will be available at http://localhost:3000/mcp.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选