TB

tienan92it/binance-mcp

Developer tools

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

21 stars 4 forks 품질 52 트렌드 0MIT

큰 언어 모델 (LLM) 에이전트에 Binance 암호 화폐 교환 데이터를 노출하는 모델 Context Protocol (MCP) 서버.

개요

큰 언어 모델 (LLM) 에이전트에 Binance 암호 화폐 교환 데이터를 노출하는 모델 Context Protocol (MCP) 서버. 이 서버는 LLM을 통해 바이낸스의 실시간 및 과거 시장 데이터에 액세스할 수 있습니다. - : Binance의 거래 쌍에 대한 현재 가격을 얻으십시오 - : 다른 가격 수준에서 구매 / 판매 관심을 보여주는 주문 책 스냅 샷을 검색하십시오 - : Fetch OHLCV (Open, High, Low, Close, Volume) 캔들스틱 데이터 - : 실시간 거래, ticker 및 WebSockets를 통해 주문 도서 업데이트 - : 액세스 거래, 24 시간 통계, 집계 거래, 롤링 윈도우 데이터 및 기타 - : 액세스 거래 규칙, 기호 정보, 재무 정보 및 기타 - API를 통해 모든 클라이언트가 필요합니다. (주) - 파이썬 3.

개요(AI 번역)

큰 언어 모델 (LLM) 에이전트에 Binance 암호 화폐 교환 데이터를 노출하는 모델 Context Protocol (MCP) 서버. 이 서버는 LLM을 통해 바이낸스의 실시간 및 과거 시장 데이터에 액세스할 수 있습니다.

특징

  • Live Price Data: Binance의 거래 쌍에 대한 현재 가격을 얻으십시오
  • ** 주문 도서 액세스 ** : 다른 가격 수준에서 구매 / 판매 관심을 보여주는 주문 책 스냅 샷을 검색
  • Historical Price Data: Fetch OHLCV (Open, High, Low, Close, Volume) 캔들스틱 데이터
  • Real-time WebSocket Streams: WebSockets를 통해 실시간 거래, ticker 및 주문 책 업데이트에 가입 -Comprehensive Market Data: 액세스 거래, 24시간 통계, 집계 거래, 롤링 윈도우 데이터 등
  • 교환 정보: 액세스 거래 규칙, 기호 정보 및 수수료 구조
  • **Read-only 운영 **: 모든 데이터는 Binance의 공개 REST API를 통해 fetched (API 키가 필요하지 않음)
  • MCP 표준 준수: 어떤 MCP 호환 LLM 클라이언트와 함께 작동

요구 사항

  • 파이썬 3.8+
  • mcp CLI 도구 패키지 (mcp[cli])
  • requests REST API 라이브러리
  • websockets WebSocket 스트림 라이브러리

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

README

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

Binance MCP Server

A Model Context Protocol (MCP) server that exposes Binance cryptocurrency exchange data to Large Language Model (LLM) agents. This server allows LLMs to access real-time and historical market data from Binance through a standardized interface.

Features

  • Live Price Data: Get current prices for any trading pair on Binance
  • Order Book Access: Retrieve order book snapshots showing buy/sell interest at different price levels
  • Historical Price Data: Fetch OHLCV (Open, High, Low, Close, Volume) candlestick data for any timeframe
  • Real-time WebSocket Streams: Subscribe to real-time trade, ticker, and order book updates via WebSockets
  • Comprehensive Market Data: Access trades, 24hr statistics, aggregate trades, rolling window data, and more
  • Exchange Information: Access trading rules, symbol information, and fee structures
  • Read-only Operation: All data is fetched via Binance’s public REST API (no API keys required)
  • MCP Standard Compliant: Works with any MCP-compatible LLM client

Requirements

  • Python 3.8+
  • mcp package with CLI tools (mcp[cli])
  • requests library for REST API
  • websockets library for WebSocket streams
  • uvicorn for serving (optional)

Installation

  1. Clone this repository:
git clone https://github.com/yourusername/binance_mcp_server.git
cd binance_mcp_server
  1. Install dependencies:
pip install -r requirements.txt

Usage

Running the Server Directly

To run the server in standalone mode:

python run_server.py

This will start the MCP server, which will listen for connections via STDIO.

Development Mode with MCP Inspector

For development and testing, use the MCP Inspector:

mcp dev run_server.py

This opens the MCP Inspector interface where you can test the server’s tools interactively.

Installing in Claude Desktop

To use this server with Claude Desktop:

  1. Install the MCP CLI tools if you haven’t already:
pip install "mcp[cli]"
  1. Install the server in Claude Desktop:
mcp install run_server.py
  1. You can now access Binance data directly within your Claude Desktop conversations.

Example Client

An example client script is provided to demonstrate programmatic usage:

python example_client.py

This script connects to the server and retrieves various types of market data.

Available Tools

Connectivity and Basic Info

  • ping_binance(): Test connectivity to the Binance API server

    • Example: ping_binance()
  • get_server_time(): Get the current server time from Binance

    • Example: get_server_time()

Market Data

  • get_price(symbol): Get the current price for a trading pair

    • Example: get_price(symbol="BTCUSDT")
  • get_order_book(symbol, depth=10): Get the current order book

    • Example: get_order_book(symbol="ETHUSDT", depth=5)
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →