
CCXT MCP Server bridges the gap between AI models and cryptocurrency trading by providing a
CCXT MCP Server bridges the gap between AI models and cryptocurrency trading by providing a standardized interface through the Model Context Protocol. Created to empower automated trading strategies, this tool allows AI assistants like Claude and GPT to directly interact with over 100 cryptocurrency exchanges without requiring users to write comple
·
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-mcpYou 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.jsonView help:
npx @lazydino/ccxt-mcp --helpOpen Claude Desktop Settings:
Add a New MCP Server:
ccxt-mcpnpx @lazydino/ccxt-mcp--config /path/to/config.jsonSave 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"],
"mcpBearerToken": "YOUR_MCP_TOKEN",
"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-config.json):{
"mcpBearerToken": "YOUR_MCP_TOKEN",
"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
accountsarray at the root level, as shown above.
Important: If you run the server in HTTP+SSE mode (
--sse), setmcpBearerTokenin the same config file. Clients must sendAuthorization: Bearer <mcpBearerToken>on requests.
{
"mcpServers": {
"ccxt-mcp": {
"command": "npx",
"args": [
"-y",
"@lazydino/ccxt-mcp",
"--config",
"/path/to/ccxt-config.json"
]
}
}
}Note: When using a separate configuration file with the
--configoption, the server will look for theaccountsarray directly in the root of the JSON file, not inmcpServers.ccxt-mcp.accountspath.
# Using custom configuration file
npx @lazydino/ccxt-mcp --config /path/to/ccxt-config.jsonYou can find an example configuration file at config/ccxt-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 APIWhen 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 capitalNotes:
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 buildcp config/ccxt-config.example.json config/ccxt-config.jsonThen fill in your real API keys in config/ccxt-config.json.
Also set mcpBearerToken in that same config file.
2. Build image:
docker compose builddocker compose up -dcurl -H "Authorization: Bearer YOUR_MCP_TOKEN" http://127.0.0.1:2298/healthzThis Compose setup runs MCP over HTTP+SSE (/sse + /messages) on localhost:2298 for reverse proxying.
If your MCP client runs on another host, use an Nginx reverse proxy on this machine.
ccxt-mcp.nginx to your Nginx config location and update certificate paths:sudo cp ccxt-mcp.nginx /etc/nginx/conf.d/ccxt-mcp.conf/etc/nginx/conf.d/ccxt-mcp.conf and set:ssl_certificatessl_certificate_keysudo nginx -t && sudo systemctl reload nginxhttps://YOUR_HOSTNAME_OR_IP:42299/ssehttps://YOUR_HOSTNAME_OR_IP:42299/messagesAuthorization: Bearer YOUR_MCP_TOKENYou can generate a strong token with:
openssl rand -hex 32Config example:
{
"mcpBearerToken": "YOUR_MCP_TOKEN",
"accounts": [
{
"name": "bybit_main",
"exchangeId": "bybit",
"apiKey": "YOUR_API_KEY",
"secret": "YOUR_SECRET_KEY"
}
]
}Port note:
42298 is HTTP (redirect only)42299 is HTTPS2298 comes from CCXT on a phone keypadIf your MCP client accepts command-based MCP servers instead of URL configuration, configure ccxt-mcp with:
docker[
"run",
"--rm",
"-i",
"-p",
"127.0.0.1:2298:2298",
"-v",
"/absolute/path/to/ccxt-mcp/config/ccxt-config.json:/config/ccxt-config.json:ro",
"ccxt-mcp:local",
"--sse",
"--host",
"0.0.0.0",
"--port",
"2298",
"--config",
"/config/ccxt-config.json"
]Build the image first with docker compose 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!
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add ccxt-mcp -- npx -y @lazydino/ccxt-mcp{
"mcpServers": {
"ccxt-mcp": {
"args": [
"-y",
"@lazydino/ccxt-mcp"
],
"command": "npx"
}
}
}code --add-mcp '{"name":"ccxt-mcp","args":["-y","@lazydino/ccxt-mcp"],"command":"npx"}'[mcp_servers.ccxt-mcp]
command = "npx"
args = ["-y", "@lazydino/ccxt-mcp"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/ccxt-mcp-server to learn what the "CCXT MCP Server" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
npx @lazydino/ccxt-mcp
npx @lazydino/ccxt-mcp --config /path/to/config.json
npx @lazydino/ccxt-mcp --help
npx @lazydino/ccxt-mcp --config /path/to/ccxt-config.jsonnpm install -g @lazydino/ccxt-mcp| Name | What it does |
|---|---|
fetchMarkets | Fetch markets from a cryptocurrency exchange |
fetchTicker | Fetch ticker information for a symbol on an exchange |
fetchTickers | Fetch all tickers from an exchange |
fetchOrderBook | Fetch order book for a symbol on an exchange |
fetchTrades | Fetch recent trades for a symbol on an exchange |
fetchOHLCV | Fetch OHLCV candlestick data for a symbol on an exchange |
createOrder | Create a new order using a configured account |
cancelOrder | Cancel an existing order using a configured account |
fetchOrder | Fetch information about a specific order using a configured account |
fetchOpenOrders | Fetch all open orders using a configured account |
fetchClosedOrders | Fetch all closed orders using a configured account |
listAccounts | List all configured account names |
fetchBalance | Fetch account balance for a configured account |
fetchDeposits | Fetch deposit history for a configured account |
fetchWithdrawals | Fetch withdrawal history for a configured account |
fetchMyTrades | Fetch personal trade history for a configured account |
analyzeTradingPerformance | Analyze trading performance for a configured account |
calculateWinRate | Calculate win rate and profit metrics for a configured account |
analyzeConsecutiveProfitLoss | Analyze consecutive winning and losing trades |
analyzePeriodicReturns | Analyze daily and monthly returns for a configured account |
| Name | What it does |
|---|---|
exchanges | No description provided. |
alpaca Info | No description provided. |
apex Info | No description provided. |
aster Info | No description provided. |
backpack Info | No description provided. |
bequant Info | No description provided. |
bigone Info | No description provided. |
binance Info | No description provided. |
binancecoinm Info | No description provided. |
binanceus Info | No description provided. |
binanceusdm Info | No description provided. |
bingx Info | No description provided. |
bit2c Info | No description provided. |
bitbank Info | No description provided. |
bitbns Info | No description provided. |
bitfinex Info | No description provided. |
bitflyer Info | No description provided. |
bitget Info | No description provided. |
bithumb Info | No description provided. |
bitmex Info | No description provided. |
bitopro Info | No description provided. |
alpaca Markets | No description provided. |
apex Markets | No description provided. |
aster Markets | No description provided. |
backpack Markets | No description provided. |
bequant Markets | No description provided. |
bigone Markets | No description provided. |
binance Markets | No description provided. |
binancecoinm Markets | No description provided. |
binanceus Markets | No description provided. |
binanceusdm Markets | No description provided. |
Read live from the server on September 23, 2026.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/ccxt-mcp-server)Nothing comparable is listed yet.
No tagged releases on record.
Connect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "ccxt-mcp-server" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.