ccxt-mcp-server

ccxt-mcp-server

2

CCXT MCP Server is a project enabling language models to interact with cryptocurrency exchanges via a Model Context Protocol (MCP) server. It supports asynchronous operations and provides tools for both public data and private account management. The server is equipped with clear tool definitions, authentication handling, and robust integration with the CCXT library.

CCXT MCP Server

This project provides a Model Context Protocol (MCP) server using the CCXT library to interact with cryptocurrency exchanges. It facilitates tasks like fetching balances, market data, creating orders, and more, asynchronously. Built with FastMCP, it simplifies creating MCP servers in Python.

Features

  • CCXT Integration: Wraps common CCXT functions.
  • Asynchronous: Built with asyncio and ccxt.async_support.
  • Clear Tool Definitions: Uses typing.Annotated and pydantic.Field.
  • Authentication Handling: Supports API key and secret authentication.
  • Public & Private Tools: Provides both public and private tools.

Available MCP Tools

Tools Requiring API Authentication (Private)

  • Fetch account balance, deposit address, withdraw cryptocurrency, open positions, set trading leverage, create spot and futures orders, cancel orders, fetch order and trade history.

Tools for Public Data (No Authentication Required)

  • Fetch OHLCV, funding rate, long/short ratio, option contract data, market ticker, public trades, technical indicator calculations.

Usage Notes

  • Ensure correct configuration for futures/options.
  • fetch_long_short_ratio requires specific exchange method names and parameters.
  • Tools return error details if issues occur during CCXT calls.