CCXT MCP Server
CCXT MCP サーバー
MCP (モデルコンテキストプロトコル) と CCXT を使用した高性能暗号通貨交換統合。
特徴
🚀取引所サポート:20以上の暗号通貨取引所に接続
🔃市場タイプ:スポット、先物、スワップ市場などをサポート
🔧プロキシ設定:プロキシ経由で取引所にアクセスするためのオプション
📊高速で信頼性が高い:最適化されたキャッシュとレート制限
🌐 MCP 標準: MCP を介して Claude や GPT などの LLM と互換性があります
Related MCP server: binance-futures-mcp
CCXT MCP サーバー統合アーキテクチャ
CCXT MCPサーバーは、モデルコンテキストプロトコルを介して言語モデルと暗号通貨取引所を接続します。これは、LLMがリアルタイムの市場データにアクセスし、統合APIを介して複数の取引所間で取引操作を実行できるようにするブリッジとして機能します。
アーキテクチャには以下が含まれます。
リクエストを送信するLLMクライアント(Claudeおよびその他のMCP互換モデル)
通信を標準化するモデルコンテキストプロトコル(MCP)
リクエストを処理し、交換のやり取りを管理するCCXT MCPサーバー
取引所APIへの統一されたアクセスを提供するCCXTライブラリ
複数の暗号通貨取引所への接続
CCXT MCP サーバーコードアーキテクチャ
サーバーは、保守性と拡張性を向上させるために 3 つの主要モジュールで構成されています。
Exchange : Exchangeインスタンス、資格情報、シンボル検証を管理します
ユーティリティ: キャッシュ、レート制限、ログ機能を提供します
ツール: 交換インタラクションのためのMCPツールとリソースを実装します
クイックスタート
Smithery経由でインストール
Smithery経由で Claude Desktop 用の mcp-server-ccxt を自動的にインストールするには:
npx -y @smithery/cli install @doggybee/mcp-server-ccxt --client claudeNPM パッケージ (推奨)
CCXT MCP サーバーは npm からインストールできます。
# Install globally
npm install -g @mcpfun/mcp-server-ccxt
# Start the server
mcp-server-ccxtまたは直接実行します:
npx @mcpfun/mcp-server-ccxt手動インストール
あるいは、リポジトリをクローンしてビルドすることもできます。
# Clone the repository
git clone https://github.com/doggybee/mcp-server-ccxt.git
cd mcp-server-ccxt
# Install dependencies
npm install
# Build the server
npm run build
# Start the server
npm start構成
環境ファイルを作成する
cp .env.example .env.envファイルを編集して、Exchange APIキーを追加します。# Default exchange (optional) DEFAULT_EXCHANGE=binance # Default market type (optional) DEFAULT_MARKET_TYPE=spot # API credentials (optional) BINANCE_API_KEY=your_api_key BINANCE_SECRET=your_api_secret # Proxy configuration (optional) USE_PROXY=false PROXY_URL=http://username:password@your-proxy-server:port # Legacy format (still supported but recommended to use the integrated URL format above) # PROXY_USERNAME= # PROXY_PASSWORD=
使用法
注: MCP 通信で問題が発生した場合は、トラブルシューティング ガイドで解決策を確認してください。
サーバーの実行
サーバーを起動します。
# If installed globally via npm
mcp-server-ccxt
# If installed manually
npm startClaude for Desktop と併用
claude_desktop_config.jsonにサーバーを追加します。
npm 経由でインストールした場合 (グローバル):
{
"mcpServers": {
"ccxt": {
"command": "mcp-server-ccxt"
}
}
}手動でインストールする場合:
{
"mcpServers": {
"ccxt": {
"command": "node",
"args": [
"/path/to/mcp-server-ccxt/build/index.js"
]
}
}
}デスクトップ版のClaudeを再起動
別のプロジェクトでモジュールとして使用する
このパッケージを独自の Node.js プロジェクトのモジュールとして使用することもできます。
// Import the CCXT MCP Server
import '@mcpfun/mcp-server-ccxt';
// The server starts automatically when imported
// You can configure it through environment variablesクエリの例
MCP サーバーで使用できるクエリの例を次に示します。
「Binanceでのビットコインの現在の価格はいくらですか?」
「CoinbaseのETH/USDTの注文帳を見せてください」
「Binanceで過去24本のBTC/USDTの1時間OHLCVデータを取得します」
「異なる取引所間でSOL/USDTの価格を比較する」
「Binanceの現在の残高はいくらですか?」(APIキーが必要です)
「Krakenで0.1 ETHの市場買い注文を出す」(APIキーが必要)
利用可能なツール
パブリックAPIツール
list-exchanges: 利用可能なすべての暗号通貨取引所を一覧表示しますget-ticker: 取引ペアの現在のティッカー情報を取得するbatch-get-tickers: 複数の取引ペアのティッカー情報を一度に取得するget-orderbook/get-order-book: 取引ペアの市場注文帳を取得するget-ohlcv: 取引ペアのOHLCVローソク足データを取得するget-trades: 取引ペアの最近の取引を取得するget-markets: 取引所で利用可能なすべての市場を取得するget-exchange-info: 取引所の情報とステータスを取得するget-leverage-tiers: 先物レバレッジ階層を取得するget-funding-rates: 現在の資金調達率を取得するget-positions: オープンポジション情報を取得するget-open-orders: すべてのオープン注文を取得するget-order-history: 注文履歴を取得する
プライベート API ツール (API キーが必要)
account-balance: 暗号通貨取引所からアカウント残高を取得するplace-market-order: 取引所で成行注文を出すplace-limit-order: 取引所で指値注文を出すcancel-order: 既存の注文をキャンセルするcancel-all-orders: すべてのオープン注文をキャンセルするset-leverage: 先物のレバレッジを設定するset-margin-mode: 先物のマージンモードを設定するplace-futures-market-order: 先物市場注文を出すplace-futures-limit-order: 先物指値注文を出すtransfer-funds: 口座間の資金移動(例:スポットから先物)
構成とユーティリティツール
cache-stats: CCXT キャッシュ統計を取得するclear-cache: CCXT キャッシュをクリアするset-log-level: ログレベルを設定するget-proxy-config: プロキシ設定を取得するset-proxy-config: プロキシ設定を構成するset-market-type: デフォルトのマーケットタイプを設定するset-default-exchange: デフォルトの交換を変更するsystem-info: システムと環境の情報を取得する
パフォーマンスの最適化
MCP-CCXT には、高いパフォーマンスを確保するためのいくつかの最適化が含まれています。
LRUキャッシュシステム:
データの種類ごとに異なるTTL
ティッカーデータ: 10秒
注文簿データ: 5秒
市場データ: 1時間
適応型レート制限:
交換応答に基づいてリクエストレートを自動的に調整します
エラーに対する指数バックオフを実装する
交換ごとに同時リクエストを管理します
Exchange接続管理:
交換インスタンスの効率的な初期化
適切なエラー処理と再試行
セキュリティのベストプラクティス
APIキーのセキュリティ
専用APIキーを作成する:
異なるアプリケーション/目的ごとに個別のAPIキーを作成する
異なるサービスやアプリケーション間で API キーを再利用しないでください
APIキーの権限を制限する:
必要な権限のみを有効にする(例:市場データは読み取り専用)
取引機能のみが必要な場合は出金権限を無効にします
既知のIPへのアクセスを制限するために、IPホワイトリストが利用可能な場合は使用する
安全な保管:
APIキーをバージョン管理システムにコミットしないでください
APIキーを環境変数または安全な保管庫に保存する
.gitignoreで git から除外されている.envファイルを使用する
リスク免責事項
このソフトウェアは情報提供のみを目的として提供されています。このソフトウェアを使用して暗号通貨取引所とやり取りすると、重大なリスクを伴います。
金融リスク:暗号通貨取引には損失のリスクが伴う
APIセキュリティ: APIキーに適切な権限制限があることを確認する
投資アドバイスなし:このツールは投資アドバイスを提供しません
無保証: ソフトウェアはいかなる保証もなく「現状のまま」提供されます
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています。詳細については、 LICENSE.txtファイルを参照してください。
著作権と帰属
このプロジェクトでは、次の CCXT ライブラリ ( https://github.com/ccxt/ccxt ) を使用します。
Copyright (c) 2016-2024 CCXT developersCCXT は、以下に記載されている MIT ライセンスの下でリリースされています。
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.問題、機能のリクエスト、または貢献については、 GitHub リポジトリにアクセスしてください。
Available Tools
24 toolsaccount-balanceC
Get your account balance from a crypto exchange
Inputs: apiKey (required), exchange (required), secret (required), marketType, +1 more.
batch-get-tickersC
Get ticker information for multiple trading pairs at once
Inputs: exchange (required), symbols (required), marketType.
cache-statsB
Get CCXT cache statistics
Inputs: no named parameters.
clear-cacheB
Clear CCXT cache
Inputs: no named parameters.
clear-exchange-cacheB
Clear exchange instance cache to apply configuration changes
Inputs: no named parameters.
get-exchange-infoC
Get exchange information and status
Inputs: exchange (required), marketType.
get-funding-ratesC
Get current funding rates for perpetual contracts
Inputs: exchange (required), marketType, symbols.
get-leverage-tiersC
Get futures leverage tiers for trading pairs
Inputs: exchange (required), marketType, symbol.
get-marketsC
Get all available markets for an exchange
Inputs: exchange (required), page, pageSize.
get-market-typesB
Get market types supported by an exchange
Inputs: exchange (required).
get-ohlcvC
Get OHLCV candlestick data for a trading pair
Inputs: exchange (required), symbol (required), limit, timeframe.
get-orderbookC
Get market order book for a trading pair
Inputs: exchange (required), symbol (required), limit.
get-proxy-configB
Get the current proxy configuration
Inputs: no named parameters.
get-tickerC
Get current ticker information for a trading pair
Inputs: exchange (required), symbol (required), marketType.
get-tradesC
Get recent trades for a trading pair
Inputs: exchange (required), symbol (required), limit.
list-exchangesB
List all available cryptocurrency exchanges
Inputs: no named parameters.
place-futures-market-orderC
Place a futures market order
Inputs: amount (required), apiKey (required), exchange (required), secret (required), +5 more.
place-market-orderC
Place a market order on an exchange
Inputs: amount (required), apiKey (required), exchange (required), secret (required), +4 more.
set-leverageC
Set leverage for futures trading
Inputs: apiKey (required), exchange (required), leverage (required), secret (required), +3 more.
set-log-levelC
Set logging level
Inputs: level (required).
set-margin-modeC
Set margin mode for futures trading
Inputs: apiKey (required), exchange (required), marginMode (required), secret (required), +3 more.
set-market-typeC
Set default market type for all exchanges
Inputs: marketType (required), clearCache.
set-proxy-configC
Configure proxy settings for all exchanges
Inputs: enabled (required), url (required), clearCache, password, +1 more.
test-proxy-connectionC
Test the proxy connection with a specified exchange
Inputs: exchange (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Most tools have distinct purposes, but there is some overlap between 'place-market-order' and 'place-futures-market-order', which could cause confusion if the agent doesn't understand the futures context. Additionally, 'clear-cache' and 'clear-exchange-cache' are similar, though the latter is more specific. Overall, descriptions help differentiate, but minor ambiguities exist.
Tool names follow a consistent verb_noun pattern with hyphens, such as 'get-ticker' and 'set-leverage', making them predictable and readable. However, there are minor deviations like 'batch-get-tickers' (which mixes verb order) and 'cache-stats' (which uses a noun-verb style), slightly breaking the pattern.
With 24 tools, the count is on the higher side but reasonable for a comprehensive crypto exchange server covering data retrieval, trading, configuration, and cache management. It might feel slightly heavy, but each tool appears to serve a specific function in the domain without obvious redundancy.
The tool set provides complete coverage for interacting with crypto exchanges, including market data (e.g., 'get-ohlcv', 'get-orderbook'), trading operations (e.g., 'place-market-order', 'set-leverage'), configuration (e.g., 'set-proxy-config'), and utility functions (e.g., 'cache-stats'). No significant gaps are apparent for the stated purpose.
Maintenance
Related MCP Connectors
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
Real-time crypto market data: candles, tickers, orderbooks across 13+ exchanges via MCP.
Hosted MCP server for MT4 and MT5: read accounts, prices and candles, and place or close orders.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact with cryptocurrency exchanges through CCXT, allowing for tasks like fetching balances, market data, creating orders, and trading operations in a standardized way.8MIT
- AlicenseNot gradedqualityCmaintenanceComprehensive Binance Futures trading MCP server with 41 professional trading tools across account management, order execution, market data, and risk management. Features smart ticker caching, secure authentication, and Docker support for seamless integration with MCP clients.4PythonMIT

cdcxofficial
AlicenseNot gradedqualityCmaintenanceMCP server for the Crypto.com Exchange API, providing 86 dynamically generated tools for market data, trading, account management, and more with real-time WebSocket streaming and safety enforcement.52 npm28Apache 2.0- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP service for cryptocurrency data acquisition with advanced technical analysis capabilities, supporting 100+ exchanges, 158 TA-Lib indicators, and dual transport protocols (stdio and HTTP/SSE).5MIT