Bitget MCP Trading Bot with Claude Code: Setup Guide (2026)

intermediate 25 min · · By Alpha Guy · claude-code

What This Lets You Do

Bitget’s official Agent Hub gives Claude Code access to 58 trading tools across 9 modules — spot, futures, margin, copy trading, and more — over the Model Context Protocol. You can ask Claude to pull quotes, check open positions, execute spot and futures orders, and even monitor or mirror a pro copy-trading account, all in plain language without writing API wrapper code. A demo account mode lets you place test orders against real market data before touching live funds.

This is the same pattern as Bybit MCP, Kraken CLI, and Gemini’s agentic trading — an official exchange server that Claude calls directly. The standout here is the Copy Trading module: Claude can query which master traders are trending, pull their performance stats, and stage a follow order on a position you pick.

How Bitget Agent Hub MCP Works

Bitget ships its MCP integration in two layers that work together:

LayerWhat It IsWhat It Does
bitget-mcp-servernpm packageExposes 58 tools across 9 modules as MCP endpoints Claude can call
Agent Hub (Bitget-AI/agent_hub)Open-source GitHub toolkitCentral installer for MCP, SDK, CLI, skills, and signals; 89 UTA v3 operations
Bitget UTA v3Unified Trading AccountSingle account covering spot, futures, margin, and copy trading through one API

The npm package is the fastest starting point. The Agent Hub repo is for builders who want to go deeper — writing skills, wiring signals, or extending the toolkit with custom modules.

The nine modules exposed as MCP tools:

ModuleWhat Claude Can Do
SpotPlace and cancel spot orders, pull orderbook, get quotes
FuturesOpen and close perpetual positions, check funding rates
AccountRead balances, margin levels, and account summary
MarginCross and isolated margin queries and order placement
Copy TradingList master traders, pull performance, follow or unfollow
ConvertConvert one token to another at market rate
EarnCheck and subscribe to savings or staking products
P2PQuery P2P market listings
BrokerSub-account and rebate management

Public market data tools (quotes, orderbook, candles) work without credentials. Everything in the Account, Spot order, Futures, and Copy Trading modules needs a Bitget API key.

Prerequisites

  • A Bitget account with identity verification complete
  • Node.js 18+ (needed to run the npm MCP server via npx)
  • Claude Code or Claude Desktop installed
  • An amount of capital you are comfortable running through a demo account first

Step 1: Create Bitget API Keys

Bitget uses three-part credentials — key, secret, and passphrase — unlike exchanges that only use a key and secret. You set the passphrase yourself when creating the key; it is not generated for you.

Go to Bitget → Profile → API Management → Create API and configure:

PermissionWhen to grant it
ReadAlways — needed for quotes, balances, and position reads
Spot TradeWhen you want Claude to place spot orders
Futures TradeWhen you want Claude to trade perps
Copy TradeWhen you want Claude to manage copy-trading follows
TransferDo not grant this — the agent does not need it
WithdrawDo not grant this — ever

Set an IP whitelist if you will always run the MCP server from the same machine. Bitget enforces the whitelist at the API level, not just the app level, so a leaked key bound to one IP cannot be used elsewhere.

Store the credentials in your shell environment:

export BITGET_API_KEY=your-api-key
export BITGET_SECRET_KEY=your-secret-key
export BITGET_PASSPHRASE=your-passphrase

Add those to your shell profile or a .env file loaded by your terminal. The MCP server reads them automatically.

Step 2: Install and Configure the MCP Server

The server runs via npx without a global install:

npx -y bitget-mcp-server

That is the command Claude Code runs to start the server process. You do not call it directly — you register it in your MCP config and Claude Code starts it on session launch.

Add it to your Claude Code config at ~/.claude/.mcp.json:

{
  "mcpServers": {
    "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"
      }
    }
  }
}

If you prefer not to store credentials in the config file, set the environment variables in your shell profile and omit the env block entirely — npx will inherit them from the shell.

For Claude Desktop on Mac, the config lives at ~/Library/Application Support/Claude/claude_desktop_config.json — add the same mcpServers block.

Restart Claude Code after saving the config. Run /mcp to confirm the Bitget server shows as connected and lists its tools.

Step 3: Test the Connection With Read-Only Prompts

Before you touch any order tools, confirm the connection with something that only reads public data:

What is the current BTC/USDT spot price on Bitget, and what is the top of the orderbook?

Claude calls the spot market data tool and returns the price and bid/ask. No credentials needed for this call.

Next, test an account read that does need credentials:

What is my Bitget account balance across spot and futures?

If both return correct data, the server is wired up and the API key is working. If the account call fails with a permissions error, double-check the passphrase — it is the most common mistake when setting up Bitget keys.

Step 4: Place a Demo Trade

Bitget supports a demo trading mode that runs orders against live market prices without touching real funds. Before switching Claude to live order placement, run at least a few orders in demo mode to verify that Claude sizes correctly and reads your prompts the way you intended.

To use demo mode, you need a separate set of API keys generated from the Bitget demo environment (available in your account under Demo Trading). Add them to a second entry in your MCP config:

{
  "mcpServers": {
    "bitget-demo": {
      "command": "npx",
      "args": ["-y", "bitget-mcp-server"],
      "env": {
        "BITGET_API_KEY": "your-demo-api-key",
        "BITGET_SECRET_KEY": "your-demo-secret",
        "BITGET_PASSPHRASE": "your-demo-passphrase",
        "BITGET_DEMO": "true"
      }
    }
  }
}

Then ask Claude:

Using the bitget-demo server, open a $100 long on BTC/USDT perp at market with 2x leverage and show me the fill.

Claude calls the futures order tool, the demo engine fills it against the live price, and the result comes back as a structured object. Inspect what Claude sent to the tool: the symbol format, the leverage value, the size calculation. Those habits carry directly to live.

