home / mcp / coinex mcp server

CoinEx MCP Server

Provides access to public market data and authenticated trading actions for CoinEx via MCP.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "coinexcom-coinex_mcp_server": {
      "url": "https://mcp.coinex.com/mcp",
      "headers": {
        "API_TOKEN": "YOUR_API_TOKEN",
        "API_SCOPES": "read write",
        "COINEX_ACCESS_ID": "YOUR_ACCESS_ID",
        "COINEX_SECRET_KEY": "YOUR_SECRET_KEY",
        "HTTP_AUTH_ENABLED": "true"
      }
    }
  }
}

You can run a CoinEx MCP (Model Context Protocol) server to let AI agents safely access public market data and, with credentials, perform authenticated actions such as checking balances or placing trades. This guide shows how to use the hosted online service or run a local MCP server, plus essential configuration and security tips so you can start querying markets, K-lines, order books, and trading endpoints quickly.

How to use

Choose your connection mode based on what you need. If you only want public market data, you can use the hosted online service. If you need authenticated actions like checking balances or placing orders, run a local MCP server and supply your CoinEx API credentials. Use HTTP mode for the hosted service and stdio (local) mode for a self-hosted server. Once connected, you can retrieve market lists, tickers, order books, K-line data, recent trades, and index prices, and you can enable trading tools to access account balance, place or cancel orders, and view order history.

Public market data endpoints do not require credentials. For authenticated operations, keep your API credentials secure and configure them in your MCP client. When running locally, you can enable HTTP authentication for the MCP endpoint to add a layer of protection for trading tools. Always prefer HTTPS in production and avoid exposing sensitive headers in logs or proxies.

How to install

Follow the installation paths that match your needs. You can use the online HTTP service, install locally via uvx/pip, or run from source.

Prerequisites to consider before you start: ensure you have a modern Python environment if you plan to run a local MCP server, and have a working Node.js/UVX setup if you choose the uvx route for zero-preinstall execution.

Installation Method 1: Online HTTP Service (Recommended)

No local installation is required. You access CoinEx MCP via the hosted service at the following URL.

Code to add the remote MCP using Claude (HTTP transport):

claude mcp add --transport http coinex-mcp-server https://mcp.coinex.com/mcp

Claude Desktop configuration for online service

Update Claude Desktop to point to the remote MCP endpoint.

{
  "mcpServers": {
    "coinex": {
      "command": "http",
      "args": ["https://mcp.coinex.com/mcp"]
    }
  }
}

CherryStudio configuration for online service

In CherryStudio, set the MCP server to the remote endpoint via its MCP settings.

Available tools

list_markets

Retrieve market status for spot or futures, with optional symbols; you can query all markets when symbols are not provided.

get_tickers

Get ticker snapshots for spot or futures; specify a symbol or get top entries when no symbol is provided.

get_orderbook

Fetch the order book (depth) for a symbol, supporting both spot and futures markets.

get_kline

Obtain K-line (candlestick) data for a symbol with a given period and limit for spot or futures.

get_recent_trades

Return recent trades for a symbol in spot or futures markets.

get_index_price

Get market index prices for spot or futures, with optional symbol(s).

get_funding_rate

Query the current funding rate for a futures symbol.

get_funding_rate_history

Retrieve historical funding rate data for a futures symbol within a time range.

get_premium_index_history

Fetch historic premium index values for a futures symbol.

get_basis_history

Retrieve historical basis history for a futures symbol.

get_position_tiers

Get margin tier information for a futures symbol.

get_liquidation_history

Obtain liquidation history for a symbol, with optional side and time range.

get_account_balance

Query account balances for authenticated users.

place_order

Place a trading order with the defined symbol, side, type, amount, and optional price.

cancel_order

Cancel an existing order by symbol and order ID.

get_order_history

Retrieve order history, including open and completed orders, for a symbol.