Skip to main content
Glama

CCXT MCP サーバー

npmバージョン npmダウンロード GitHubスターライセンス: MIT

한국어 버전(韓国語バージョン)

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 サーバーを登録する

  1. Claudeデスクトップ設定を開きます:

    • Claudeデスクトップアプリの設定メニューに移動します

    • 「MCPサーバー」セクションを見つけます

  2. 新しい MCP サーバーを追加します:

    • 「サーバーを追加」ボタンをクリックします

    • サーバー名: ccxt-mcp

    • コマンド: npx @lazydino/ccxt-mcp

    • 追加引数(オプション): --config /path/to/config.json

  3. サーバーを保存してテストします:

    • 設定を保存する

    • 「接続テスト」ボタンで接続をテストします

設定方法 - 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: 別の構成ファイルを使用する (高度な方法)

アカウント情報を別の構成ファイルに分離するには、次のように設定します。

  1. 別の構成ファイル(例: 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" } ] }
  1. Claude デスクトップ設定で構成ファイルのパスを指定します

{ "mcpServers": { "ccxt-mcp": { "command": "npx", "args": [ "-y", "@lazydino/ccxt-mcp", "--config", "/path/to/ccxt-accounts.json" ] } } }

個別の構成ファイルを使用する理由:

  • 再帰参照の問題を防ぐ

  • APIキーなどの機密情報を分離します

  • より簡単なマルチ環境構成(開発、テスト、本番)

  • 設定ファイルのバージョン管理の改善

主な特徴

  • 市場情報検索

    • リスト交換

    • 取引所別の市場情報を見る

    • 特定のシンボルの価格情報を取得する

    • 特定のシンボルの注文書情報を表示する

    • 過去のOHLCVデータを検索する

  • 取引機能:

    • 成行注文/指値注文を作成する

    • 注文をキャンセルしてステータスを確認する

    • アカウント残高を表示する

    • 取引履歴を確認する

  • 取引分析

    • 日次/週次/月次パフォーマンス分析

    • 勝率の計算(過去7日間、30日間、全期間)

    • 平均損益比率(R倍数)

    • 最大連続損失/利益系列分析

    • 資産変動追跡

    • 包括的なパフォーマンス指標

    • 取引パターン認識

    • 期間ベースのリターン計算

  • ポジション管理

    • 自己資本比率取引(例:口座資本の5%でエントリー)

    • 先物市場のレバレッジ設定(1~100倍)

    • 動的ポジションサイジング(ボラティリティベース)

    • 分割売買戦略の実装

  • リスク管理

    • テクニカル指標に基づく損切り設定(例:5分足チャートの10本のローソク足の最低点)

    • ボラティリティベースの損切り/利益確定(ATR倍数)

    • 最大許容損失限度(日次/週次)

    • 動的利益確定設定(トレーリングプロフィット)

仕組み

User <--> AI Model(Claude/GPT) <--> MCP Protocol <--> CCXT MCP Server <--> Cryptocurrency Exchange API
  1. ユーザー: 「ビットコインの価格を教えてください」や「Binanceアカウントでイーサリアムを購入してください」などのリクエスト

  2. AIモデル: ユーザーのリクエストを理解し、使用するMCPツール/リソースを決定します

  3. MCPプロトコル: AIとCCXT MCPサーバー間の標準化された通信

  4. CCXT MCP サーバー: CCXT ライブラリを使用して暗号通貨取引所 API と通信します。

  5. 取引所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 で ⭐️ 評価を付けることを検討してください。

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lazy-dinosaur/ccxt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server