
CCXT
io.github.ccxt由 GitHub 账号 ccxt 发布v0.1.3更新于 Oct 24, 2026
Official CCXT MCP server - Market data and trading across 100+ exchanges and prediction markets
概览
CCXT 官方 MCP 服务器,让助手获取 100 多家加密货币交易所和预测市场的公开行情,并可选读取账户与交易。
- 可以做什么
- 浏览交易所与方法,搜索市场和预测事件,读取行情、订单簿、K 线与成交,并调用只读原始 GET 接口和查看安全状态。通过 WebSocket 订阅实时数据:行情、订单簿、余额、持仓以及成交或订单事件,再读取最新更新或等待下一次变化。配置账户后可读取余额、未完成订单、自有成交和持仓。在配置文件中按账户启用后,可下单、改单、撤单、设置杠杆与保证金模式,并调用白名单内的写入方法。另行启用后可提币、划转、获取充值地址,或调用原始写入类接口。
- 适用场景
- 适合让助手在对话中调研加密市场、比较交易所,或监控实时价格和订单簿。也适合查看余额与持仓,或在沙盒中交易,以及在你主动启用后进行实盘订单管理。
- 运行要求
- 以 stdio 运行的本地进程,需要 Node.js 18 或更高版本,通过 npx 启动。公开行情无需任何配置。私有读取需要在配置文件中添加账户(各系统有默认路径,也可用 CCXT_MCP_CONFIG 指定),或设置按交易所命名的环境变量,如 BINANCE_APIKEY 和 BINANCE_SECRET。需要能访问交易所的网络,部分交易所存在地区限制。
安装
在 SourceWeft 中
- 打开 控制台中的 CCXT,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ccxt-mcp — official CCXT MCP server
Connect AI agents (Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, and any MCP host) to 100+ cryptocurrency exchanges and prediction markets through the unified ccxt API: market data, account balances, order management, and — when you explicitly enable it — trading.
Security model (read this first)
Your API keys stay on your machine, and the AI model never sees them:
- The server runs locally over stdio. Nothing is hosted; keys never transit any third-party service.
- Credentials are never tool parameters: no tool schema accepts a key, so neither the model nor a prompt-injected page can supply, request, or change them. Tools reference accounts by name ("binance-main").
- Keys leave the process only inside signed HTTPS requests to the exchange itself — the same as any trading bot.
- Every tool result, error, and log line passes a redaction filter holding your loaded secret values (some exchanges echo signed URLs in error bodies — that path is closed). Raw request URLs/headers/bodies are never emitted.
verboseis force-disabled. - Capability tiers are opt-in and file-owned. Out of the box the server does public market data only. Configuring an account enables private reads.
trading,funds(withdraw/transfer), andimplicitWrites(raw endpoints) must each be enabled per account in the config file — there is no tool that edits config, so a conversation can never grant itself permissions. Unregistered tiers do not even appear in the tool list. - Writes are previewed and confirmed (native confirmation form where the host supports elicitation, otherwise an explicit preview + confirm-token round-trip), validated against market limits and your notional caps, and journaled to an append-only audit log.
Recommended exchange-side backstops (they hold even if your machine is compromised): create API keys with withdrawal permission disabled and an IP allowlist.
One honest caveat: any local agent with filesystem access could read the config file with its own tools — that is governed by your MCP host's permission model, not by this server. Prefer your host's secret storage where available (see below), keep the file chmod 600, and consider a deny rule for the path in your host's settings.
Install
Requires Node.js ≥ 18. The npm package is ccxt-mcp; the server binary is npx -y ccxt-mcp.
Claude Code
Or per-project via .mcp.json (safe to commit — no secrets):
Claude Desktop
Add to claude_desktop_config.json (Settings → Developer → Edit Config):
Cursor
~/.cursor/mcp.json (or .cursor/mcp.json per project):
VS Code
.vscode/mcp.json — VS Code's inputs mechanism stores values in encrypted secret storage, the best option for keys among the JSON-config hosts:
Windsurf
~/.codeium/windsurf/mcp_config.json — same mcpServers shape as Claude Desktop; ${env:VAR} interpolation is supported.
Configuration
With no configuration the server serves public market data on all exchanges — that alone is a useful install.
To add accounts, create the config file (path shown by the get_safety_status tool):
- macOS:
~/Library/Application Support/ccxt-mcp/config.json - Linux:
~/.config/ccxt-mcp/config.json - Windows:
%APPDATA%\ccxt-mcp\config.json - Or point
CCXT_MCP_CONFIGat any path (a legacy per-exchangekeys.local.jsonshape also loads).
Account fields: any credential from the exchange's requiredCredentials (apiKey, secret, password, uid, walletAddress, privateKey, …), sandbox/demo, defaultType, options (ccxt constructor options), prediction: true (for exchanges that exist in both the crypto and prediction namespaces, e.g. hyperliquid), and the safety switches below. chmod 600 the file; the server warns otherwise (or refuses with "settings": {"strictPermissions": true}).
Environment variables work too: <EXCHANGEID>_<CREDENTIAL> (e.g. BINANCE_APIKEY, OKX_PASSWORD) fill missing credentials, and the CCXT_MCP_EXCHANGE/CCXT_MCP_APIKEY/CCXT_MCP_SECRET/CCXT_MCP_SANDBOX/CCXT_MCP_TRADING set defines a single account named default.
Claude Desktop (.mcpb bundle): the install form configures one exchange. To use several exchanges (or enable live trading/withdrawals), set the Config file field to a config.json with an accounts map like the one above — or just create it at the default path and leave the form fields blank.
Capability tiers
"trading": true deliberately works only on sandbox/demo accounts; live trading requires typing "trading": "live" and deciding a maxOrderValue (a number, or explicitly null to opt out). The same pattern applies to funds with maxTransferValue. Activating a tier is your responsibility — the server's job is honest gates, confirmation, and the audit journal (<cache-dir>/ccxt-mcp/journal/).
Tools
market — list_exchanges, describe_exchange, describe_method (search/signatures/per-exchange params + docs links), search_markets, get_tickers, get_orderbook, get_ohlcv, get_trades, search_events (prediction markets), call_read_method (any unified fetch*/load* — structurally read-only), call_implicit_get (raw GET endpoints), get_safety_status, fetch_route (best execution route for converting an asset at a given size across ~50 exchanges, via the CCXT order router — a quote, no keys needed).
live (WebSocket) — watch_subscribe opens a background ccxt.pro stream; watch_read returns fresh data. State streams are snapshots of "what is X right now" — watchTicker(s), watchOrderBook(ForSymbols), watchOHLCV, watchBalance, watchPositions, watchBidsAsks, watchMarkPrice(s): the server merges live updates into the full current set, so watch_read always returns every subscribed symbol in latest (a multi-symbol stream never shows just the one that last ticked). Event streams are logs — watchTrades and the private watchOrders/watchMyTrades/watch(My)Liquidations (private need an account): watch_read returns new items oldest-first in events with a cursor. Pass waitForChange: true to watch_read to block until the next update (or timeout) instead of polling — the efficient way to wait for a fill or position change. watch_unsubscribe stops it; watch_list shows active streams. The long-lived server holds the socket so the agent always has fresh data; idle streams auto-stop after 10 minutes.
read — list_accounts, get_balance, get_orders, get_my_trades, get_positions.
trading — create_order, edit_order, cancel_order, cancel_all_orders, set_leverage, set_margin_mode, call_write_method (allowlisted long tail: margin/position/batch-cancel ops), execute_route (executes a fetch_route result with ccxt's OrderRouter across your accounts — every order still bound by that account's caps, symbol lists and confirmation).
funds — withdraw, transfer, get_deposit_address. implicitWrites — call_implicit_write.
Every list result is capped and paginated to fit host context limits (with in-band truncation notices); the raw info payload is stripped by default. Prediction exchanges use the same tools with outcome handles (from search_events) in the symbol position.
Troubleshooting
- "Trading is not enabled for account …" — edit the config file (see tiers above); this is not something the conversation can change.
- AUTH_FAILED on a sandbox account — testnet keys come from the exchange's testnet portal, not your live account (and vice versa).
- HTTP 451 / geo-blocks — some exchanges block cloud/VPN/US IPs; set a proxy via account
optionsif needed. - Slow first call on a big exchange — the initial
loadMarkets()can take seconds; it is cached on disk for 24h afterwards. npx @modelcontextprotocol/inspector npx -y ccxt-mcpopens an interactive tool console.
Development (inside the ccxt monorepo)
See DESIGN.md for the architecture, the prior-art analysis this server is built on, and the decision log.
来源:mcp/README.md,提交 fb16540
工具
0版本历史
1- v0.1.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分