Cover image
Try Now
2025-01-07

Espejo de https: //github.com/kydlikebtc/mcp-server-bn

3 years

Works with Finder

0

Github Watches

1

Github Forks

1

Github Stars

mcp-server-cex-bn

This MCP Server provides a robust interface for Binance spot trading operations.

中文说明

Features

Trading Operations

  • Configure and store Binance API credentials securely
  • Execute spot trading operations (LIMIT/MARKET orders)
  • Monitor account balances
  • Track and manage open orders
  • Cancel existing orders

Tools

configure_api_keys

Securely store your Binance API credentials:

await configureBinanceApiKeys({
  apiKey: 'your-api-key',
  apiSecret: 'your-api-secret'
});

create_spot_order

Create LIMIT or MARKET orders:

// LIMIT order
await createSpotOrder({
  symbol: 'BTCUSDT',
  side: 'BUY',
  type: 'LIMIT',
  quantity: '0.001',
  price: '40000'
});

// MARKET order
await createSpotOrder({
  symbol: 'BTCUSDT',
  side: 'BUY',
  type: 'MARKET',
  quantity: '0.001'
});

cancel_order

Cancel an existing order:

await cancelOrder({
  symbol: 'BTCUSDT',
  orderId: '12345678'
});

get_balances

Check your account balances:

const balances = await getBalances();
// Returns: { BTC: '0.1', USDT: '1000', ... }

get_open_orders

List all open orders:

const orders = await getOpenOrders({
  symbol: 'BTCUSDT' // Optional: specify symbol
});

Security Considerations

  • Never commit your API keys to version control
  • Use environment variables or secure key storage
  • Restrict API key permissions to only required operations
  • Regularly rotate your API keys

Rate Limits

  • Respect Binance API rate limits
  • Default rate limits:
    • 1200 requests per minute for order operations
    • 100 requests per second for market data
  • Implement proper error handling for rate limit errors

Error Handling

Common error scenarios:

  • Invalid API credentials
  • Insufficient balance
  • Invalid order parameters
  • Rate limit exceeded
  • Network connectivity issues

Example error handling:

try {
  await createSpotOrder({
    symbol: 'BTCUSDT',
    side: 'BUY',
    type: 'LIMIT',
    quantity: '0.001',
    price: '40000'
  });
} catch (error) {
  if (error.code === -2010) {
    console.error('Insufficient balance');
  } else if (error.code === -1021) {
    console.error('Rate limit exceeded');
  }
}

Project Structure

.
├── src/
│   ├── index.ts                 # Server entry point
│   ├── services/
│   │   ├── binance.ts          # Binance API integration
│   │   ├── keystore.ts         # API key management
│   │   └── tools.ts            # Trading tools implementation
│   └── types/
│       ├── binance.ts          # Binance types
│       └── binance-connector.d.ts  # API client types
├── README.md
├── README_CN.md
├── package.json
├── pnpm-lock.yaml
└── tsconfig.json

Development

  1. Set up environment variables:

create .env file in the root directory, and set your Binance API credentials:

BINANCE_API_KEY=your_api_key_here
BINANCE_API_SECRET=your_secret_key_here
  1. Install dependencies:
pnpm install

Build the server:

pnpm build

For development with auto-rebuild:

pnpm watch

Installation

  1. Clone the repository
  2. Install dependencies:
pnpm install
  1. Configure your Binance API credentials in .env
  2. Build and start the server:
pnpm build
pnpm start

### Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which is available as a package script:

```bash
pnpm inspector

The Inspector will provide a URL to access debugging tools in your browser.

mcp-server-bn

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Jan Meindl
  • Builds new GPTs

  • XLwebDev.com
  • PR Professional: Guiding You to Get Media Placements and Publicity Quickly and Effectively

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • OffchainLabs
  • Implementación de la prueba de estaca Ethereum

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • deemkeen
  • Controle su MBOT2 con un combo de potencia: MQTT+MCP+LLM

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • HiveNexus
  • Un bot de chat de IA para equipos pequeños y medianos, que apoyan modelos como Deepseek, Open AI, Claude y Gemini. 专为中小团队设计的 ai 聊天应用 , 支持 Deepseek 、 Open ai 、 Claude 、 Géminis 等模型。

    Reviews

    5 (1)
    Avatar
    user_MrGgbI35
    2025-04-16

    As a loyal user of MCP applications, I highly recommend the MCP Quickstart Weather Server by yu-ko-ba. This server is incredibly efficient, offering accurate and real-time weather updates. It's user-friendly and quick to set up, making it a must-have for anyone needing reliable weather services. Check it out here: https://mcp.so/server/McpQuickstartWeatherServer/yu-ko-ba