bitget-mcp-server 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,225 @@
1
+ <p align="center">
2
+ <img src="https://img.bitgetimg.com/multiLang/web/d54dfa8d6e4ccc3b1d42.svg" alt="Bitget" width="200" />
3
+ </p>
4
+
5
+ <h1 align="center">Bitget MCP Server</h1>
6
+
7
+ <p align="center">
8
+ <strong>Connect AI assistants to Bitget — trade, query, and manage your crypto portfolio through natural language.</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/bitget-mcp-server"><img src="https://img.shields.io/npm/v/bitget-mcp-server.svg?style=flat-square&color=cb3837" alt="npm version" /></a>
13
+ <a href="https://www.npmjs.com/package/bitget-mcp-server"><img src="https://img.shields.io/npm/dm/bitget-mcp-server.svg?style=flat-square&color=blue" alt="npm downloads" /></a>
14
+ <a href="https://www.npmjs.com/package/bitget-mcp-server"><img src="https://img.shields.io/node/v/bitget-mcp-server.svg?style=flat-square&color=43853d" alt="node version" /></a>
15
+ <a href="https://www.npmjs.com/package/bitget-mcp-server"><img src="https://img.shields.io/npm/l/bitget-mcp-server.svg?style=flat-square" alt="license" /></a>
16
+ <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-8A2BE2?style=flat-square" alt="MCP compatible" /></a>
17
+ <a href="https://www.bitget.com"><img src="https://img.shields.io/badge/Exchange-Bitget-00b897?style=flat-square" alt="Bitget" /></a>
18
+ </p>
19
+
20
+ <p align="center">
21
+ <a href="#quick-start">Quick Start</a> •
22
+ <a href="#available-modules">Modules</a> •
23
+ <a href="#tool-highlights">Tools</a> •
24
+ <a href="#configuration">Configuration</a> •
25
+ <a href="#security">Security</a>
26
+ </p>
27
+
28
+ ---
29
+
30
+ ## What is this?
31
+
32
+ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that gives AI assistants — **Cursor**, **Claude Desktop**, **Windsurf**, and others — direct access to the Bitget cryptocurrency exchange.
33
+
34
+ > **One config, 56+ tools.** Ask your AI to check prices, place trades, manage positions, and more.
35
+
36
+ ---
37
+
38
+ ## Features
39
+
40
+ | | Feature | Description |
41
+ |---|---------|-------------|
42
+ | **56+ tools** | Full API coverage | Spot, futures, margin, copy trading, convert, earn, P2P, broker |
43
+ | **Read-only mode** | `--read-only` flag | Disable all write/trade operations for safe exploration |
44
+ | **Module filtering** | `--modules` flag | Expose only the tools you need |
45
+ | **Smart detection** | Dynamic capabilities | Unavailable modules auto-hidden from AI tool lists |
46
+ | **Agent-first** | `system_get_capabilities` | Machine-readable capability discovery for agent planning |
47
+ | **Rate limiting** | Token bucket | Client-side rate limiting per endpoint prevents API abuse |
48
+ | **Auth** | HMAC-SHA256 | Industry-standard Bitget API authentication |
49
+ | **Structured errors** | Error codes + suggestions | Machine-parseable errors with actionable suggestions |
50
+
51
+ ---
52
+
53
+ ## Quick Start
54
+
55
+ ### Prerequisites
56
+
57
+ - **Node.js** >= 18
58
+ - A [**Bitget API key**](https://www.bitget.com/account/newapi) with appropriate permissions
59
+
60
+ ### Cursor
61
+
62
+ Add to `.cursor/mcp.json` in your project root:
63
+
64
+ ```json
65
+ {
66
+ "mcpServers": {
67
+ "bitget": {
68
+ "command": "npx",
69
+ "args": ["-y", "bitget-mcp-server", "--modules", "all"],
70
+ "env": {
71
+ "BITGET_API_KEY": "your-api-key",
72
+ "BITGET_SECRET_KEY": "your-secret-key",
73
+ "BITGET_PASSPHRASE": "your-passphrase"
74
+ }
75
+ }
76
+ }
77
+ }
78
+ ```
79
+
80
+ ### Claude Desktop
81
+
82
+ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
83
+
84
+ ```json
85
+ {
86
+ "mcpServers": {
87
+ "bitget": {
88
+ "command": "npx",
89
+ "args": ["-y", "bitget-mcp-server", "--modules", "all"],
90
+ "env": {
91
+ "BITGET_API_KEY": "your-api-key",
92
+ "BITGET_SECRET_KEY": "your-secret-key",
93
+ "BITGET_PASSPHRASE": "your-passphrase"
94
+ }
95
+ }
96
+ }
97
+ }
98
+ ```
99
+
100
+ ### Read-Only Mode
101
+
102
+ For safe exploration without trading risk:
103
+
104
+ ```json
105
+ {
106
+ "mcpServers": {
107
+ "bitget": {
108
+ "command": "npx",
109
+ "args": ["-y", "bitget-mcp-server", "--modules", "all", "--read-only"],
110
+ "env": {
111
+ "BITGET_API_KEY": "your-api-key",
112
+ "BITGET_SECRET_KEY": "your-secret-key",
113
+ "BITGET_PASSPHRASE": "your-passphrase"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Available Modules
123
+
124
+ | Module | Tools | Description |
125
+ |:-------|:-----:|:------------|
126
+ | `spot` | 13 | Spot market data + order placement & management |
127
+ | `futures` | 14 | Futures market data + trading + leverage + positions |
128
+ | `account` | 8 | Assets, transfers, withdrawals, deposits, sub-accounts |
129
+ | `margin` | 7 | Cross/isolated margin trading, borrow & repay |
130
+ | `copytrading` | 5 | Copy trading with auto trader selection |
131
+ | `convert` | 3 | Coin conversion with real-time quoted prices |
132
+ | `earn` | 3 | Savings & staking (auto-detected availability) |
133
+ | `p2p` | 2 | P2P merchant list and order history |
134
+ | `broker` | 3 | Broker account and API key management |
135
+
136
+ > **Default:** `spot`, `futures`, `account`. Use `--modules all` to enable everything.
137
+
138
+ ---
139
+
140
+ ## Tool Highlights
141
+
142
+ ### Market Data *(no auth required)*
143
+
144
+ | Tool | Description |
145
+ |:-----|:------------|
146
+ | `spot_get_ticker` / `futures_get_ticker` | Real-time price and 24h stats |
147
+ | `spot_get_depth` / `futures_get_depth` | Live order book |
148
+ | `spot_get_candles` / `futures_get_candles` | K-line / candlestick data |
149
+ | `futures_get_funding_rate` | Current and historical funding rates |
150
+ | `futures_get_open_interest` | Open interest by symbol |
151
+
152
+ ### Trading
153
+
154
+ | Tool | Description |
155
+ |:-----|:------------|
156
+ | `spot_place_order` / `futures_place_order` | Place single or batch orders |
157
+ | `spot_place_plan_order` | Trigger / stop-loss / take-profit orders |
158
+ | `futures_set_leverage` | Adjust leverage per symbol |
159
+ | `futures_get_positions` | View current open positions |
160
+
161
+ ### Account & Transfers
162
+
163
+ | Tool | Description |
164
+ |:-----|:------------|
165
+ | `get_account_assets` | Balances across all account types |
166
+ | `transfer` | Internal transfers between spot, futures, funding |
167
+ | `get_deposit_address` | Generate deposit addresses |
168
+ | `withdraw` | On-chain withdrawals |
169
+
170
+ ### Copy Trading
171
+
172
+ | Tool | Description |
173
+ |:-----|:------------|
174
+ | `copy_get_traders` | Browse available elite traders |
175
+ | `copy_place_order` | Follow a trader (auto-selects when `traderId` omitted) |
176
+
177
+ ### Agent Utilities
178
+
179
+ | Tool | Description |
180
+ |:-----|:------------|
181
+ | `system_get_capabilities` | Full module availability snapshot for planning |
182
+
183
+ ---
184
+
185
+ ## Configuration
186
+
187
+ ### CLI Options
188
+
189
+ ```
190
+ bitget-mcp-server [options]
191
+
192
+ --modules <list> Comma-separated modules (default: spot,futures,account)
193
+ Use "all" to load all modules
194
+ --read-only Disable all write/trade operations
195
+ --help Show help
196
+ --version Show version
197
+ ```
198
+
199
+ ### Environment Variables
200
+
201
+ | Variable | Required | Description |
202
+ |:---------|:---------|:------------|
203
+ | `BITGET_API_KEY` | Yes * | Bitget API key |
204
+ | `BITGET_SECRET_KEY` | Yes * | Bitget secret key |
205
+ | `BITGET_PASSPHRASE` | Yes * | Bitget API passphrase |
206
+ | `BITGET_API_BASE_URL` | No | API base URL (default: `https://api.bitget.com`) |
207
+ | `BITGET_TIMEOUT_MS` | No | Request timeout in ms (default: `15000`) |
208
+
209
+ > \* Required for private endpoints. Public market data tools work without auth.
210
+
211
+ ---
212
+
213
+ ## Security
214
+
215
+ - API credentials are passed via **environment variables**, never hardcoded or logged
216
+ - **`--read-only` mode** prevents all write operations at the server level
217
+ - All private requests are signed with **HMAC-SHA256**
218
+ - **Client-side rate limiting** prevents accidental API abuse
219
+ - Structured error responses never leak credentials or internal state
220
+
221
+ ---
222
+
223
+ ## License
224
+
225
+ [MIT](./LICENSE)
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
6
6
 
7
7
  // src/constants.ts
8
8
  var SERVER_NAME = "bitget-mcp-server";
9
- var SERVER_VERSION = "1.0.0";
9
+ var SERVER_VERSION = "1.0.2";
10
10
  var MODULES = [
11
11
  "spot",
12
12
  "futures",