Binance MCP Server

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 real-time market data streaming from Binance, supporting both spot and futures markets. Offers access to trade data, price statistics, order book information, candlestick data, mark prices, funding rates, and open interest information through various endpoints and WebSocket streams.

币安MCP服务器

支持 WebSocket 的币安市场数据模型上下文协议 (MCP) 服务器实现。

特征

  • 通过 WebSocket 传输实时市场数据
  • 支持现货和期货市场
  • 使用指数退避算法自动重新连接
  • 类型安全的消息处理
  • 全面的错误处理

安装

npm install

用法

启动服务器

npm start

WebSocket 流类型

支持以下流类型:

  • trade :实时交易数据
  • ticker :24小时滚动窗口价格变动统计
  • bookTicker :最佳买入/卖出价格和数量
  • kline :K线数据
  • markPrice :标记价格和资金费率(仅限期货)
  • fundingRate :资金费率数据(仅限期货)

Claude Desktop 中的示例用法

// Subscribe to trade and ticker streams for BTC/USDT await server.subscribe('BTCUSDT', 'spot', ['trade', 'ticker']); // Handle incoming data server.onStreamData('BTCUSDT', 'trade', (data) => { console.log('New trade:', data); });

发展

运行测试

npm test

建筑

npm run build

执照

私人的

You must be authenticated.

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

通过 WebSockets 传输实时币安市场数据(现货和期货)的服务器实现,使应用程序能够通过模型上下文协议接收和处理加密货币市场信息。

  1. Features
    1. Installation
      1. Usage
        1. Starting the Server
        2. WebSocket Stream Types
        3. Example Usage in Claude Desktop
      2. Development
        1. Running Tests
        2. Building
      3. License
        ID: nr5tspngbh