Logo van Binance MCP Server

Binance MCP Server

Organisatie
TermiX-official

binance-mcp

UitgeverTermiX-official
Repositorybinance-mcp
TaalTypeScript
Forks
42
Sterren
97
Beschikbare tools
0
Transporttypestdio
Categorieën
Links
  • Koppel tools aan AI-workflows

    Binance MCP Server biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    97 sterren en 42 forks in de gekoppelde repository.

Binance MCP Server

Overview

Binance MCP Server is a backend service designed to interact with the Binance API. It facilitates seamless interaction with the Binance exchange, enabling users to view their portfolio, convert tokens, and execute trades with minimal market impact. The server utilizes the Model Context Protocol (MCP) framework to ensure secure, structured, and efficient transactions.

Key Functionalities:

  • Interact with Binance exchange API for account information and trading
  • Display portfolio composition and valuation
  • Execute smart token conversions with market impact mitigation
  • Process market orders and algorithmic trading strategies
  • Retrieve real-time trading data and account information
  • Implement structured transactions using the Model Context Protocol framework
  • Provide secure authentication and API key management for Binance integration

Features

  • Binance API Integration: Connect to Binance exchange for account information and trading operations
  • Portfolio Management: View detailed portfolio composition, market value, and percentage allocation
  • Portfolio Analytics: Optional historical value tracking to monitor performance over time
  • Smart Token Conversion: Convert between tokens with intelligent order execution strategies
  • Market Impact Mitigation: Automatically use algorithmic trading for larger orders to prevent price slippage
  • Account Management: Retrieve detailed account information, balances, and trading history
  • Market Data Access: Access real-time order books and market data for informed trading decisions
  • Order Execution: Place spot market orders with flexible quantity specifications
  • Algorithmic Trading Support: Implement Time-Weighted Average Price (TWAP) orders to minimize market impact
  • Automated Trading: Execute trades programmatically based on predefined strategies
  • Secure Authentication: Manage API keys and secure connections to Binance services
  • Comprehensive Error Handling: Detailed error reporting for transaction failures and API issues

Requirements

Before setting up the Binance MCP Server, ensure you have the following installed:

  • Node.js (v16 or later)
  • npm or yarn
  • Binance API key and secret (for Binance exchange integration)
  • A valid Binance Smart Chain (BSC) wallet private key (for blockchain transactions)

Installation

Clone the repository and install dependencies:

sh
git clone https://github.com/your-repo/binance-mcp-server.git
cd binance-mcp-server
npm install  # or yarn install

Configuration

To configure the server, create a .env file in the root directory and specify the following variables:

sh
# Binance API Configuration
BINANCE_API_KEY=your_binance_api_key_here
BINANCE_API_SECRET=your_binance_api_secret_here

Creating a Binance API Key

Before using the Binance API integration, you need to create an API key. This allows you to connect to Binance's servers via several programming languages, pull data from Binance, and interact with external applications. You can view your wallet and transaction data, make trades, and deposit and withdraw funds in third-party programs.

Prerequisites:

  • You need to make a deposit of any amount to your Spot Wallet to activate your account
  • Complete identity verification
  • Enable two-factor authentication (2FA) on your account

Steps to create a Binance API Key:

  1. Log in to your Binance account and click the profile icon, then [Account]. Binance Homepage

  2. Go to [API Management] then click [Create API]. API Management

  3. Select your preferred API Key type:

    • System-generated API keys (HMAC symmetric encryption) - You'll get the API key and the Secret Key.
    • Self-generated API keys (Ed25519 or RSA asymmetric encryption) - You'll receive an API key, but you have to create your own public-private key pair. API Key Type
  4. Enter a label/name for your API Key. Create API key

  5. Verify with your 2FA devices and passkeys. Security Management

  6. Your API key is now created.

For more details on Binance API, please refer to the Binance API Documentation.

Integration with Claude Desktop

Before integrating this MCP server with Claude Desktop, ensure you have the following installed:

  • Claude Desktop

Then build the server using the following command:

sh
npm run build  

To add this MCP server to Claude Desktop:

