Binance MCP Server logo

Binance MCP Server

by MCP-Mirror

This is a Model Context Protocol (MCP) server implementation designed for streaming Binance market data using WebSockets. It provides real-time updates for both spot and futures markets.

View on GitHub

Last updated: N/A

What is Binance MCP Server?

This is a Model Context Protocol (MCP) server that facilitates the streaming of real-time market data from Binance. It utilizes WebSockets for efficient and low-latency data delivery, supporting both spot and futures markets.

How to use Binance MCP Server?

To use the server, first install the dependencies using npm install. Then, start the server with npm start. Subscribe to specific streams (e.g., 'trade', 'ticker') for a given symbol (e.g., 'BTCUSDT') and market type ('spot' or 'futures') using the server.subscribe method. Handle incoming data using the server.onStreamData method.

Key features of Binance MCP Server

  • Real-time market data streaming via WebSocket

  • Support for both spot and futures markets

  • Automatic reconnection with exponential backoff

  • Type-safe message handling

Use cases of Binance MCP Server

  • Algorithmic trading

  • Market data analysis

  • Building real-time dashboards

  • Developing trading bots

FAQ from Binance MCP Server

What data streams are supported?

The server supports trade, ticker, bookTicker, kline, markPrice, and fundingRate streams.

How do I subscribe to a stream?

Use the server.subscribe method, providing the symbol, market type, and an array of stream types.

How do I handle incoming data?

Use the server.onStreamData method to register a callback function that will be executed when new data arrives.

Does the server automatically reconnect if the connection is lost?

Yes, the server implements automatic reconnection with exponential backoff.

Is this server licensed for commercial use?

No, the license is private.