Bitunix MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
BitUnix Trading MCP Server
A powerful Model Context Protocol (MCP) server that provides a bridge between Claude Code and the BitUnix Exchange API. It supports both Futures and Spot trading with advanced order management.
β¨ Features
π Futures Trading
Order Placement: Market and Limit orders with hedge mode support.
Leverage & Margin: Set leverage and margin mode (Isolated/Cross) per symbol.
Position Management: Close positions, flash-close (emergency exit), and monitor PnL.
Batch Orders: Execute up to 5 orders for the same symbol in a single call.
π‘οΈ Advanced TP/SL
Precise Control: Set Take Profit and Stop Loss with specific trigger types (Mark/Last Price).
Modification Workaround: Includes an internal "Cancel + Re-place" logic to bypass BitUnix API limitations, ensuring reliable TP/SL updates.
π° Spot Trading & Conversion
Spot Wallet: Full access to spot balances and trading pairs.
Auto-Conversion: A unique
convert_currencytool that automates the transfer between Futures and Spot wallets to convert assets (e.g., USDC β USDT) in one step.
Related MCP server: Trade-MCP
π οΈ Installation
Prerequisites
Node.js: Used for the MCP bridge wrapper.
Python 3.10+: Used for the core logic (FastMCP).
BitUnix API Keys: Required for private operations.
Setup
Open the
.envfile and enter your API keys.Where to get keys? Log in to your BitUnix account and go to: https://www.bitunix.com/account/apiManagement
Manual path: Hover over your Profile Icon (top-right) -> Click "API"
Enter your
BITUNIX_API_KEYandBITUNIX_SECRET_KEYin the file.Install Python dependencies:
pip install -r requirements.txt
π Usage
Claude Code Configuration
Add the server to your .mcp.json file. Ensure the path to index.js is correct:
{
"mcpServers": {
"bitunix": {
"command": "node",
"args": ["./Bitunix-trading-mcp/index.js"]
}
}
}Manual Startup (for Testing)
You can start the server manually to verify it's working:
node index.jsUpon startup, the server will output its status to stderr, including the Python path and process ID. It will then wait for MCP JSON-RPC messages on stdin.
Key Tools & Examples
get_account: Check your available balance.place_order: Open a new position.place_tpsl_order: Set protection for an open position.convert_currency: Move and convert funds between wallets.
Example Tool Call (JSON-RPC):
{
"method": "tools/call",
"params": {
"name": "get_account",
"arguments": { "margin_coin": "USDT" }
}
}βοΈ How it Works (Architecture)
The server uses a dual-layer architecture:
Node.js Wrapper (
index.js): Acts as the entry point for Claude Code. It searches for a valid Python executable on your system, loads environment variables from.env, and spawns the Python process.Python Core (
main.py): Uses theFastMCPframework to define and register trading tools. It handles the actual API communication with BitUnix using theBitunixClientclass.
β Troubleshooting
1. Python not found
The Node wrapper tries to find python3, python, or py. If it fails, ensure Python is in your system's PATH. You can check what the server is using by looking at the terminal output:
Python: C:\Path\To\python.exe
2. API Errors (Code 2, 10002, etc.)
Error 10002: Often caused by trying to set leverage/margin inside an order call. The server requires you to set these separately first.
Error 2: Usually means a required parameter is missing or formatted incorrectly.
3. Connection Issues
Ensure your .env file is in the Bitunix-trading-mcp directory and contains valid keys. The server will output a warning if the .env file cannot be read.
π Security
Environment Variables: Sensitive keys are loaded from
.envand are excluded from Git via.gitignore.Hedge Mode: The server defaults to Hedge Mode (separate Long/Short) as required by professional trading standards.
π License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Trade Papertrade BTC and ETH perps from Claude, ChatGPT, Codex, Cursor and any MCP client.
Trade 16 crypto exchanges + MetaTrader 5 from your AI assistant via one MCP connection.
Create and manage trading strategies, bots, webhooks and signals from any MCP client.
Generate and backtest futures trading strategies from Claude with AlphaPrime (Valynox).
Related MCP Servers
- AlicenseBqualityBmaintenanceA Model Context Protocol server that provides Claude Code with seamless access to Binance exchange API functionality for market data retrieval, account management, and trading operations.10366 npm34MIT
- FlicenseNot gradedqualityDmaintenanceEnables trading automation through Zerodha Kite Connect API, allowing users to place buy/sell orders and fetch holdings via MCP tools accessible to Claude Desktop and other MCP-compatible clients.-
- AlicenseAqualityDmaintenanceProvides comprehensive Binance trading capabilities through Claude Desktop, including account management, spot and futures trading, market data, and advanced analysis tools.35366 npm10MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to monitor and execute Binance trading strategies through a bounded MCP tool interface, with risk controls and audit logging.-