Content
rate-mcp — Real-time Exchange Rates + Cryptocurrency Market Data MCP Server
> Let Claude query real-time exchange rates and cryptocurrency market data directly! One-stop solution for foreign exchange, Bitcoin, Ethereum, and more.
## ✨ Features
| Tool | Description |
|------|------|
| `get_exchange_rates` | Real-time foreign exchange rates (base currency → all major currencies) |
| `get_exchange_rate_pair` | Specific currency pair (e.g., USD/CNY, EUR/JPY) |
| `convert_fiat` | Fiat currency conversion calculation |
| `get_historical_exchange_rates` | Historical foreign exchange rate query |
| `get_supported_currencies` | List of supported foreign exchange currencies |
| `get_crypto_prices` | Real-time cryptocurrency prices (supports batch) |
| `list_cryptocurrencies` | Cryptocurrency market capitalization rankings |
get_crypto_detail` | Single cryptocurrency detailed information |
| `get_crypto_historical` | Historical price trends |
| `search_cryptocurrencies` | Search for cryptocurrencies |
|_trending_cryptos` | Trending cryptocurrency rankings |
| `get_market_overview` | Global cryptocurrency market overview |
convert_currency` | **Universal conversion** — any fiat currency cryptocurrency |
## 🚀 Quick Start
```bash
# Install dependencies
cd rate-mcp
npm install
npm run build Configure Claude Code
# Add to .mcp.json or ~/.claude/mcp.json:
```
```json
{
"mcpServers": {
"rate": {
" "node",
"args": ["path/to/rate-mcp/dist/index.js"]
}
}
}
```
## 💬 Usage Examples
```
"How much is the US dollar to RMB now?"
"What is 10,000 RMB in Japanese yen?"
"What is the current price of Bitcoin?"
"What are the top 20 cryptocurrencies by market capitalization?"
"Check the detailed information of Ethereum"
"What is the total market capitalization of the global cryptocurrency market?"
"How much USDT can 0.5 BTC be exchanged for?"
"What are the hottest cryptocurrencies today?"
"How has SOL trended over the past week?"
```
## 🏗 Technical Architecture
```
rate-mcp/
├── src/
│ ├── index.ts # Entry point + service registration (13 tools)
│ ├── config.ts # Configuration (cache TTL, API addresses)
│ ├── tools/
│ │ ├── exchange.ts # Foreign exchange rate tools (5)
│ │ ├── crypto # Cryptocurrency tools (5)
│ │ ├── market.ts # Market overview tools (2)
│ └── convert.ts # Universal (1)
│ ├── data/
│ │ ├── coingecko.ts # CoinGecko API client
│ │ ├── frankfurter.ts # Frankfurter API client (European Central Bank data)
│ │ └── cache.ts # In-memory cache
│ └── utils/
│ └── logger.ts # Logging tool
└── dist/ # Compilation output
```
## 📊 Data Sources
| Data Type | Source | Fees | API Key |
|----------|------|------|---------|
| **Foreign Exchange Rates** | European Central Bank (ECB) → [Frankfurter API](https://api.frankfurter.app) | ✅ Free | ❌ Not required |
| **Cryptocurrency** | [CoinGecko](https://www.coingecko.com) | ✅ Free | ❌ Not required |
- **Foreign exchange data**: Official European Central Bank exchange rates, covering 30+ major currencies
- **Cryptocurrency data**: Covers 12,000+ cryptocurrencies, supporting 50+ pricing currencies
- All data is **public market data**, legal and compliant
## 💡 Notes
- Cryptocurrency prices are updated in real-time (cache 30 seconds)
- Foreign exchange rates come from the European Central Bank, updated on trading days
- All data is for personal learning and research only, **does not constitute any investment advice**
- Built on public APIs, please use reasonably to avoid rate limiting
## 📜 License
MIT