跳到正文
Skillpedia
连接器(MCP)45k · #6383

ccxt-mcp

它能做什么

这个技能说明如何安装和设置 CCXT MCP 服务器。它让 AI 智能体通过本地连接读取市场数据和余额,并可选择性地进行交易。适合希望 AI 安全地使用其交易所账户的人。

适用场景

  • ✓当你希望 Claude 或 Cursor 中的 AI 助手读取交易所市场数据的时候。
  • ✓当你想设置命名的交易所账户,又不想把密钥交给 AI 的时候。
  • ✓当你想在使用真实账户前,先在沙盒或测试网上测试交易的时候。

技能链接

https://github.com/ccxt/ccxt/blob/master/.claude/skills/ccxt-mcp/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ccxt/ccxt/blob/master/.claude/skills/ccxt-mcp/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在 Claude Code 中设置 CCXT MCP 服务器,好让我查看我的交易所余额?”

每周 5 个新技能,1 分钟读完。

工作原理

你把服务器添加到 AI 工具的配置中,并把 API 密钥保存在本地。之后 AI 按账户名称调用交易所工具,而看不到密钥本身。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

CCXT MCP Server

ccxt-mcp is the official CCXT Model Context Protocol server. It runs locally over stdio and lets an AI agent (Claude Desktop/Code, Cursor, VS Code, Windsurf, …) use the unified CCXT API across 100+ crypto exchanges and prediction markets.

Key property: your API keys stay on your machine and the model never sees them. Tools reference accounts by a name you choose; credentials are never tool parameters and never appear in results.

Install

Requires Node.js ≥ 18. Pick the host:

  • Claude Code: claude mcp add ccxt -- npx -y ccxt-mcp
  • Claude Desktop / Cursor / Windsurf — add to the host's MCP config:
    { "mcpServers": { "ccxt": { "command": "npx", "args": ["-y", "ccxt-mcp"] } } }
    
  • VS Code (.vscode/mcp.json) — use inputs for encrypted key storage:
    {
      "inputs": [
        { "id": "binance-key", "type": "promptString", "password": true },
        { "id": "binance-secret", "type": "promptString", "password": true }
      ],
      "servers": { "ccxt": {
        "command": "npx", "args": ["-y", "ccxt-mcp"],
        "env": { "BINANCE_APIKEY": "${input:binance-key}", "BINANCE_SECRET": "${input:binance-secret}" }
      } }
    }
    
  • Non-technical / Claude Desktop: a signed .mcpb desktop-extension bundle installs by drag-and-drop and stores keys in the OS keychain.

With no configuration the server already serves public market data on every exchange — a useful install on its own.

Configure accounts

To use private data or trading, create the config file (its path is 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 set CCXT_MCP_CONFIG to any path.
{
  "accounts": {
    "binance-testnet": {
      "exchange": "binance",
      "apiKey": "…", "secret": "…",
      "sandbox": true,          // testnet — trades fake money; recommended first stop
      "trading": true           // "true" enables trading on SANDBOX/DEMO accounts only
    },
    "binance-main": {
      "exchange": "binance",
      "apiKey": "…", "secret": "…",
      "trading": "live",        // live trading requires the explicit string "live"…
      "maxOrderValue": 250,     // …and a per-order USD cap you author (null = opt out)
      "maxDailyValue": 1000,    // optional rolling-24h cap
      "allowedSymbols": ["BTC/USDT", "ETH/*"],  // optional strict allowlist
      "confirm": "live"         // always (every order) | live (default: only LIVE accounts; sandbox/demo execute WITHOUT a confirm step) | never
    },
    "polymarket-main": { "exchange": "polymarket", "walletAddress": "0x…", "privateKey": "0x…" }
  }
}

Any credential the exchange needs works (apiKey, secret, password, uid, walletAddress, privateKey, …), plus sandbox/demo, defaultType, options, and prediction: true for exchanges that exist in both crypto and prediction namespaces (e.g. hyperliquid). chmod 600 the file. Env vars also work: <EXCHANGEID>_<CREDENTIAL> (e.g. BINANCE_APIKEY, OKX_PASSWORD) fill missing fields, and CCXT_MCP_EXCHANGE/CCXT_MCP_APIKEY/CCXT_MCP_SECRET/CCXT_MCP_SANDBOX/CCXT_MCP_TRADING define a single account named default. The accounts map holds as many exchanges/accounts as you want — one entry each.

On Claude Desktop the .mcpb install form has fields for a single exchange plus a Config file picker — point that at a config.json (as above) to configure multiple exchanges, or create the file at the default path and leave the form blank.

Capability tiers (opt-in, off by default)

Tier What it enables How to turn it on
market tickers, order books, OHLCV, trades, market search, prediction events, raw GET endpoints on by default, no keys
read balances, orders, own trades, positions configure an account
trading create/edit/cancel orders, leverage, margin per-account "trading": true (sandbox) or "live"
funds withdraw, transfer, deposit addresses per-account "funds": true or "live"
implicitWrites raw POST/PUT/DELETE endpoints per-account "implicitWrites": true

Tiers can only be enabled by the user editing the config file — never from the conversation, and there is no to

常见问题

AI 能看到我的 API 密钥吗?

不能。技能说明,密钥保存在你的电脑上,模型从不会看到它们。

安装它需要什么?

技能说明需要 Node.js 18 或更高版本,服务器通过 npx 运行。

它支持交易吗?

支持,但属于需要主动开启的功能,并带有安全防护,同时提供沙盒或测试网模式。

详情

作者的原始描述

Official CCXT MCP (Model Context Protocol) server — connect an AI agent to 100+ cryptocurrency exchanges and prediction markets for market data, balances, and opt-in trading. Covers installing the server in Claude Desktop/Code, Cursor, VS Code and other MCP hosts; configuring named accounts and API keys (kept local, never seen by the model); the capability tiers and safety rails; sandbox/testnet trading; and how to drive the tools. Use when the user wants an agent to fetch prices/order books/candles, check balances/orders/positions, place or cancel orders, or explore prediction markets across

repo: ccxt/ccxt

热度

GitHub 星标
45k
排名
#6383
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能