BO

badger3000/okx-mcp-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

3 stars 3 forks 품질 60 트렌드 4

이 프로젝트는 OKX 거래소에서 실시간 암호 화폐 데이터를 fetches하는 모델 Context Protocol (MCP) 서버를 만듭니다.

개요

이 프로젝트는 OKX 거래소에서 실시간 암호 화폐 데이터를 fetches하는 모델 Context Protocol (MCP) 서버를 만듭니다. Claude와 같은 AI 조수는 향상된 시각화 기능과 WebSocket 실시간 업데이트로 정의된 도구를 통해 최신 암호 화폐 가격 정보 및 과거 데이터에 액세스할 수 있습니다. - get price: 암호 화폐 거래 쌍에 대한 최신 가격 데이터를 시각적 포맷 - get candlesticks: ASCII 차트를 포함한 시각화 옵션이있는 역사적인 촛대 데이터를 검색 - Join ticker : 거래 쌍을위한 실시간 WebSocket 업데이트 구독 - get live ticker : WebSocket 연결에서 최신 라이브 데이터를 검색 - unsubscribe ticker: 특정 거래 쌍에 대한 업데이트를 수신 중지 - 노드.

개요(AI 번역)

이 프로젝트는 OKX 거래소에서 실시간 암호 화폐 데이터를 fetches하는 모델 Context Protocol (MCP) 서버를 만듭니다. Claude와 같은 AI 조수는 향상된 시각화 기능과 WebSocket 실시간 업데이트로 정의된 도구를 통해 최신 암호 화폐 가격 정보 및 과거 데이터에 액세스할 수 있습니다.

특징

  • get_price: Fetches the latest price data for a cryptocurrency 거래 쌍 와 시각적인 formatting
  • get_candlesticks: ASCII 차트를 포함한 시각화 옵션으로 과거의 촛대 데이터를 검색
  • subscribe_ticker: 거래 쌍을 위한 실시간 WebSocket 업데이트 구독
  • get_live_ticker: WebSocket 연결에서 최신 라이브 데이터를 검색
  • unsubscribe_ticker: 특정 거래 쌍에 대한 업데이트를 수신 중지

필수품

  • Node.js (v16 이상 권장)
  • npm 또는 원사
  • VSCode with Claude extension ( VSCode 통합을 사용하는 경우)
  • Claude 데스크톱 ( VSCode를 사용하지 않는 경우)

설치

  1. 저장소를 복제

  2. 의존성 설치

  3. WebSocket 의존성 추가

  4. 프로젝트 구축

  5. 컴파일된 스크립트 실행 가능

사용법

Server를 직접 실행

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

OKX MCP Server

This project creates a Model Context Protocol (MCP) server that fetches real-time cryptocurrency data from the OKX exchange. It allows AI assistants like Claude to access up-to-date cryptocurrency price information and historical data through defined tools with enhanced visualization capabilities and WebSocket live updates.

Features

  • get_price: Fetches the latest price data for a cryptocurrency trading pair with visual formatting
  • get_candlesticks: Retrieves historical candlestick data with visualization options including ASCII charts
  • subscribe_ticker: Subscribes to real-time WebSocket updates for a trading pair
  • get_live_ticker: Retrieves the latest live data from WebSocket connection
  • unsubscribe_ticker: Stops receiving updates for a specific trading pair

Prerequisites

  • Node.js (v16 or higher recommended)
  • npm or yarn
  • VSCode with Claude extension (if using VSCode integration)
  • Claude Desktop (if not using VSCode)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/okx-mcp-server.git
    cd okx-mcp-server
    
  2. Install dependencies

    npm install
    
  3. Add the WebSocket dependency

    npm install ws
    npm install --save-dev @types/ws
    
  4. Build the project

    npm run build
    
  5. Make the compiled script executable

    chmod +x build/index.js
    

Usage

Running the Server Directly

You can run the server directly with:

npm start

Or:

node build/index.js

Testing with MCP Inspector

To test your MCP server before integration:

npx @modelcontextprotocol/inspector node build/index.js

In the inspector, you can test:

  • get_price with input: { "instrument": "BTC-USDT", "format": "markdown" }
  • get_candlesticks with input: { "instrument": "BTC-USDT", "bar": "1m", "limit": 10, "format": "markdown" }
  • subscribe_ticker with input: { "instrument": "BTC-USDT" }
  • get_live_ticker with input: { "instrument": "BTC-USDT", "format": "markdown" }
  • unsubscribe_ticker with input: { "instrument": "BTC-USDT" }

Each tool supports different visualization formats:

  • format: Choose between markdown, json, or table (for candlesticks)

Integration with VSCode

  1. Install the Claude extension for VSCode

  2. Configure the MCP server in VSCode settings:

    • Create or edit the following file:
      ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
      
    • Add the following configuration:
      {
        "mcpServers": {
          "okx": {
            "command": "node",
            "args": ["/absolute/path/to/okx-mcp-server/build/index.js"],
            "disabled": false,
            "autoApprove": []
GitHub에서 전체 README 보기

설치

npx @modelcontextprotocol/inspector node build/index.js
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "okx": { "command": "node", "args": ["/absolute/path/to/okx-mcp-server/build/index.js"], "disabled": false, "autoApprove": [] } } }