Interact with over 100 cryptocurrency exchange APIs using the CCXT library.
CCXT MCP Server is a server that allows AI models to interact with cryptocurrency exchange APIs through the Model Context Protocol (MCP). This server uses the CCXT library to provide access to more than 100 cryptocurrency exchanges and their trading capabilities.
# Install the package globally
npm install -g @lazydino/ccxt-mcp
# Run with default settings
ccxt-mcp
# or run without installation
npx @lazydino/ccxt-mcp
# Install the package globally
npm install -g @lazydino/ccxt-mcp
You can run it directly without installation:
# Using default settings
npx @lazydino/ccxt-mcp
# Using custom configuration file
npx @lazydino/ccxt-mcp --config /path/to/config.json
View help:
npx @lazydino/ccxt-mcp --help
Open Claude Desktop Settings:
Add a New MCP Server:
ccxt-mcp
npx @lazydino/ccxt-mcp
--config /path/to/config.json
Save and Test the Server:
This method includes CCXT account information directly in the Claude Desktop settings file (claude_desktop_config.json):
{
"mcpServers": {
"ccxt-mcp": {
"command": "npx",
"args": ["-y", "@lazydino/ccxt-mcp"],
"accounts": [
{
"name": "bybit_main",
"exchangeId": "bybit",
"apiKey": "YOUR_API_KEY",
"secret": "YOUR_SECRET_KEY",
"defaultType": "spot"
},
{
"name": "bybit_futures",
"exchangeId": "bybit",
"apiKey": "YOUR_API_KEY",
"secret": "YOUR_SECRET_KEY",
"defaultType": "swap"
}
]
}
}
}
Using this method, you don't need a separate configuration file. All settings are integrated into the Claude Desktop configuration file.
To separate account information into a separate configuration file, set up as follows:
ccxt-accounts.json
):{
"accounts": [
{
"name": "bybit_main",
"exchangeId": "bybit",
"apiKey": "YOUR_API_KEY",
"secret": "YOUR_SECRET_KEY",
"defaultType": "spot"
},
{
"name": "bybit_futures",
"exchangeId": "bybit",
"apiKey": "YOUR_API_KEY",
"secret": "YOUR_SECRET_KEY",
"defaultType": "swap"
}
]
}
Important: The configuration file must contain an
accounts
array at the root level, as shown above.
{
"mcpServers": {
"ccxt-mcp": {
"command": "npx",
"args": [
"-y",
"@lazydino/ccxt-mcp",
"--config",
"/path/to/ccxt-accounts.json"
]
}
}
}
Note: When using a separate configuration file with the
--config
option, the server will look for theaccounts
array directly in the root of the JSON file, not inmcpServers.ccxt-mcp.accounts
path.
# Using custom configuration file
npx @lazydino/ccxt-mcp --config /path/to/ccxt-accounts.json
You can find an example configuration file at examples/config-example.json
in the repository.
Reasons to Use a Separate Configuration File:
- Prevents recursive reference issues
- Separates sensitive information like API keys
- Easier multi-environment configuration (development, testing, production)
- Improved configuration file version control
Market Information Retrieval:
Trading Functions:
Trading Analysis:
Position Management:
Risk Management:
User <--> AI Model(Claude/GPT) <--> MCP Protocol <--> CCXT MCP Server <--> Cryptocurrency Exchange API
When registered with Claude Desktop, you can make the following types of requests to AI models:
When using AI models, consider the following cautions and use the prompt below for effective trading:
Your goal is to execute trades using the ccxt tools as much as possible
Cautions:
- Accurately identify whether it's a futures market or spot market before proceeding with trades
- If there's no instruction about percentage of capital or amount to use, always calculate and execute trades using the entire available capital
Notes:
Check and compare the current Bitcoin price on binance and coinbase.
Position Management
Open a long position on BTC/USDT futures market in my Bybit account (bybit_futures) with 5% of capital using 10x leverage.
Enter based on moving average crossover strategy and set stop loss at the lowest point among the 12 most recent 5-minute candles.
Performance Analysis
Analyze my Binance account (bybit_main) trading records for the last 7 days and show me the win rate, average profit, and maximum consecutive losses.
Detailed Trading Analytics
Analyze my trading performance on the bybit_futures account for BTC/USDT over the last 30 days. Calculate win rate, profit factor, and identify any patterns in my winning trades.
Show me the monthly returns for my bybit_main account over the past 90 days and identify my best and worst trading months.
Analyze my consecutive wins and losses on my bybit_futures account and tell me if I have any psychological patterns affecting my trading after losses.
# Clone repository
git clone https://github.com/lazy-dinosaur/ccxt-mcp.git
# Navigate to project directory
cd ccxt-mcp
# Install dependencies
npm install
# Build
npm run build
Contributions are welcome! Please feel free to submit a Pull Request.
Distributed under the MIT License. See the LICENSE file for more information.
If you find this project useful, please consider giving it a ⭐️ on GitHub!
Bring the full power of BrowserStack’s Test Platform to your AI tools, making testing faster and easier for every developer and tester on your team.
Enables secure, contextual AI interactions with Jenkins tools via the Model Context Protocol.
Performs complementary code analysis by combining Claude Code and Google's Gemini AI.
Navigate and explore the Model Context Protocol specification with dynamic markdown tree generation and intelligent section navigation.
A RAG-based Q&A server using a vector store built from Gemini CLI documentation.
Manage ServiceNow metadata, modules, records, and tests using Fluent, a TypeScript-based declarative DSL. Supports all ServiceNow SDK CLI commands.
Enables AI assistants to use a Neo4j knowledge graph for standardized coding workflows, acting as a dynamic instruction manual and project memory.
iOS Swift Package Manager server written in Swift
Converts OpenAPI/Swagger specifications to Model Context Protocol (MCP) format, providing a modern Web UI and a backend service.
Integrates LLM applications with documentation sources using the Model Context Protocol.