Get the FREE Ultimate OpenClaw Setup Guide →

binance

MCP server from qeinfinity/binance-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio qeinfinity-binance-mcp-server npm start \
  --env BINANCE_API_KEY="your Binance API key (optional for certain endpoints or authenticated streams)" \
  --env BINANCE_API_SECRET="your Binance API secret (optional for authenticated streams)"

How to use

This MCP server implements a Binance market data MCP server with WebSocket support for real-time streaming. It supports multiple stream types, including trade, ticker, bookTicker, kline, markPrice, and fundingRate, and can handle both spot and futures markets. You can subscribe to specific trading pairs (e.g., BTCUSDT) and choose which stream types you want to receive. The server provides type-safe handling of incoming messages and includes robust error handling with automatic reconnects to maintain continuous data flow. To use, start the server and connect via the MCP protocol client, then subscribe to desired streams for a given symbol. The example shows subscribing to trade and ticker streams for BTCUSDT in the spot market and registering a listener to process incoming data as it arrives.

How to install

Prerequisites:

  • Node.js (LTS version) and npm installed on your system
  • Access to the repository containing the Binance MCP Server

Step-by-step installation:

  1. Clone the repository (or download the package): git clone https://github.com/your-org/qeinfinity-binance-mcp-server.git cd qeinfinity-binance-mcp-server

  2. Install dependencies: npm install

  3. Configure environment variables if needed (optional for public data):

    • Create a .env file or export variables in your shell, for example: export BINANCE_API_KEY=your_api_key export BINANCE_API_SECRET=your_api_secret
  4. Start the server: npm start

  5. Verify the server is running by checking logs or accessing health endpoints if provided by the project.

Optional:

  • Run tests (if available): npm test
  • Build for production (if a build script is provided): npm run build

Additional notes

Notes:

  • The server exposes stream types such as trade, ticker, bookTicker, kline, markPrice, and fundingRate. Ensure you subscribe to the desired streams for your symbol (e.g., BTCUSDT) and whether you are querying spot or futures data.
  • For futures streams (markPrice, fundingRate), you may need futures-enabled endpoints and potentially API credentials depending on Binance configuration.
  • If you encounter reconnect issues, verify your network connectivity and ensure your environment can reach Binance WebSocket endpoints. The server implements automatic exponential backoff for reconnections.
  • If you plan to run multiple MCP servers, you can duplicate the configuration under different keys in mcp_config and adjust environment variables as needed.
  • For local development, you can use npm run build if a build step is defined to transpile or bundle code, otherwise npm start should run the server directly.
  • Common issues include misconfigured subscriptions, incorrect symbol formats, or missing API credentials for authenticated streams. Always verify the stream types and symbols match Binance offerings.

Related MCP Servers

Sponsor this space

Reach thousands of developers