Binance MCP Server

by qeinfinity

20 stars
225 downloads
Not rated
GitHub

Description

# Binance MCP Server A Model Context Protocol (MCP) server implementation for Binance market data with WebSocket support. ## Features - Real-time market data streaming via WebSocket - Support for both spot and futures markets - Automatic reconnection with exponential backoff -…

About

# Binance MCP Server A Model Context Protocol (MCP) server implementation for Binance market data with WebSocket support. ## Features - Real-time market data streaming via WebSocket - Support for both spot and futures markets - Automatic reconnection with exponential backoff - Type-safe message handling -…

Details

Author
qeinfinity
GitHub stars
20
Downloads
225
Categories
Other, Finance

- Real-time market data streaming via WebSocket
- Support for both spot and futures markets
- Automatic reconnection with exponential backoff
- Type-safe message handling
- Comprehensive error handling

Install via npm install and start the server with npm start. In a client such as Claude Desktop, subscribe to streams using server.subscribe('SYMBOL', 'market', ['streamType1', 'streamType2']) and handle incoming data with server.onStreamData(...).

Binance MCP Server

A Model Context Protocol (MCP) server implementation for Binance market data with WebSocket support.

Features

- Real-time market data streaming via WebSocket
- Support for both spot and futures markets
- Automatic reconnection with exponential backoff
- Type-safe message handling
- Comprehensive error handling

Installation

npm install

Usage

Starting the Server

npm start

WebSocket Stream Types

The following stream types are supported:

- trade: Real-time trade data
- ticker: 24-hour rolling window price change statistics
- bookTicker: Best bid/ask price and quantity
- kline: Candlestick data
- markPrice: Mark price and funding rate (futures only)
- fundingRate: Funding rate data (futures only)

Example Usage in 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);
});

Development

Running Tests

npm test

Building

npm run build

License

Private

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.