CCXT MCP サーバー


한국어 버전(韓国語バージョン)
CCXT MCPサーバーは、AIモデルがモデルコンテキストプロトコル(MCP)を介して暗号通貨取引所APIと連携できるようにするサーバーです。このサーバーはCCXTライブラリを使用して、100を超える暗号通貨取引所とその取引機能へのアクセスを提供します。
🚀 クイックスタート
# Install the package globally
npm install -g @lazydino/ccxt-mcp
# Run with default settings
ccxt-mcp
# or run without installation
npx @lazydino/ccxt-mcp
Related MCP server: EVM MCP Server
インストールと使用方法
グローバルインストール
# Install the package globally
npm install -g @lazydino/ccxt-mcp
npxで実行
インストールせずに直接実行できます:
# Using default settings
npx @lazydino/ccxt-mcp
# Using custom configuration file
npx @lazydino/ccxt-mcp --config /path/to/config.json
ヘルプを表示:
npx @lazydino/ccxt-mcp --help
構成
Claude Desktop に MCP サーバーを登録する
Claudeデスクトップ設定を開きます:
新しい MCP サーバーを追加します:
サーバーを保存してテストします:
設定を保存する
「接続テスト」ボタンで接続をテストします
設定方法 - 2つのオプション
オプション 1: Claude デスクトップ設定にアカウント情報を直接入力する (基本的な方法)
この方法では、CCXT アカウント情報が Claude Desktop 設定ファイル (claude_desktop_config.json) に直接含められます。
{
"mcpServers": {
"ccxt-mcp": {
"command": "npx",
"args": ["-y", "@lazydino/ccxt-mcp"],
"accounts": [
{
"name": "bybit_main",
"exchangeId": "bybit",
"apiKey": "YOUR_API_KEY",
"secret": "YOUR_SECRET_KEY",
"defaultType": "spot"
},
{
"name": "bybit_futures",
"exchangeId": "bybit",
"apiKey": "YOUR_API_KEY",
"secret": "YOUR_SECRET_KEY",
"defaultType": "swap"
}
]
}
}
}
この方法を使用すると、個別の設定ファイルは必要ありません。すべての設定はClaude Desktopの設定ファイルに統合されます。
オプション 2: 別の構成ファイルを使用する (高度な方法)
アカウント情報を別の構成ファイルに分離するには、次のように設定します。
別の構成ファイル(例: ccxt-accounts.json ) を作成します。
{
"accounts": [
{
"name": "bybit_main",
"exchangeId": "bybit",
"apiKey": "YOUR_API_KEY",
"secret": "YOUR_SECRET_KEY",
"defaultType": "spot"
},
{
"name": "bybit_futures",
"exchangeId": "bybit",
"apiKey": "YOUR_API_KEY",
"secret": "YOUR_SECRET_KEY",
"defaultType": "swap"
}
]
}
Claude デスクトップ設定で構成ファイルのパスを指定します。
{
"mcpServers": {
"ccxt-mcp": {
"command": "npx",
"args": [
"-y",
"@lazydino/ccxt-mcp",
"--config",
"/path/to/ccxt-accounts.json"
]
}
}
}
個別の構成ファイルを使用する理由:
再帰参照の問題を防ぐ
APIキーなどの機密情報を分離します
より簡単なマルチ環境構成(開発、テスト、本番)
設定ファイルのバージョン管理の改善
主な特徴
市場情報検索:
リスト交換
取引所別の市場情報を見る
特定のシンボルの価格情報を取得する
特定のシンボルの注文書情報を表示する
過去のOHLCVデータを検索する
取引機能:
成行注文/指値注文を作成する
注文をキャンセルしてステータスを確認する
アカウント残高を表示する
取引履歴を確認する
取引分析:
日次/週次/月次パフォーマンス分析
勝率の計算(過去7日間、30日間、全期間)
平均損益比率(R倍数)
最大連続損失/利益系列分析
資産変動追跡
包括的なパフォーマンス指標
取引パターン認識
期間ベースのリターン計算
ポジション管理:
リスク管理:
仕組み
User <--> AI Model(Claude/GPT) <--> MCP Protocol <--> CCXT MCP Server <--> Cryptocurrency Exchange API
ユーザー: 「ビットコインの価格を教えてください」や「Binanceアカウントでイーサリアムを購入してください」などのリクエスト
AIモデル: ユーザーのリクエストを理解し、使用するMCPツール/リソースを決定します
MCPプロトコル: AIとCCXT MCPサーバー間の標準化された通信
CCXT MCP サーバー: CCXT ライブラリを使用して暗号通貨取引所 API と通信します。
取引所API : 実際のデータを提供し、取引注文を実行します
AIモデルの使用
Claude Desktop に登録すると、AI モデルに対して次の種類のリクエストを行うことができます。
注意事項と推奨プロンプト
AI モデルを使用する場合は、以下の注意事項を考慮し、効果的な取引のために以下のプロンプトを使用してください。
Your goal is to execute trades using the ccxt tools as much as possible
Cautions:
- Accurately identify whether it's a futures market or spot market before proceeding with trades
- If there's no instruction about percentage of capital or amount to use, always calculate and execute trades using the entire available capital
注記:
AI モデルは先物取引とスポット取引を混同することがあります。
取引資本の規模に関する明確なガイドラインがなければ、AI が混乱する可能性があります。
上記のプロンプトを使用すると、取引の意図を明確に伝えることができます。
基本的なクエリの例
Check and compare the current Bitcoin price on binance and coinbase.
高度な取引クエリの例
ポジション管理
Open a long position on BTC/USDT futures market in my Bybit account (bybit_futures) with 5% of capital using 10x leverage.
Enter based on moving average crossover strategy and set stop loss at the lowest point among the 12 most recent 5-minute candles.
パフォーマンス分析
Analyze my Binance account (bybit_main) trading records for the last 7 days and show me the win rate, average profit, and maximum consecutive losses.
詳細な取引分析
Analyze my trading performance on the bybit_futures account for BTC/USDT over the last 30 days. Calculate win rate, profit factor, and identify any patterns in my winning trades.
Show me the monthly returns for my bybit_main account over the past 90 days and identify my best and worst trading months.
Analyze my consecutive wins and losses on my bybit_futures account and tell me if I have any psychological patterns affecting my trading after losses.
発達
ソースから構築
# Clone repository
git clone https://github.com/lazy-dinosaur/ccxt-mcp.git
# Navigate to project directory
cd ccxt-mcp
# Install dependencies
npm install
# Build
npm run build
🤝 貢献する
貢献を歓迎します!お気軽にプルリクエストを送信してください。
📄 ライセンス
MITライセンスに基づいて配布されています。詳細についてはLICENSEファイルをご覧ください。
❤️ サポート
このプロジェクトが役に立つと思われる場合は、GitHub で ⭐️ 評価を付けることを検討してください。