- Home
- MCP servers
- MCP Bitget Trading Server
MCP Bitget Trading Server
- typescript
3
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"gagarinyury-mcp-bitget-trading": {
"command": "node",
"args": [
"/path/to/MCP-bitget-trading/dist/server.js"
],
"env": {
"LOG_LEVEL": "info",
"BITGET_WS_URL": "wss://wspap.bitget.com/v2/ws/public",
"BITGET_API_KEY": "your_key",
"BITGET_SANDBOX": "true",
"BITGET_BASE_URL": "https://api.bitget.com",
"BITGET_PASSPHRASE": "your_passphrase",
"BITGET_SECRET_KEY": "your_secret",
"RATE_LIMIT_REQUESTS_PER_SECOND": "10"
}
}
}
}You can run an MCP server that connects to Bitget to expose market data, orders, balances, leverage control, and demo trading capabilities to AI clients. This guide walks you through installing, configuring, and starting the MCP Bitget Trading Server so your assistant can retrieve data and execute trades in real time.
How to use
You will run the MCP Bitget Trading Server as a local process and connect your MCP client to it. The server exposes tools for market data (prices, tickers, order books, candles), account information (balances, positions, margin, orders), and trading operations (place/cancel orders, set leverage). Use the client to call these tools to fetch data or perform trades in demo or live mode depending on your configuration. All input parameters are validated and rate limited to protect against API abuse.
How to install
# prerequisites: Node.js 18+, npm or yarn
# 1. Clone the project
git clone https://github.com/gagarinyury/MCP-bitget-trading.git
cd MCP-bitget-trading
# 2. Install dependencies
npm install
# 3. Configure environment for live or demo trading
# Copy sample env file and edit credentials
cp .env.example .env
# 4. Build the project
npm run build
# 5. Start the MCP server
npm start
Configuration and security
Create a .env file in the project root and populate your Bitget credentials and settings. Use the sandbox mode for paper trading to avoid real funds during testing.
# Bitget API Configuration
BITGET_API_KEY=your_api_key_here
BITGET_SECRET_KEY=your_secret_key_here
BITGET_PASSPHRASE=your_passphrase_here
# Environment settings
BITGET_SANDBOX=true # true for demo trading
BITGET_BASE_URL=https://api.bitget.com
BITGET_WS_URL=wss://wspap.bitget.com/v2/ws/public
# Optional settings
LOG_LEVEL=info
RATE_LIMIT_REQUESTS_PER_SECOND=10
Troubleshooting and tips
If you encounter sign signature or environment errors, verify your API keys and ensure your system time is synchronized. Use demo mode to safely validate flows before attempting live trading. The server enforces rate limiting to protect against API abuse, and inputs are validated to prevent invalid requests.
Notes on deployment
When integrating with Claude Desktop or other MCP clients, ensure the client points to the local MCP server process started by npm start or the runtime command you use. If you prefer running the server via a direct node invocation, use the provided path to the built server, for example dist/server.js.
Available tools
getPrice
Get current price for a symbol (spot or futures) from the Bitget market data view.
getTicker
Fetch full ticker information including 24h statistics for a symbol.
getOrderBook
Retrieve market depth data with configurable depth levels for a symbol.
getCandles
Obtain OHLCV historical candles for technical analysis.
getBalance
Query real-time balance information for your account assets.
getPositions
List current futures positions, optionally filtered by symbol.
getMarginInfo
Retrieve futures margin account details.
getOrders
List open orders, optionally filtered by symbol and status.
placeOrder
Submit new market or limit orders for a symbol.
cancelOrder
Cancel an existing order by its ID for a given symbol.
setLeverage
Adjust leverage for futures positions on a symbol.