Create or edit the Claude Desktop configuration file at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Add the following configuration:

json
{
    "mcpServers": {
        "binance-mcp": {
            "command": "node",
            "args": [
                "/Users/Username/Desktop/binance-mcp/build/index.js"
            ],
            "env": {
                "BINANCE_API_KEY": "BINANCE_API_KEY",
                "BINANCE_API_SECRET": "BINANCE_API_SECRET"
            },
            "disabled": false,
            "autoApprove": []
        }
    }
}

Make sure to pass the correct location of the index.js file in the args field.

Restart Claude Desktop for the changes to take effect.

Usage (For Connecting MCP HOST other than Claude)

Start the Server

To start the MCP server, run:

sh
npm start  # or node index.js

Functions

Binance API Functions

  1. Get Binance Account Information - binanceAccountInfo

    Retrieves comprehensive information about your Binance account, including balances, trading permissions, and account status.

  2. Get Binance Account Snapshot - binanceAccountSnapshot

    Gets a snapshot of your Binance account status, including current BTC price information. Includes history for the last 30 days.

  3. Check Binance Order Book - binanceOrderBook

    json
    {
        "symbol": "BTCUSDT"
    }

    Retrieves the current order book for a specified trading pair, showing available buy and sell orders up to 50 levels deep.

  4. Place Spot Market Order - binanceSpotPlaceOrder

    json
    {
        "symbol": "BTCUSDT",
        "side": "BUY",
        "quantity": 0.001,
        // OR
        "quoteOrderQty": 100
    }

    Places a market order for immediate execution at the best available price. Use quantity to specify the amount of base asset or quoteOrderQty to specify the amount in quote currency. Suitable for small orders.

  5. Place TWAP Order - binanceTimeWeightedAveragePriceFutureAlgo

    json
    {
        "symbol": "BTCUSDT",
        "side": "BUY",
        "quantity": 1.0,
        "duration": 3600
    }

    Places a Time-Weighted Average Price (TWAP) order that executes gradually over a specified duration to minimize market impact. Suitable for large orders that might otherwise cause significant price movements.

Model Context Protocol (MCP)

The Model Context Protocol (MCP) is an open standard designed to enhance the way applications interact with AI models and blockchain-based computational systems. MCP establishes structured context that improves the efficiency of automated transactions and decentralized applications.

Benefits of MCP:

  • Standardization: Defines a unified approach for application interactions.
  • Efficiency: Reduces computational overhead and improves transaction speed.
  • Interoperability: Supports integration across multiple platforms and blockchain ecosystems.

Error Handling

When a transaction fails, the server returns an error message with details. Check the console logs for more debugging information. Common error scenarios include:

  • Insufficient funds in the wallet
  • Invalid recipient address
  • Network congestion or RPC issues
  • Binance API authentication errors
  • Trading limit restrictions

License

This project is open-source under the MIT License.

For contributions, bug reports, or feature requests, submit an issue on GitHub.

Installatie

TypingMind
{
  "mcpServers": {
    "binance-mcp": {
      "command": "npx",
      "args": [
        "binance-mcp"
      ],
      "env": {
        "BINANCE_API_KEY": "<BINANCE_API_KEY>",
        "BINANCE_API_SECRET": "<BINANCE_API_SECRET>"
      }
    }
  }
}

Gebruik Binance MCP Server MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Binance MCP Server is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Binance MCP Server toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Binance MCP Server.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "binance-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "binance-mcp"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Binance MCP Server in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Binance MCP Server in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Binance MCP Server gebruiken om me hiermee te helpen?
Binance MCP Server
Zeker. Ik heb het gelezen.
Dit vond ik met Binance MCP Server.

Veelgestelde vragen

Waarvoor wordt de MCP-server Binance MCP Server gebruikt?

Binance MCP Server is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Binance MCP Server MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Binance MCP Server gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Binance MCP Server MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Binance MCP Server verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Binance MCP Server MCP met TypingMind?

Binance MCP Server werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt Binance MCP Server MCP in TypingMind?

Binance MCP Server biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Binance MCP Server MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Binance MCP Server authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