Sponsored by Deepsite.site

CCXT MCP Server

Created By
pcriadopereza year ago
MCP Server for trading cryptocurrencies
Content

CCXT MCP Server

A Model Context Protocol (MCP) server that provides trading functionality through the CCXT library.

ScreenRecording2025-04-19at17 22 45-ezgif com-speed

cursor

Features

  • Fetch ticker data for any symbol
  • Get order book data
  • View recent trades
  • Create orders (market, limit, etc.)
  • Cancel orders
  • Fetch account balance
  • Trading analysis prompts
  • Order management guidance
  • Testnet support
  • Supports any exchange that CCXT supports
  • Cached exchange instances for better performance

Project Structure

src/ccxt_mcp/
├── __init__.py              # Main server file
├── utils/
│   └── exchange.py          # Exchange management with testnet support
├── tools/
│   ├── fetch_ticker.py      # Ticker data tool
│   ├── fetch_order_book.py  # Order book tool
│   ├── fetch_trades.py      # Trades tool
│   ├── create_order.py      # Order creation tool
│   ├── cancel_order.py      # Order cancellation tool
│   └── fetch_balance.py     # Balance fetching tool
└── prompts/
    ├── trading_analysis.py  # Trading analysis prompt
    ├── order_management.py  # Order management prompt
    └── testnet_guidance.py  # Testnet guidance prompt

Setup to run MCP server

Prerequisites:

These are instructions for Claude Desktop but this mcp server could be used for any MCP Client.

  1. Download github repo:
git clone https://github.com/pcriadoperez/ccxt-mcp.git
  1. Enter folder cd ccxt-mcp

  2. Install mcp server mcp install run.py

  3. Open Claude desktop -> Settings -> Developer -> Edit config

  • Add your env variables
  • You may have Replace in command you uv location (You can find it running which uv)
  • It should look like the below config
{
  "mcpServers": {
    "CCXT Trading Server": {
      "command": "/Users/pablo/.local/bin/uv",
      "args": [
        "run",
        "--with",
        "ccxt",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "/Users/pablo/github/ccxt-mcp-2/run.py"
      ],
      "env":{
          "BINANCE_APIKEY": "BINANCE_APIKEY",
          "BINANCE_SECRET": "BINANCE_SECRET"
      }
    }
  }
}
  1. Close and open claude

Setup for contributing

  1. Clone the repository:
git clone https://github.com/pcriadoperez/ccxt-mcp.git
cd ccxt-mcp
  1. Install dependencies:
uv pip install -e .
  1. Set up environment variables:
# Copy the example environment file
cp .env.example .env

# Edit .env with your API keys
# Add your exchange API keys in the format:
# {EXCHANGE_ID}_API_KEY=your_api_key
# {EXCHANGE_ID}_SECRET=your_secret

Dev usage

  1. Run the Dev MCP server:
mcp dev run.py

Security

  • Never commit your .env file
  • Use environment variables for API keys
  • Consider using a secrets management service for production
  • Testnet is recommended for development and testing

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
CursorThe AI Code Editor
WindsurfThe new purpose-built IDE to harness magic
Amap Maps高德地图官方 MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Tavily Mcp
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Playwright McpPlaywright MCP server
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.