home / mcp / ccxt mcp server

CCXT MCP Server

High-performance CCXT MCP server for cryptocurrency exchange integration

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "doggybee-mcp-server-ccxt": {
      "command": "mcp-server-ccxt",
      "args": [],
      "env": {
        "PROXY_URL": "http://username:[email protected]:8080",
        "USE_PROXY": "false",
        "KUCOIN_SECRET": "your_kucoin_secret",
        "BINANCE_SECRET": "your_api_secret",
        "KUCOIN_API_KEY": "your_kucoin_api_key",
        "BINANCE_API_KEY": "your_api_key",
        "DEFAULT_EXCHANGE": "binance",
        "KUCOIN_PASSPHRASE": "your_passphrase",
        "DEFAULT_MARKET_TYPE": "spot"
      }
    }
  }
}

You can connect language models to multiple cryptocurrency exchanges through a high‑performance MCP server that wraps CCXT. This server enables real‑time market data access and trading actions across many exchanges via a unified interface, making it easier to build intelligent trading assistants and analytics tools.

How to use

Use the CCXT MCP Server to bridge MCP clients with crypto exchange data and trading capabilities. You will run the server locally or remotely, then point your MCP client to its command or URL. The server exposes a set of tools to fetch market data, place orders, manage accounts, and retrieve exchange information, all through MCP endpoints.

How to install

Prerequisites: you need Node.js installed on your machine. You can verify your Node and npm versions after installation.

Option 1: Install via npm package (recommended)

# Install globally
npm install -g @mcpfun/mcp-server-ccxt

# Start the server
mcp-server-ccxt

Option 2: Run directly with npx (no global install)

# Run the server without installing globally
npx @mcpfun/mcp-server-ccxt

Option 3: Manual installation from source (clone, install, build, run)

# Clone the repository
git clone https://github.com/doggybee/mcp-server-ccxt.git
cd mcp-server-ccxt

# Install dependencies
npm install

# Build the server
npm run build

# Start the server
npm start

Additional configurations and startup notes

Create and customize environment settings to control which exchanges you connect to and how you authenticate. A typical environment file may define a default exchange, a default market type, and API keys for exchanges you plan to access.

Example startup note: you can start with the default exchange and market type, then rely on your API keys and optional proxy settings for production use.

Configuration and environment variables

Create and populate your environment configuration to enable exchange connections and optional proxy usage.

Basic environment you may copy and adapt is shown here for reference.

# Copy default environment example
cp .env.example .env

# Edit the environment file to add your credentials and preferences
# Default exchange (optional)
DEFAULT_EXCHANGE=binance

# Default market type (optional)
DEFAULT_MARKET_TYPE=spot

# API credentials (optional)
BINANCE_API_KEY=your_api_key
BINANCE_SECRET=your_api_secret

# For exchanges requiring passphrase (e.g., KuCoin)
KUCOIN_API_KEY=your_kucoin_api_key
KUCOIN_SECRET=your_kucoin_secret
KUCOIN_PASSPHRASE=your_kucoin_passphrase

# Proxy configuration (optional)
USE_PROXY=false
PROXY_URL=http://username:password@your-proxy-server:port

Troubleshooting and tips

If you encounter issues with MCP communication, restart the server after updating environment variables. Check that your API keys have the correct permissions and that your network allows outbound connections to the exchanges.

Security and risk notes

Treat API keys with care. Create dedicated keys per application, restrict permissions to read-only where possible, and avoid exposing keys in version control. Store credentials in a secure environment or vault and rotate keys periodically.

Performance and capabilities

The CCXT MCP Server uses an optimized caching layer and adaptive rate limiting to provide fast, reliable access to market data and trading operations across multiple exchanges.

Available tools

listExchanges

List all available cryptocurrency exchanges that the server can connect to via CCXT.

getTicker

Fetch current ticker information for a trading pair on a specified exchange.

getOrderBook

Retrieve the market order book for a trading pair on a given exchange.

getOHLCV

Obtain OHLCV candlestick data for a trading pair over a specified timeframe.

getTrades

Get recent trades for a trading pair on an exchange.

placeMarketOrder

Place a market order on an exchange (requires API keys).

placeLimitOrder

Place a limit order on an exchange (requires API keys).

cancelOrder

Cancel an existing order on an exchange (requires API keys).

getAccountBalance

Retrieve account balance from a connected exchange (requires API keys).

getExchangeInfo

Get status and information about a connected exchange.

setProxyConfig

Configure proxy settings for outbound requests.

setDefaultExchange

Set the default exchange used when none is specified in requests.