
Codex CCXT MCP
io.github.lucyfox199818-collabPublished by GitHub account lucyfox199818-collabv0.1.0Updated Oct 24, 2026
Dry-run-first CCXT MCP with market, account, derivatives, and guarded trading tools.
Overview
A local CCXT-based MCP server that gives an assistant read access to crypto exchange market and account data, plus guarded, dry-run-first trading tools.
- What you can do
- Read market data: markets, tickers, order books, trades, OHLCV, exchange status and time, currencies and fees, with a generic call for any CCXT method on the configured exchange instance. Read account data: balances, positions, leverage tiers, ledger, own trades, deposits, withdrawals and deposit addresses. Read derivatives data: funding rates and history, open interest, mark and index prices, and Binance USDT-M public long/short and taker sentiment endpoints. Query orders: open, closed, canceled and algo orders. Place, edit and cancel orders, including limit, market, trigger, stop-loss, take-profit, trailing, post-only and reduce-only variants and protected futures entries. Change account/f
- When to use it
- Use it when you want an assistant to inspect crypto exchange markets, balances, positions and order history, or to prepare and place orders on a CCXT-supported exchange, especially Binance. It suits users who want trading actions gated behind explicit opt-in and dry-run defaults.
- Requirements
- Runs locally over stdio, either as the published OCI image via Docker or from source with Node.js (npm install, build, then run the entry file). Optional Binance API key and secret are supplied through environment variables; exchange, market type, sandbox, proxy and IP-whitelist settings are also environment variables. Network access to the exchange and to an IP-check endpoint is needed.
Installation
In SourceWeft
- Open Codex CCXT MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
ccxt-mcp
ccxt-mcp 是一个独立的 MCP stdio 服务,用 CCXT 暴露加密货币交易所能力给 Codex 调用。默认交易关闭并启用 dry-run;需要真实下单时必须同时设置 CCXT_ENABLE_TRADING=true 和 CCXT_DRY_RUN=false。
MCP Registry 名称:io.github.lucyfox199818-collab/ccxt-mcp
公开 OCI 镜像:ghcr.io/lucyfox199818-collab/ccxt-mcp:0.1.0
功能
- 市场数据:markets、ticker、tickers、ticker summary、order book、trades、OHLCV、交易所状态、交易所时间、币种、手续费。
- 账户信息:accounts、balance/free/used/total balance、positions、ledger、my trades、充值/提现记录、充值地址、杠杆档位。
- 订单交易:普通下单/批量下单、查询订单、查询全部订单、编辑订单、撤单、批量撤单、全部撤单。
- 条件单和衍生品交易:trigger、stop loss、take profit、stop order、stop limit、stop market、trailing、post-only、reduce-only、TP/SL 组合单。
- 合约/资金费率:funding rate/history、open interest/history、mark price、mark/index/premium index OHLCV。
- Binance USDT-M 公共衍生品情绪数据:open-interest history、global long/short、top trader account/position long/short、taker buy/sell volume,均为只读免费公开数据端点。
- 账户变更:set leverage、margin mode、position mode、add/reduce/set margin、transfer、withdraw,全部走交易开关和 dry-run 保护。
- 通用能力:
ccxt_call可以调用当前交易所实例上存在的任意 CCXT 方法,包含 unified API 和 exchange-specific implicit API。 - 代理/IP:支持
TRADINGAGENTS_PROXY_URL或CCXT_PROXY_URL,并提供ccxt_proxy_ip检查当前出口 IP 是否命中配置的白名单 IP。 - Docker:支持构建成独立镜像,通过 stdio 运行 MCP。
环境变量
本地运行
Codex MCP stdio 配置示例:
Docker
直接运行公开镜像:
或从源码构建:
Docker MCP stdio 配置示例:
工具列表
当前显式注册 101 个 MCP tools;此外 ccxt_call 可以调用当前交易所实例上存在的任意 CCXT 方法。
基础和市场数据:
ccxt_get_configccxt_list_exchangesccxt_exchange_infoccxt_proxy_ipccxt_load_marketsccxt_fetch_currenciesccxt_fetch_statusccxt_fetch_timeccxt_fetch_tickerccxt_fetch_tickersccxt_fetch_ticker_summaryccxt_fetch_order_bookccxt_fetch_tradesccxt_fetch_ohlcvccxt_fetch_trading_feesccxt_fetch_trading_feeccxt_fetch_deposit_withdraw_feesccxt_fetch_deposit_withdraw_feeccxt_call
账户信息:
ccxt_fetch_accountsccxt_fetch_balanceccxt_fetch_free_balanceccxt_fetch_used_balanceccxt_fetch_total_balanceccxt_fetch_positionsccxt_fetch_positions_for_symbolccxt_fetch_positions_riskccxt_fetch_positions_historyccxt_fetch_leverageccxt_fetch_leveragesccxt_fetch_leverage_tiersccxt_fetch_market_leverage_tiersccxt_fetch_ledgerccxt_fetch_ledger_entryccxt_fetch_my_tradesccxt_fetch_order_tradesccxt_fetch_deposit_addressccxt_fetch_deposit_addressesccxt_fetch_deposit_addresses_by_networkccxt_fetch_depositsccxt_fetch_withdrawalsccxt_fetch_deposits_withdrawalsccxt_fetch_borrow_interest
订单和条件单:
ccxt_fetch_orderccxt_fetch_ordersccxt_fetch_open_ordersccxt_fetch_open_algo_ordersccxt_cancel_algo_orderccxt_cancel_all_algo_ordersccxt_fetch_closed_ordersccxt_fetch_canceled_ordersccxt_fetch_canceled_and_closed_ordersccxt_create_orderccxt_create_ordersccxt_edit_orderccxt_edit_ordersccxt_cancel_orderccxt_cancel_ordersccxt_cancel_all_ordersccxt_cancel_all_orders_afterccxt_cancel_orders_for_symbolsccxt_create_limit_orderccxt_create_market_orderccxt_create_trigger_orderccxt_create_stop_loss_orderccxt_create_take_profit_orderccxt_create_protected_futures_entryccxt_create_order_with_take_profit_and_stop_lossccxt_create_trailing_amount_orderccxt_create_trailing_percent_orderccxt_create_stop_orderccxt_create_stop_limit_orderccxt_create_stop_market_orderccxt_create_post_only_orderccxt_create_reduce_only_order
Binance USDT-M close-position 保护单默认会跳过同合约、同方向、同仓位方向的重复
STOP_MARKET / TAKE_PROFIT_MARKET algo 单。需要替换已有保护单时,在创建请求的
params 里显式传 replaceExistingClosePosition: true;工具会先取消匹配的旧 algo 单,
再提交新的 close-position 保护单,并返回撤单和新单结果。
Binance USDT-M protected entry 应优先使用 ccxt_create_protected_futures_entry。该工具会先提交
close-position 止损和止盈 algo 保护单,再提交入场单;如果任一保护单或入场单创建失败,会撤销已经
接受的保护单并返回失败阶段。对 Binance futures 调用
ccxt_create_order_with_take_profit_and_stop_loss 时,服务端也会自动走同一条保护优先路径,避免直通
CCXT 当前不支持的 createOrderWithTakeProfitAndStopLoss。
Binance USDT-M hedge mode 下,关闭 positionSide=LONG / SHORT 的普通订单不应向交易所提交
reduceOnly 参数。服务端会在普通下单工具里自动移除该参数;ccxt_create_reduce_only_order 在此场景下
会改走 createOrder 并保留 positionSide,避免 Binance 返回 -1106 Parameter 'reduceonly' sent when not required。
合约和账户变更:
ccxt_fetch_funding_rateccxt_fetch_funding_ratesccxt_fetch_funding_rate_historyccxt_fetch_funding_historyccxt_fetch_open_interestccxt_fetch_open_interestsccxt_fetch_open_interest_historyccxt_fetch_binance_derivatives_sentimentccxt_fetch_binance_global_long_short_account_ratioccxt_fetch_binance_top_long_short_account_ratioccxt_fetch_binance_top_long_short_position_ratioccxt_fetch_binance_taker_long_short_ratioccxt_fetch_binance_open_interest_histccxt_fetch_mark_priceccxt_fetch_mark_pricesccxt_fetch_mark_ohlcvccxt_fetch_index_ohlcvccxt_fetch_premium_index_ohlcvccxt_set_leverageccxt_set_margin_modeccxt_set_position_modeccxt_add_marginccxt_reduce_marginccxt_set_marginccxt_transferccxt_withdraw
所有 mutating 工具都会经过交易开关。默认返回 dry-run,不会真实请求下单、撤单、改杠杆、划转或提现类操作。
联系方式
- 微信:
mypcwza - Telegram:
mypcwza
Source: ccxt-mcp/README.md at commit 04b7c7a
Tools
0Version history
1- v0.1.0LatestSep 16, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.
