
badger3000/okx-mcp-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
이 프로젝트는 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 거래 쌍 와 시각적인 formattingget_candlesticks: ASCII 차트를 포함한 시각화 옵션으로 과거의 촛대 데이터를 검색subscribe_ticker: 거래 쌍을 위한 실시간 WebSocket 업데이트 구독get_live_ticker: WebSocket 연결에서 최신 라이브 데이터를 검색unsubscribe_ticker: 특정 거래 쌍에 대한 업데이트를 수신 중지
필수품
- Node.js (v16 이상 권장)
- npm 또는 원사
- VSCode with Claude extension ( VSCode 통합을 사용하는 경우)
- Claude 데스크톱 ( VSCode를 사용하지 않는 경우)
설치
-
저장소를 복제
-
의존성 설치
-
WebSocket 의존성 추가
-
프로젝트 구축
-
컴파일된 스크립트 실행 가능
사용법
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 formattingget_candlesticks: Retrieves historical candlestick data with visualization options including ASCII chartssubscribe_ticker: Subscribes to real-time WebSocket updates for a trading pairget_live_ticker: Retrieves the latest live data from WebSocket connectionunsubscribe_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
-
Clone the repository
git clone https://github.com/yourusername/okx-mcp-server.git cd okx-mcp-server -
Install dependencies
npm install -
Add the WebSocket dependency
npm install ws npm install --save-dev @types/ws -
Build the project
npm run build -
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_pricewith input:{ "instrument": "BTC-USDT", "format": "markdown" }get_candlestickswith input:{ "instrument": "BTC-USDT", "bar": "1m", "limit": 10, "format": "markdown" }subscribe_tickerwith input:{ "instrument": "BTC-USDT" }get_live_tickerwith input:{ "instrument": "BTC-USDT", "format": "markdown" }unsubscribe_tickerwith input:{ "instrument": "BTC-USDT" }
Each tool supports different visualization formats:
format: Choose betweenmarkdown,json, ortable(for candlesticks)
Integration with VSCode
-
Install the Claude extension for VSCode
-
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": []
- Create or edit the following file:
설치
npx @modelcontextprotocol/inspector node build/index.js설정
{
"mcpServers": {
"okx": {
"command": "node",
"args": ["/absolute/path/to/okx-mcp-server/build/index.js"],
"disabled": false,
"autoApprove": []
}
}
}