mcp-server-cex-bn
Mirror of
MCP-Mirror
README
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
- 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
- Install dependencies:
pnpm install
Build the server:
pnpm build
For development with auto-rebuild:
pnpm watch
Installation
- Clone the repository
- Install dependencies:
pnpm install
- Configure your Binance API credentials in
.env
- 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
Recommended Servers
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

chromia-mcp
Enables AI to interact with Chromia Wallet for sending $CHR transactions.
TripleWhale MCP Server
An implementation of Model Context Protocol (MCP) that allows users to interact with TripleWhale's e-commerce analytics platform using natural language queries through Claude Desktop.
Adamik MCP Server
Enables read and write interactions with 60+ blockchain networks through Claude Desktop, providing a standardized multi-chain API for transaction management, account insights, staking, and token interactions.
Open-Ledger-MCP-Server
A Model Context Protocol (MCP) server implementation for the OpenLedger API. This server provides structured context to AI models according to the MCP specification.
ntropy-mcp MCP Server
Enables enriching banking data with the Ntropy API, providing tools to create account holders and enrich transactions efficiently.
Iaptic MCP Server
A server for interacting with the Iaptic API, allowing AI models like Claude to query customer, purchase, and transaction data, as well as retrieve statistical insights.
Bitrefill Search and Shop
This MCP wraps Bitrefill public API to allow agents to search for products and shop using cryptocurrencies like Bitcoin, Ethereum, Solana, and many more.
MCP EVM Signer
A server that securely manages Ethereum private keys locally and enables Claude for Desktop to interact with EVM-compatible blockchains through Infura.
Cryptocurrency Daemon MCP Server
Enables secure interactions with cryptocurrency daemon RPC interfaces through AI assistants, supporting transaction management, wallet operations, and daemon monitoring for Bitcoin-derived cryptocurrencies.