Currency Exchange & Crypto Rates

by ruddxxy

Not rated
GitHub

About

Real-time forex and crypto conversion with multi-source failover across 5 providers. 60+ fiat currencies, 30+ cryptocurrencies, no API keys needed.

Details

Author
ruddxxy
Categories
Other, Finance

Setup

Install Currency Exchange & Crypto Rates in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/ruddxxy/currency-exchange-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

Currency Exchange & Crypto Rates MCP Server

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.

Convert an amount between any supported fiat or cryptocurrency pair.

{ "amount": 100, "from": "USD", "to": "INR" }
{ "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 }
{ "amount": 1, "from": "bitcoin", "to": "rupees" }

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

{ "amount": 1000, "from": "USD", "to": ["EUR", "GBP", "INR", "JPY", "BTC"] }
{ "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 current exchange rates for a base currency against multiple targets.

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"] }
{ "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 exchange rates for a single date or a date range (max 365 days).

{ "base": "USD", "target": "INR", "date": "2025-01-15" }
{ "base": "USD", "target": "INR", "date": "2025-01-15", "rate": 86.45, "source": "frankfurter", "cached": false }
{ "base": "USD", "target": "EUR", "startDate": "2025-01-01", "endDate": "2025-01-31" }
{ "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 }

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

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

- 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

- 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

# 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}'

Server starts athttp://localhost:3000/mcp.

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" } } } }

ReplaceYOUR_APIFY_API_TOKENwith yourApify API token.

Configurestandby modeon the Apify platform after pushing.

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 athttp://localhost:3000/mcp.

MCP to interface with multiple blockchains, staking, DeFi, swap, bridging, wallet management, DCA, Limit Orders, Coin Lookup, Tracking and more.

Financial intelligence for AI agents — 31 tools across 8 data sources including regime, derivatives, stablecoin flows, momentum, macro, weather patterns, and political cycles.

Execute stock and crypto trades via Trade Agent

MCP server for Aave — lending pool data, reserve info, user positions, and liquidation thresholds.

Bitcoin-native MCP server for AI agents: BTC/STX wallets, DeFi yield, sBTC peg, NFTs, and x402 payments.

Provides real-time prices for assets like precious metals and cryptocurrencies.

EUR settlement for AI agents. USDC/EURC to EUR via SEPA Instant. Trust scoring (KYA 0-100), market data, crypto analytics, AI tools.

Full-lifecycle algorithmic trading: describe strategies in plain English, AI generates code, backtest on real data, deploy live to 10+ brokers. Stocks, options, crypto, futures. Free tier available.

Crypto prices, market data, and token metadata via CoinGecko.

Crypto prices, market caps, rankings, and token metadata via CoinMarketCap.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.