coinex_mcp_server
CoinEx MCP Server A Model Context Protocol (MCP) server that enables AI agents to interact seamlessly with the CoinEx cryptocurrency exchange.
What it can do
- Get Ticker: Get trading pair's recent price, 24h price and volume information (spot). Parameters: - base: Optional, base currency like "BTC", "ETH". When not provided, returns top 5 entries. - quote:
- Get Orderbook: Get order book (depth) information (supports spot/futures). Parameters: - base: Required, base currency. Example: "BTC", "ETH". - quote: Optional, quote currency, default "USDT". - limi
- Get Kline: Get K-line data (supports spot/futures). Parameters: - base: Required, base currency. Example: "BTC", "ETH". - quote: Optional, quote currency, default "USDT". - period: Optional, K-line pe
What data it sees
Do you need an account
No: the server works without sign-in
CoinEx MCP Server
A Model Context Protocol (MCP) server that enables AI agents to interact seamlessly with the CoinEx cryptocurrency exchange. This server provides comprehensive access to market data, trading operations, and account management through a standardized MCP interface.
Key Features
- Market Data Access: Retrieve real-time tickers, order books, K-lines, and recent trades for both spot and futures markets
- Futures Analytics: Access funding rates, premium indices, basis history, position tiers, and liquidation data
- Account Management: Query account balances and manage trading positions
- Order Operations: Place, cancel, and track orders with full history access
- Flexible Deployment: Supports multiple transport protocols (stdio, HTTP, SSE) for various integration scenarios
Quick Start
Installation via http (Recommended)
just add this url https://mcp.coinex.com/mcp to your mcp configuration in agent. for example, use this command to add it to your claude code:
claude mcp add --transport http coinex-mcp-server https://mcp.coinex.com/mcp
Installation via uvx (Support get balance / place order by API key)
Configure your MCP client (e.g., Claude Desktop) with the following JSON:
{
"mcpServers": {
"coinex": {
"command": "uvx",
"args": ["coinex-mcp-server"],
"env": {
"COINEX_ACCESS_ID": "your_access_id_here",
"COINEX_SECRET_KEY": "your_secret_key_here"
}
}
}
}
HTTP Mode Deployment by source code
install
pip install coinex-mcp-serverstart the server in HTTP mode:
python -m coinex_mcp_server.main --transport http --host 127.0.0.1 --port 8000 --path /mcp --enable-http-auth
Pass credentials via HTTP headers:
X-CoinEx-Access-Id:X-CoinEx-Secret-Key:
Usage Examples
- Get Market Tickers:
list_markets(market_type="spot")orget_tickers(symbol="BTCUSDT") - Query Order Book:
get_orderbook(symbol="BTCUSDT", limit=20) - Check Account Balance:
get_account_balance() - Place Order:
place_order(symbol="BTCUSDT", side="buy", type="limit", amount="0.01", price="50000")
Security Notes
⚠️ Important:
- Never expose HTTP authentication in public services
- Deploy with HTTPS/TLS in production environments
How to connect
How to connect coinex_mcp_server to Claude
The server address to paste into Claude settings:
https://coinex_mcp_server--helix-song.run.tools
- Open Claude (claude.ai or the desktop app).
- Go to Settings → Connectors.
- Click Add custom connector.
- Paste the server address copied below into Remote MCP server URL and click Add.
- In a chat, click + → Connectors and switch the new connector on.
Custom connectors are available on Free, Pro, Max, Team and Enterprise plans (Free is limited to one). On Team and Enterprise an organization Owner adds the connector first under Organization settings → Connectors.
Authorization
After you click Add, a sign-in window for the service opens. Sign in with your own account and approve access. Claude never sees your password.
How to connect coinex_mcp_server to ChatGPT
The server address to paste into ChatGPT settings:
https://coinex_mcp_server--helix-song.run.tools
- Open ChatGPT in a browser (chatgpt.com). A Plus, Pro, Business, Enterprise or Edu plan is required.
- Turn on developer mode once: Settings → Apps → Advanced settings → Developer mode.
- Open Settings → Connectors and click Create.
- Fill in the form: Name (anything), Description (one line about what the service does), MCP server URL (copy it below).
- Under Authentication choose OAuth if the service requires sign-in, otherwise None. Click Create.
- In a new chat open + → Apps/Connectors and enable the connector.
OpenAI has renamed this section before (Connectors → Apps/Plugins). If the label differs, search settings for "developer mode". On Business/Enterprise workspaces an admin must allow custom connectors first.
Authorization
On first use ChatGPT opens the service's sign-in window. Sign in and approve access.
How to connect coinex_mcp_server to Cursor
The server address to paste into Cursor settings:
https://coinex_mcp_server--helix-song.run.tools
Fastest: click Open in Cursor below and confirm the prompt.
Manually:
- In Cursor open Settings → Cursor Settings → MCP and click Add new global MCP server.
- Paste the JSON copied below into
~/.cursor/mcp.json(per project:.cursor/mcp.jsonin the repo root). - Save the file. The server appears in the MCP list; authorize it there if asked.
Authorization
If the service needs sign-in, an authorize button appears next to the server in the MCP list.
Server tool list (12)
Raw names from tools/list. Only developers need these.
| get_ticker | Get trading pair's recent price, 24h price and volume information (spot). Parameters: - base: Optional, base currency like "BTC", "ETH". When not provided, returns top 5 entries. - quote: Optional, quote currency, default "USDT". Returns: {code, message, data}; when base is not provided, only returns top 5 items. |
| get_orderbook | Get order book (depth) information (supports spot/futures). Parameters: - base: Required, base currency. Example: "BTC", "ETH". - quote: Optional, quote currency, default "USDT". - limit: Optional, number of price levels to return, default 20; valid values: [5, 10, 20, 50]. - market_type: Optional, market type, default "spot"; valid values: "spot" | "futures". - interval: Optional, merge granularity, default "0"; valid values include "0", "0.00000001", ..., "1", "10", "100", "1000" (according to official documentation). Returns: {code, message, data}. |
| get_kline | Get K-line data (supports spot/futures). Parameters: - base: Required, base currency. Example: "BTC", "ETH". - quote: Optional, quote currency, default "USDT". - period: Optional, K-line period, default "1hour"; - Spot/futures common period whitelist: "1min","5min","15min","30min","1hour","4hour","1day","1week". - limit: Optional, number of records, default 100. - market_type: Optional, market type, default "spot"; options: "spot" | "futures". Error: When period is not in whitelist, returns {code:-1, message:"Unsupported time period"}. Returns: {code, message, data}. |
| list_markets | List market status (spot/futures). Parameters: - market_type: Optional, default "spot"; options: "spot" | "futures". - base: Optional, base currency to filter. - quote: Optional, quote currency, default "USDT". Returns: {code, message, data} (list). |
| get_deals | Get recent trades (deals). Parameters: - base: Required, base currency. - quote: Optional, quote currency, default "USDT". - market_type: Optional, default "spot"; options: "spot" | "futures". - limit: Optional, return quantity, default 100, max 1000 (per official documentation). Returns: {code, message, data} (list). |
| get_index_price | Get market index price (spot/futures). Supports batch; returns top N entries when base not provided. Parameters: - market_type: Optional, default "spot"; options: "spot" | "futures". - base: Optional, base currency; returns multi-market index when not provided. - quote: Optional, quote currency, default "USDT". - top_n: Optional, only effective when base not provided; default 5. Returns: {code, message, data}. |
| get_funding_rate | Get current funding rate (futures only). Parameters: - base: Required, futures base currency, e.g. "BTC", "ETH". - quote: Optional, quote currency, default "USDT". Returns: {code, message, data}. |
| get_funding_rate_history | Get funding rate history (futures only). Parameters: - base: Required, futures base currency. - quote: Optional, quote currency, default "USDT". - start_time: Optional, start timestamp (milliseconds). - end_time: Optional, end timestamp (milliseconds). - page: Optional, default 1. - limit: Optional, default 100. Returns: {code, message, data}. |
| get_premium_index_history | Get premium index history (futures only). Parameters: - base: Required, futures base currency. - quote: Optional, quote currency, default "USDT". - start_time: Optional, start timestamp (milliseconds). - end_time: Optional, end timestamp (milliseconds). - page: Optional, default 1. - limit: Optional, default 100. Returns: {code, message, data}. |
| get_basis_history | Get basis history (futures only). Parameters: - base: Required, futures base currency. - quote: Optional, quote currency, default "USDT". - start_time: Optional, start timestamp (milliseconds). - end_time: Optional, end timestamp (milliseconds). - page: Optional, placeholder parameter (currently unused by client). - limit: Optional, placeholder parameter (currently unused by client). Returns: {code, message, data}. |
| get_margin_tiers | Get margin tiers/ position levels (futures only). Parameters: - base: Required, futures base currency. - quote: Optional, quote currency, default "USDT". Returns: {code, message, data}. |
| get_liquidation_history | Get liquidation history (futures only). Parameters: - base: Required, futures base currency. - quote: Optional, quote currency, default "USDT". - start_time: Optional, start timestamp (milliseconds). - end_time: Optional, end timestamp (milliseconds). - page: Optional, page number, default 1. - limit: Optional, number of records, default 100. Returns: {code, message, data}. |