Step 5: Explore the Copy Trading Module

This is the module that sets Bitget MCP apart from most exchange servers. Claude can query the copy trading leaderboard and help you decide who to follow:

Show me the top 5 copy trading masters on Bitget ranked by 30-day ROI. Include their win rate and max drawdown.

Claude calls the Copy Trading module, pulls the leaderboard data, and returns the stats. From there you can ask it to pull the open positions of a specific master, compare two traders, or check whether a master’s recent trades match the strategy they advertise.

When you are ready to follow someone:

Follow master trader [name] with a fixed amount of $50 per trade and a max drawdown stop of 15%.

Keep your follow size small to start. Copy trading performance varies with market conditions, and a master’s historical drawdown may not reflect the next drawdown.

Step 6: Go Live With Spot or Futures Orders

Once you have verified the demo setup and know how Claude sizes and formats orders, switch to your live API keys. Start with the smallest tradeable lot size on a liquid pair:

Buy the minimum lot of ETH/USDT spot at market on Bitget.

Then check the Bitget app to confirm the fill appears in your order history with the right size and price. If the fill is there and the numbers match, your live agent setup is working correctly.

Set a daily notional limit through Bitget’s API key restrictions page before you leave the agent running unattended. A cap on daily trade volume means a runaway loop or a misread prompt cannot spend more than you budgeted for the day.

Useful Starting Prompts

With the server connected and credentials verified, Claude can work across all nine modules:

What is the funding rate for BTC-USDT-SWAP right now, and how does it compare to the 7-day average?
Check my open futures positions and tell me which ones are closest to liquidation at the current price.
I want to DCA $30 into SOL weekly via spot. Draft the order logic and run it twice in demo mode before I go live.
Compare the 30-day performance of the top three copy trading masters. Which one has the best Sharpe-like ratio given their ROI and max drawdown?
Convert $50 of USDT to BNB at the current market rate. Show me the rate before you execute.

The agent handles the credential signing and parameter formatting that would otherwise require 80 lines of boilerplate across Bitget’s REST docs.

What Bitget MCP Does Not Cover

A few things to know before you build on top of it:

  • Withdrawals are not in the trading modules and should not be in your API key permissions. If you did not grant withdraw, the server cannot call it.
  • WebSocket streaming is not exposed as a push channel — Claude pulls data on each call rather than receiving real-time events. For latency-sensitive strategies, direct WebSocket connections are still better.
  • The bitget-mcp-server npm package is separate from the Agent Hub GitHub repo. The npm package is the MCP server; the GitHub repo is a broader toolkit. Start with the npm package.
  • Copy trading settlement happens on Bitget’s backend. Claude stages and initiates follows, but fill prices and execution depend on Bitget’s copy engine, not the agent.

How Bitget MCP Compares to Other Exchange Servers

ExchangeAsset CoveragePaper TradingCopy TradingBest For
Bitget MCPSpot, futures, margin, copy tradingDemo accountYes (full module)Crypto traders who want copy trading or futures via Claude
Bybit MCPSpot, futures, conditional ordersTestnetNoCrypto futures with mandatory AI Sub-Account isolation
Kraken CLI MCPSpot, futures, xStocks, forexBuilt-in paper engineNoMulti-asset traders who want open-source, Rust-based tooling
Gemini AgenticSpot (US regulated)Paper modeNoUS traders wanting a regulated venue with named skill functions
Alpaca MCP V2US stocks, ETFs, options, cryptoFull paper tradingNoUS equity and options traders

For a full comparison of all MCP servers worth using for trading, see the MCP servers for AI trading guide.

FAQ

Do I need to install anything globally? No. The npx -y bitget-mcp-server command downloads and runs the package on demand. Node.js 18+ is the only requirement.

Why does Bitget need three credentials instead of two? Bitget adds a passphrase as a third factor on top of the key and secret. You set it when you create the key. It is not generated — you choose it. Treat it the same as a password: do not reuse it, do not commit it to a repo.

Can Claude trade without me approving each order? Yes, if you grant it standing permissions. Unlike Revolut X (which requires approval on every trade) or Robinhood’s permission prompts, Bitget’s API does not force per-order human confirmation. That means your API key permissions and any daily limits you set in the key restrictions are the main guardrails. Set them tight.

Is demo mode exactly like live? Close, but not identical. Demo fills against live prices, but there is no real order book depth — large sizes fill at mid-market without slippage. Size your demo tests at amounts similar to what you plan to trade live, so the fill behavior is comparable.

Does this work with Cursor or ChatGPT? Yes. The bitget-mcp-server npm package is a standard MCP server. Add the same config block to Cursor’s MCP settings or any ChatGPT MCP integration that supports stdio servers.

Next Steps

Start on demo, watch Claude size at least a dozen orders across different conditions, then move to live with a small daily cap. If you want to see how Bitget compares on the multi-exchange setup — running Bitget alongside a data server like Alpha Vantage — the MCP servers for AI trading guide has the multi-server config pattern. For building a Python bot that runs independently of the MCP layer, the Hyperliquid trading bot tutorial covers the SDK approach on a different DEX.

Disclaimer: This article is for educational purposes only and is not financial advice. Trading cryptocurrencies involves substantial risk of loss. Past performance does not guarantee future results. Always do your own research before making any trading decisions. Read full disclaimer →
Alpha Guy
Alpha Guy

Founder of VibeTradingLab. Ex-Goldman Sachs engineer, 2025 Binance Top 1% Trader. Writes about using AI tools to build trading systems that actually work. Currently nomading between Bali, Dubai, and the Mediterranean.

Got stuck? Have questions?

Join our Telegram group to ask questions, share your bots, and connect with other AI traders.

Join Telegram