Universal cryptocurrency exchange access for Claude - Trade on 100+ exchanges through a single MCP interface!
graph LR
A[Claude Desktop] --> B[CCXT MCP Server]
B --> C[CCXT Library]
C --> D[Binance]
C --> E[Coinbase]
C --> F[Kraken]
C --> G[Bybit]
C --> H[...100+ more]
style A fill:#f9f,stroke:#333,stroke-width:2px,color:#000
style B fill:#bbf,stroke:#333,stroke-width:4px,color:#000
style C fill:#bfb,stroke:#333,stroke-width:2px,color:#000
style D fill:#fff,stroke:#333,stroke-width:1px,color:#000
style E fill:#fff,stroke:#333,stroke-width:1px,color:#000
style F fill:#fff,stroke:#333,stroke-width:1px,color:#000
style G fill:#fff,stroke:#333,stroke-width:1px,color:#000
style H fill:#fff,stroke:#333,stroke-width:1px,color:#000
This MCP server gives Claude the ability to:
- π Get real-time prices from any crypto exchange
- π Analyze order books and market depth
- π Compare prices across exchanges instantly
- π° Detect arbitrage opportunities automatically
- π Fetch historical data for technical analysis
- π Calculate technical indicators (RSI, MACD, Bollinger Bands, ATR, Stochastic, Ichimoku)
# Clone the repository
git clone https://github.com/MyronKoch/ccxt-mcp-server.git
cd ccxt-mcp-server
# Install dependencies
npm install
# Build the project
npm run build{
"mcpServers": {
"ccxt-mcp-server": {
"command": "node",
"args": ["/path/to/ccxt-mcp-server/dist/index.js"]
}
}
}Ask Claude: "What's the price of Bitcoin on Binance?"
| Tool | Description | Example |
|---|---|---|
exchange_list |
List all 106 supported exchanges | "Show me all available exchanges" |
exchange_init |
Connect to specific exchange | "Initialize Binance connection" |
exchange_status |
Check if exchange is working | "Is Coinbase operational?" |
exchange_markets |
Get trading pairs | "What pairs does Kraken support?" |
| Tool | Description | Example |
|---|---|---|
market_ticker |
Current prices | "BTC price on Binance" |
market_orderbook |
Bids & asks | "Show ETH order book" |
market_trades |
Recent trades | "Latest SOL trades" |
market_ohlcv |
Candlestick data | "1-hour BTC chart data" |
| Tool | Description | Example |
|---|---|---|
account_balance |
Check balances (requires env API keys) | "My Binance balance" |
analytics_compare_prices |
Multi-exchange comparison | "Compare ETH on all exchanges" |
| Tool | Description | Example |
|---|---|---|
indicators_calculate |
Calculate technical indicators | "Calculate RSI and MACD for BTC/USDT on Binance" |
Supported Indicators:
- RSI - Relative Strength Index (overbought/oversold detection)
- MACD - Moving Average Convergence Divergence (trend detection)
- Bollinger Bands - Volatility and price range analysis
- ATR - Average True Range (volatility measurement)
- Stochastic - Momentum oscillator
- Ichimoku Cloud - Comprehensive trend analysis
graph TD
A[Check BTC Price] --> B{Price Difference?}
B -->|Yes| C[Buy on Exchange A]
C --> D[Sell on Exchange B]
D --> E[π° Profit!]
B -->|No| F[Keep Monitoring]
style A fill:#fff,stroke:#333,stroke-width:2px,color:#000
style B fill:#fff,stroke:#333,stroke-width:2px,color:#000
style C fill:#fff,stroke:#333,stroke-width:2px,color:#000
style D fill:#fff,stroke:#333,stroke-width:2px,color:#000
style E fill:#0f0,stroke:#333,stroke-width:2px,color:#000
style F fill:#fff,stroke:#333,stroke-width:2px,color:#000
The server automatically detects when the same asset has different prices across exchanges!
You: "Compare Bitcoin prices across major exchanges"
Claude: Analyzing BTC/USDT across exchanges...
π Price Comparison:
β’ Binance: $67,234.50
β’ Coinbase: $67,256.00 (+$21.50)
β’ Kraken: $67,245.75 (+$11.25)
β’ Bybit: $67,232.00 (-$2.50)
π― Arbitrage Opportunity Detected!
Buy on Bybit at $67,232.00
Sell on Coinbase at $67,256.00
Potential profit: $24.00 per BTC (0.036%)
You: "Calculate RSI and MACD for BTC/USDT on Binance"
Claude: Analyzing Bitcoin technical indicators...
π Technical Analysis (1-hour timeframe):
RSI (14): 58.32
β’ Signal: Neutral
β’ Not overbought (>70) or oversold (<30)
MACD:
β’ MACD Line: 234.50
β’ Signal Line: 198.25
β’ Histogram: 36.25 (Bullish)
β’ Trend: Bullish momentum increasing
Bollinger Bands:
β’ Upper: $67,850
β’ Middle: $67,234
β’ Lower: $66,618
β’ Current price within normal range
π‘ Interpretation: Moderate bullish momentum with RSI in neutral zone.
MACD showing positive divergence. Consider entry on pullback to middle band.
flowchart TB
subgraph MCP[MCP Layer]
A[Tool Definitions]
B[Request Handler]
end
subgraph Core[Core System]
C[Exchange Manager<br/>Singleton Pattern]
D[Response Formatter<br/>TAPS Compliance]
E[Validation Utils<br/>Input Safety]
end
subgraph CCXT[CCXT Integration]
F[106 Exchange APIs]
G[Normalized Data]
H[Rate Limiting]
end
MCP --> Core
Core --> CCXT
style A fill:#fff,stroke:#333,stroke-width:2px,color:#000
style B fill:#fff,stroke:#333,stroke-width:2px,color:#000
style C fill:#bbf,stroke:#333,stroke-width:2px,color:#000
style D fill:#bbf,stroke:#333,stroke-width:2px,color:#000
style E fill:#bbf,stroke:#333,stroke-width:2px,color:#000
style F fill:#fff,stroke:#333,stroke-width:2px,color:#000
style G fill:#fff,stroke:#333,stroke-width:2px,color:#000
style H fill:#fff,stroke:#333,stroke-width:2px,color:#000
{
"success": true,
"data": {
"symbol": "BTC/USDT",
"bid": 67234.50,
"ask": 67235.00,
"last": 67234.75
},
"metadata": {
"exchange": "binance",
"timestamp": 1738123456789,
"rateLimit": { "remaining": 99, "reset": 1738123460 },
"version": "TAPS-1.0.0"
}
}- π Environment-only credentials - API keys MUST be set via environment variables (never in request parameters)
- β±οΈ Adaptive rate limiting - Automatic exponential backoff prevents exchange bans
- π Automatic retries - Smart retry logic (up to 5 attempts) with backoff
- π‘οΈ Input validation - Prevents costly mistakes and malformed requests
- π§Ή Credential sanitization - No leaks in logs or responses
- β Testnet support - Safe development environment
For account operations, set credentials as environment variables:
# .env file
BINANCE_API_KEY=your_api_key_here
BINANCE_SECRET=your_secret_here
# For other exchanges, use: EXCHANGEID_API_KEY and EXCHANGEID_SECRET
COINBASE_API_KEY=...
COINBASE_SECRET=...Security Note: Credentials are NEVER accepted as tool parameters to prevent leakage in MCP logs.
π Tier 1 - Fully Tested
- Binance (+ Testnet)
- Coinbase (+ Sandbox)
- Kraken
- Bybit (+ Testnet)
- OKX
π Tier 2 - Major Exchanges
- Bitfinex
- Huobi
- Gate.io
- KuCoin
- Bitget
- Bitstamp
- Gemini
- Crypto.com
- MEXC
- And 90+ more...
# Install dependencies
npm install
# Development mode with hot reload
npm run dev
# Build for production
npm run build
# Run tests
npm testccxt-mcp-server/
βββ src/
β βββ index.ts # Main MCP server
β βββ exchange-manager.ts # Exchange instance management with rate limiting
β βββ response-formatter.ts # TAPS response formatting
β βββ arbitrage/
β β βββ advanced-scanner.ts # Real-time arbitrage detection
β βββ cache/
β β βββ lru-cache-manager.ts # LRU caching for market data
β βββ indicators/
β β βββ technical-analysis.ts # RSI, MACD, Bollinger, ATR, Stochastic, Ichimoku
β βββ rate-limiting/
β β βββ adaptive-limiter.ts # Exponential backoff retry logic
β βββ risk/
β β βββ risk-manager.ts # Kelly Criterion, position sizing
β βββ utils/
β β βββ validation.ts # Input validation and sanitization
β βββ types/
β βββ taps.ts # TAPS v1.0 type definitions
βββ dist/ # Compiled JavaScript
βββ tests/ # Comprehensive test suite
βββ docs/
βββ standards/
β βββ TAPS-v1.0-STANDARD.md # Protocol specification
βββ architecture/
β βββ ARCHITECTURE.md # System design
βββ guides/
βββ TESTING-GUIDE.md # Testing documentation
| Issue | Solution |
|---|---|
| "Exchange not found" | Check exact exchange ID (lowercase, e.g., binance not Binance) |
| "Rate limit exceeded" | Server auto-retries with exponential backoff (up to 5 attempts) |
| "Invalid symbol" | Use format: BTC/USDT not BTCUSDT |
| "No balance data" | Set EXCHANGEID_API_KEY and EXCHANGEID_SECRET environment variables |
| "Invalid credentials" | Credentials must be in .env file, NOT in tool parameters |
| Build errors | Run npm install to ensure all dependencies are installed |
| Type errors | Run npm run build - TypeScript is configured with Node.js types |
- β‘ Response time: < 2 seconds (< 1ms for cache hits)
- π Concurrent requests: Unlimited with automatic rate limiting
- πΎ Memory usage: < 100MB
- π Exchange connections: Cached & reused
- π¦ Smart caching: 100% coverage on market data endpoints
- Tickers: 10s TTL
- Order books: 5s TTL
- Trades: 10s TTL
- OHLCV: 60s TTL
- Markets: 1hr TTL
- π Auto-retry: Exponential backoff on errors (1s β 2s β 4s β 8s β 16s)
This is a TAPS v1.0 reference implementation. PRs welcome!
- Fork the repository
- Create your feature branch
- Follow TAPS v1.0 standards
- Submit a pull request
MIT - Use freely in commercial projects!
- CCXT - The amazing library that makes this possible
- MCP - Anthropic's Model Context Protocol
- TAPS v1.0 - Trading API Protocol Standard (created for this project)
First universal crypto exchange MCP server ever created!
CCXT β’ TAPS v1.0 β’ MCP
- TAPS v1.0 Standard - Trading API Protocol Standard specification
- Architecture Guide - System design and patterns
- Testing Guide - Comprehensive testing documentation
- Implementation Roadmap - Development phases
- Ultimate Roadmap - Future vision & competitive analysis