mcp server ccxt
Provides real-time and historical cryptocurrency market data through integration with major exchanges. This server enables LLMs like Claude to fetch current prices, analyze market trends, and access detailed trading information.
Provides real-time and historical cryptocurrency market data through integration with major exchanges. This server enables LLMs like Claude to fetch current prices, analyze market trends, and access detailed trading information.
A Model Context Protocol (MCP) server that provides real-time and historical cryptocurrency market data through integration with major exchanges. This server enables LLMs like Claude to fetch current prices, analyze market trends, and access detailed trading information.
Multiple exchange support
Historical Analysis
Customizable timeframes
Exchange Support
To install Cryptocurrency Market Data Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-server-ccxt --client claude
# Using uv (recommended)
uv pip install mcp ccxt
# Using pip
pip install mcp ccxt
python crypto_server.py
~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%Claudeclaude_desktop_config.json
Add the server configuration:
{
"mcpServers": {
"crypto": {
"command": "python",
"args": ["/path/to/crypto_server.py"]
}
}
}
Example: "What's the current price of BTC/USDT on Binance?"
get-market-summary
Example: "Show me a market summary for ETH/USDT"
get-top-volumes
Example: "What are the top 5 trading pairs on Kraken?"
list-exchanges
Example: "Which exchanges are supported?"
get-historical-ohlcv
Example: "Show me the last 7 days of BTC/USDT price data in 1-hour intervals"
get-price-change
Example: "What's the 24-hour price change for SOL/USDT?"
get-volume-history
Here are some example questions you can ask Claude once the server is connected:
- What's the current Bitcoin price on Binance?
- Show me the top 5 trading pairs by volume on Coinbase
- How has ETH/USDT performed over the last 24 hours?
- Give me a detailed market summary for SOL/USDT on Kraken
- What's the trading volume history for BNB/USDT over the last week?
mcp
: Model Context Protocol SDKccxt
: Cryptocurrency Exchange Trading LibraryThe server uses: - CCXT's async support for efficient exchange communication - MCP's tool system for LLM integration - Standardized data formatting for consistent outputs - Connection pooling for optimal performance
The server implements robust error handling for: - Invalid trading pairs - Exchange connectivity issues - Rate limiting - Malformed requests - Network timeouts
# To be implemented
pytest tests/
# Clone the repository
git clone [repository-url]
cd crypto-mcp-server
# Install dependencies
uv pip install -e .
Ensure the trading pair exists on the selected exchange
Rate Limiting
Check exchange-specific rate limits
Data Formatting Issues
MIT License - See LICENSE file for details
[
{
"description": "Get current price of a cryptocurrency pair from a specific exchange",
"inputSchema": {
"properties": {
"exchange": {
"default": "binance",
"description": "Exchange to use (supported: binance, coinbase, kraken, kucoin, hyperliquid, huobi, bitfinex, bybit, okx, mexc)",
"enum": [
"binance",
"coinbase",
"kraken",
"kucoin",
"hyperliquid",
"huobi",
"bitfinex",
"bybit",
"okx",
"mexc"
],
"type": "string"
},
"symbol": {
"description": "Trading pair symbol (e.g., BTC/USDT, ETH/USDT)",
"type": "string"
}
},
"required": [
"symbol"
],
"type": "object"
},
"name": "get-price"
},
{
"description": "Get detailed market summary for a cryptocurrency pair from a specific exchange",
"inputSchema": {
"properties": {
"exchange": {
"default": "binance",
"description": "Exchange to use (supported: binance, coinbase, kraken, kucoin, hyperliquid, huobi, bitfinex, bybit, okx, mexc)",
"enum": [
"binance",
"coinbase",
"kraken",
"kucoin",
"hyperliquid",
"huobi",
"bitfinex",
"bybit",
"okx",
"mexc"
],
"type": "string"
},
"symbol": {
"description": "Trading pair symbol (e.g., BTC/USDT, ETH/USDT)",
"type": "string"
}
},
"required": [
"symbol"
],
"type": "object"
},
"name": "get-market-summary"
},
{
"description": "Get top cryptocurrencies by trading volume from a specific exchange",
"inputSchema": {
"properties": {
"exchange": {
"default": "binance",
"description": "Exchange to use (supported: binance, coinbase, kraken, kucoin, hyperliquid, huobi, bitfinex, bybit, okx, mexc)",
"enum": [
"binance",
"coinbase",
"kraken",
"kucoin",
"hyperliquid",
"huobi",
"bitfinex",
"bybit",
"okx",
"mexc"
],
"type": "string"
},
"limit": {
"description": "Number of pairs to return (default: 5)",
"type": "number"
}
},
"type": "object"
},
"name": "get-top-volumes"
},
{
"description": "List all supported cryptocurrency exchanges",
"inputSchema": {
"properties": {},
"type": "object"
},
"name": "list-exchanges"
},
{
"description": "Get historical OHLCV (candlestick) data for a trading pair",
"inputSchema": {
"properties": {
"days_back": {
"default": 7,
"description": "Number of days of historical data to fetch (default: 7, max: 30)",
"maximum": 30,
"type": "number"
},
"exchange": {
"default": "binance",
"description": "Exchange to use (supported: binance, coinbase, kraken, kucoin, hyperliquid, huobi, bitfinex, bybit, okx, mexc)",
"enum": [
"binance",
"coinbase",
"kraken",
"kucoin",
"hyperliquid",
"huobi",
"bitfinex",
"bybit",
"okx",
"mexc"
],
"type": "string"
},
"symbol": {
"description": "Trading pair symbol (e.g., BTC/USDT, ETH/USDT)",
"type": "string"
},
"timeframe": {
"default": "1h",
"description": "Timeframe for candlesticks (e.g., 1m, 5m, 15m, 1h, 4h, 1d)",
"enum": [
"1m",
"5m",
"15m",
"1h",
"4h",
"1d"
],
"type": "string"
}
},
"required": [
"symbol"
],
"type": "object"
},
"name": "get-historical-ohlcv"
},
{
"description": "Get price change statistics over different time periods",
"inputSchema": {
"properties": {
"exchange": {
"default": "binance",
"description": "Exchange to use (supported: binance, coinbase, kraken, kucoin, hyperliquid, huobi, bitfinex, bybit, okx, mexc)",
"enum": [
"binance",
"coinbase",
"kraken",
"kucoin",
"hyperliquid",
"huobi",
"bitfinex",
"bybit",
"okx",
"mexc"
],
"type": "string"
},
"symbol": {
"description": "Trading pair symbol (e.g., BTC/USDT, ETH/USDT)",
"type": "string"
}
},
"required": [
"symbol"
],
"type": "object"
},
"name": "get-price-change"
},
{
"description": "Get trading volume history over time",
"inputSchema": {
"properties": {
"days": {
"default": 7,
"description": "Number of days of volume history (default: 7, max: 30)",
"maximum": 30,
"type": "number"
},
"exchange": {
"default": "binance",
"description": "Exchange to use (supported: binance, coinbase, kraken, kucoin, hyperliquid, huobi, bitfinex, bybit, okx, mexc)",
"enum": [
"binance",
"coinbase",
"kraken",
"kucoin",
"hyperliquid",
"huobi",
"bitfinex",
"bybit",
"okx",
"mexc"
],
"type": "string"
},
"symbol": {
"description": "Trading pair symbol (e.g., BTC/USDT, ETH/USDT)",
"type": "string"
}
},
"required": [
"symbol"
],
"type": "object"
},
"name": "get-volume-history"
}
]