Connect AI assistants to Bitget — trade, query, and manage your crypto portfolio through natural language.
Bitget Agent Hub connects AI assistants and automation tools to the Bitget exchange. Two integration modes:
- MCP Server — for Claude Code, Cursor, Codex, and any MCP-compatible AI
- CLI (
bgc) + Skill — for shell-based AI agents (Claude Code skills, OpenClaw)
Once configured, your AI can check prices, query balances, place and cancel orders, manage futures positions, set leverage, and transfer funds — all through natural language.
| Package | What it does | Install |
|---|---|---|
bitget-mcp-server |
MCP server — integrates with Claude, Cursor, Codex | npx -y bitget-mcp-server |
bitget-client |
CLI tool (bgc) — shell access to all 36 tools |
npm install -g bitget-client |
bitget-skill |
Claude Code skill — AI uses bgc as a live API bridge |
npm install -g bitget-skill |
bitget-core |
Shared REST client and tool definitions | internal |
All integrations need a Bitget API key for private endpoints (account, trading). Public market data works without credentials.
- Log in to bitget.com → Settings → API Management
- Create a new API key — select Read and/or Trade permissions
- Save your API Key, Secret Key, and Passphrase
Gives AI assistants direct access to 36 Bitget tools via the Model Context Protocol.
claude mcp add -s user \
--env BITGET_API_KEY=your-api-key \
--env BITGET_SECRET_KEY=your-secret-key \
--env BITGET_PASSPHRASE=your-passphrase \
bitget \
-- npx -y bitget-mcp-serverAdd to ~/.codex/config.toml (or the project-level codex.toml):
[[mcp_servers]]
name = "bitget"
command = "npx"
args = ["-y", "bitget-mcp-server"]
[mcp_servers.env]
BITGET_API_KEY = "your-api-key"
BITGET_SECRET_KEY = "your-secret-key"
BITGET_PASSPHRASE = "your-passphrase"OpenClaw invokes MCP servers via its tool gateway. Add to your OpenClaw agent config:
{
"mcp_servers": {
"bitget": {
"command": "npx",
"args": ["-y", "bitget-mcp-server"],
"env": {
"BITGET_API_KEY": "your-api-key",
"BITGET_SECRET_KEY": "your-secret-key",
"BITGET_PASSPHRASE": "your-passphrase"
}
}
}
}→ See docs/packages/bitget-mcp.md for per-client config snippets.
A command-line interface for all 36 Bitget tools. Outputs JSON — ideal for scripting and AI agent shell use.
npm install -g bitget-client
export BITGET_API_KEY="your-api-key"
export BITGET_SECRET_KEY="your-secret-key"
export BITGET_PASSPHRASE="your-passphrase"
# Market data (no credentials needed)
bgc spot spot_get_ticker --symbol BTCUSDT
bgc futures futures_get_funding_rate --productType USDT-FUTURES --symbol BTCUSDT
# Account queries
bgc account get_account_assets
bgc futures futures_get_positions --productType USDT-FUTURES
# Trading (shows confirmation prompt first)
bgc spot spot_place_order --orders '[{"symbol":"BTCUSDT","side":"buy","orderType":"limit","price":"95000","size":"0.01"}]'The skill lets Claude Code autonomously call Bitget APIs by running bgc commands via the Bash tool — no server process required.
# 1. Install bgc
npm install -g bitget-client
# 2. Install skill (auto-copies to ~/.claude/skills/bitget-skill/)
npm install -g bitget-skill
# 3. Set credentials in your shell environment
export BITGET_API_KEY="your-api-key"
export BITGET_SECRET_KEY="your-secret-key"
export BITGET_PASSPHRASE="your-passphrase"After installation, Claude Code picks up the skill automatically. Try: "查一下我的 BTC 仓位" or "What's the current BTC price?"
→ See docs/packages/bitget-skill.md for details.
For OpenClaw webhook-triggered automation, use the bgc CLI directly in your action scripts:
#!/bin/bash
# Example: alert action that checks balance when triggered
bgc account get_account_assets | jq '.data.data[] | select(.coin == "USDT")'Or use the MCP integration above to give your OpenClaw AI agent full Bitget tool access.
| Module | Tools | Loaded by default |
|---|---|---|
spot |
13 | ✅ |
futures |
14 | ✅ |
account |
8 | ✅ |
margin |
7 | — |
copytrading |
5 | — |
convert |
3 | — |
earn |
3 | — |
p2p |
2 | — |
broker |
3 | — |
Default: spot + futures + account = 36 tools (fits within Cursor's 40-tool limit).
Load everything: --modules all
- Credentials via environment variables only — never hardcoded or logged
--read-onlyflag disables all write operations at server level- All authenticated requests signed with HMAC-SHA256
- Client-side rate limiting prevents accidental API abuse
- Write operations (orders, transfers) require explicit confirmation before execution
# Prerequisites: Node.js ≥ 18, pnpm ≥ 8
pnpm install
pnpm -r build
pnpm -r test