CCXT MCP Server

by lazy-dinosaur
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides access to Binance cryptocurrency exchange data and trading capabilities, including price information, order book data, and the ability to execute market/limit orders through the CCXT library

  • Allows retrieval of Bitcoin price information, historical OHLCV data, and execution of Bitcoin trades across supported cryptocurrency exchanges

  • Enables retrieval of market data and execution of trades on Coinbase cryptocurrency exchange, supporting features like price comparison, order management, and account balance checks

CCXT MCP 서버

영어 버전(한국어 버전)

CCXT MCP 서버는 AI 모델이 모델 컨텍스트 프로토콜(MCP)을 통해 암호화폐 거래소 API와 상호 작용할 수 있도록 지원하는 서버입니다. 이 서버는 CCXT 라이브러리를 사용하여 100개 이상의 암호화폐 거래소와 거래 기능에 대한 액세스를 제공합니다.

🚀 빠른 시작

지엑스피1

설치 및 사용

글로벌 설치

# 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 Desktop 앱의 설정 메뉴로 이동하세요
    • "MCP 서버" 섹션을 찾으세요
  2. 새로운 MCP 서버 추가 :
    • "서버 추가" 버튼을 클릭하세요
    • 서버 이름: ccxt-mcp
    • 명령어: npx @lazydino/ccxt-mcp
    • 추가 인수(선택 사항): --config /path/to/config.json
  3. 서버를 저장하고 테스트하세요 .
    • 설정을 저장하세요
    • "연결 테스트" 버튼을 눌러 연결을 테스트하세요.

구성 방법 - 두 가지 옵션

옵션 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 Desktop 설정에서 구성 파일 경로를 지정하세요 .
{ "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. 사용자 : "비트코인 가격을 알려주세요" 또는 "바이낸스 계정으로 이더리움을 구매하세요"와 같은 요청
  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 라이선스에 따라 배포됩니다. 자세한 내용은 라이선스 파일을 참조하세요.

❤️ 지원

이 프로젝트가 유용하다고 생각되시면 GitHub에서 ⭐️를 눌러주세요!

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

모델 컨텍스트 프로토콜을 통해 AI 모델이 암호화폐 거래소 API와 상호 작용할 수 있도록 하는 서버로, 100개 이상의 거래소와 거래 기능에 대한 액세스를 제공합니다.

  1. 🚀 Quick Start
    1. Installation and Usage
      1. Global Installation
      2. Running with npx
    2. Configuration
      1. Registering the MCP Server in Claude Desktop
      2. Configuration Methods - Two Options
    3. Key Features
      1. How It Works
        1. Using with AI Models
          1. Cautions and Recommended Prompts
          2. Basic Query Examples
          3. Advanced Trading Query Examples
        2. Development
          1. Building from Source
        3. 🤝 Contributing
          1. 📄 License
            1. ❤️ Support
              ID: mt6hftp7hy