Get the FREE Ultimate OpenClaw Setup Guide →

ccxt

MCP server from jcwleo/ccxt-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jcwleo-ccxt-mcp-server python -m uvicorn mcp_server:app --port 8000

How to use

The CCXT MCP Server exposes a set of CCXT library functions as MCP tools that you can call from an LLM or other MCP clients. It provides both public data endpoints (no API keys required) and private account actions (authenticated with your exchange API key/secret/passphrase). Tools are defined with clear parameter metadata using typing.Annotated and Pydantic, so you can see required fields, defaults, and constraints when constructing requests. Typical use involves sending an MCP request to the server to invoke a specific tool (for example, fetch_ohlcv for historical price data or fetch_account_balance for private balances) and receiving a structured response that includes data or an error field if something goes wrong. The server runs asynchronously, leveraging aiohttp/ccxt.async_support to keep calls non-blocking while you compose multi-step trading or data-fetching workflows.

To use the tools, connect your MCP client to the server endpoint (by default http://127.0.0.1:8000/mcp/ or your configured host/port) and call the desired tool name with the appropriate parameters. Private tools such as fetch_account_balance, fetch_deposit_address, withdraw_cryptocurrency, create_spot_limit_order, and others require you to supply valid exchange API credentials in the tool parameters or via environment configuration as supported by the server. Public tools like fetch_ohlcv, fetch_market_ticker, fetch_public_market_trades, and calculate_technical_indicator_tool can be used without keys. The server includes guidance on parameter shapes via tool metadata, so you can construct requests without needing to inspect the underlying CCXT implementation directly.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Optional: a virtual environment tool (venv, conda, etc.)
  1. Clone the repository and navigate to the project folder git clone https://github.com/jcwleo/ccxt-mcp-server.git cd ccxt-mcp-server

  2. Create and activate a virtual environment (recommended) python -m venv .venv source .venv/bin/activate # On Windows use .venv\Scripts\activate

  3. Install dependencies pip install -r requirements.txt

  4. Run the server (example using uvicorn via Python) python -m uvicorn mcp_server:app --port 8000

  5. Verify the server starts and is reachable at http://127.0.0.1:8000/mcp/

Notes:

  • If you prefer an alternative launcher, you can adapt the run command to your environment manager (Docker, tmux, etc.).

Additional notes

Tips and common considerations:

  • For futures/derivatives tools, ensure you configure the exchange client with the correct market type through CCXT or the tool’s params (e.g., defaultType in options).
  • The server distinguishes between public (no API keys) and private (requires authentication) tools; keep API keys secure and avoid exposing them in logs.
  • When using non-standard endpoints (e.g., fetch_long_short_ratio), you may need to pass exchange-specific method names and parameters within the tool’s params field as described in the tool metadata.
  • Errors from CCXT are surfaced in the response under an "error" key; check this field to diagnose issues with API requests or authentication.
  • If you deploy behind a reverse proxy or in a container, configure the port and host binding accordingly and ensure the MCP client can reach the /mcp/ path.

Related MCP Servers

Sponsor this space

Reach thousands of developers