Bybit MCP Server
A production-ready MCP server for Bybit — 396 tools covering market data, trading, positions, account management, assets, loans, earn products, referral queries, tax reports, and real-time WebSocket streams
에이전트 강화
게시자의 자체 명령입니다. PlugMCP 엔드포인트가 아닙니다.
Host a copy with our keys and logs.
npx -y [email protected]Claude Code에는 로컬 명령용 설치 링크가 없습니다. 아래 명령을 복사해 터미널에서 실행합니다.
claude mcp add bybit-exchange-trading-mcp -- npx -y bybit-official-trading-server@2.1.28터미널에서 실행합니다.
{ "mcpServers": { "bybit-exchange-trading-mcp": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}claude_desktop_config.json
원격 URL인가요, 내 컴퓨터에서 실행하는 명령인가요? 두 설치 방식의 차이
PlugMCP에서 실행
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
실행게시자 제공
A production-ready MCP server for Bybit — 396 tools covering market data, trading, positions, account management, assets, loans, earn products, referral queries, tax reports, and real-time WebSocket streams
MCP server for Bybit's V5 API — 382 tools spanning market data, trading, positions, assets, earn and WebSocket streams.
Bybit MCP Server enables AI assistants like Claude, Cursor, VS Code, and other MCP-compatible clients to interact directly with the Bybit cryptocurrency exchange. Query live market data, manage your account, and monitor real-time streams — all through natural language.
npx bybit-official-trading-server@latestPOV execution requires a 5–3600 second interval and a positive quantity or value limit. A duration may add a time limit; it cannot replace the quantity or value limit. OneTime execution is unavailable through MCP because the API ignores those limits in that mode.
Step 1 — Get your Bybit API credentials (skip if you only need market data)
Option A — HMAC-SHA256 (standard, recommended for most users)
BYBIT_API_KEY + BYBIT_API_SECRET in your configOption B — RSA-SHA256 (self-generated key pair)
openssl genrsa -out bybit_private.pem 2048
openssl rsa -in bybit_private.pem -pubout -out bybit_public.pem
chmod 600 bybit_private.pem
bybit_public.pem into the public key fieldBYBIT_API_KEY + BYBIT_API_PRIVATE_KEY_PATH (absolute path to bybit_private.pem) in your configStep 2 — Connect to your AI assistant
Choose the section below that matches your tool (Claude Desktop, Cursor, or VS Code).
Step 3 — Verify the connection
After configuring, restart your AI assistant and ask:
"What's the current BTCUSDT price?"
If you get a live price back, the server is connected and working.
Step 4 — Let the AI learn the full capability in one prompt (optional but recommended)
Paste the following into your AI assistant to have it read the official documentation and start helping you trade:
Please read https://raw.githubusercontent.com/bybit-exchange/trading-mcp/main/README.md save it as a mcp, and help me trade on Bybit.
The AI will read the README, understand all available tools, and be ready to assist with market data queries, account management, and more.
Market data tools work without credentials. Authenticated tools require BYBIT_API_KEY plus exactly one signing credential:
BYBIT_API_SECRET. Works with System-generated API keys.BYBIT_API_PRIVATE_KEY_PATH pointing to a PEM file on disk. Required for Self-generated (user-uploaded) RSA key pairs. The server adds X-BAPI-SIGN-TYPE: 2 automatically.Quick rule: chose "System-generated" on Bybit → use HMAC. Chose "Self-generated" → use RSA.
If both
BYBIT_API_SECRETandBYBIT_API_PRIVATE_KEY_PATHare set (e.g. a system-level env var conflicts with your MCP config), RSA takes precedence and a warning is printed to the server log. RemoveBYBIT_API_SECRETto suppress the warning.
First-time setup: Claude Desktop may offer "Always allow" for tool access. Each write operation still requires a separate approval form. Use a trusted MCP client: the server relies on its approval response.
1. Find your config file
Open the file in any text editor (create it if it doesn't exist).
2. Add the MCP server config
HMAC mode (System-generated API key):
{
"mcpServers": {
"bybit": {
"command": "npx",
"args": ["-y", "bybit-official-trading-server@latest"],
"env": {
"BYBIT_API_KEY": "your_api_key",
"BYBIT_API_SECRET": "your_api_secret"
}
}
}
}
RSA mode (Self-generated API key):
{
"mcpServers": {
"bybit": {
"command": "npx",
"args": ["-y", "bybit-official-trading-server@latest"],
"env": {
"BYBIT_API_KEY": "your_api_key",
"BYBIT_API_PRIVATE_KEY_PATH": "/absolute/path/to/bybit_private.pem"
}
}
}
}
Replace the values with your actual Bybit credentials. Use one signing mode only — do not set both
BYBIT_API_SECRETandBYBIT_API_PRIVATE_KEY_PATH. If the file already has other MCP servers, add the"bybit"block inside the existing"mcpServers"object.
3. Restart Claude Desktop
Quit and reopen Claude Desktop. The Bybit tools will be available automatically on next launch.
For testnet:
{
"mcpServers": {
"bybit": {
"command": "npx",
"args": ["-y", "bybit-official-trading-server@latest"],
"env": {
"BYBIT_API_KEY": "your_testnet_api_key",
"BYBIT_API_SECRET": "your_testnet_api_secret",
"BYBIT_TESTNET": "true"
}
}
}
}
1. Find your config file
Create the file if it doesn't exist.
2. Add the MCP server config
HMAC mode (System-generated API key):
{
"mcpServers": {
"bybit": {
"command": "npx",
"args": ["-y", "bybit-official-trading-server@latest"],
"env": {
"BYBIT_API_KEY": "your_api_key",
"BYBIT_API_SECRET": "your_api_secret"
}
}
}
}
RSA mode (Self-generated API key):
{
"mcpServers": {
"bybit": {
"command": "npx",
"args": ["-y", "bybit-official-trading-server@latest"],
"env": {
"BYBIT_API_KEY": "your_api_key",
"BYBIT_API_PRIVATE_KEY_PATH": "/absolute/path/to/bybit_private.pem"
}
}
}
}
3. Restart Cursor
After saving the file, restart Cursor. The Bybit MCP server will be listed under Settings → MCP.
1. Find or create your MCP config
In your project root (or workspace), create .vscode/mcp.json.
HMAC mode (System-generated API key):
{
"servers": {
"bybit": {
"type": "stdio",
"command": "npx",
"args": ["-y", "bybit-official-trading-server@latest"],
"env": {
"BYBIT_API_KEY": "your_api_key",
"BYBIT_API_SECRET": "your_api_secret"
}
}
}
}
RSA mode (Self-generated API key):
{
"servers": {
"bybit": {
"type": "stdio",
"command": "npx",
"args": ["-y", "bybit-official-trading-server@latest"],
"env": {
"BYBIT_API_KEY": "your_api_key",
"BYBIT_API_PRIVATE_KEY_PATH": "/absolute/path/to/bybit_private.pem"
}
}
}
}
2. Enable MCP in VS Code settings
Open VS Code Settings (Cmd+, / Ctrl+,), search for mcp, and ensure MCP support is enabled for your AI extension (e.g. GitHub Copilot).
3. Reload the window
Run Developer: Reload Window from the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) to pick up the new config.
Total: 396 tools
Once connected to an AI assistant, you can use natural language:
Market data:
Account & Asset:
User & Sub-accounts:
WebSocket / Real-time:
WebSocket tools are compatible with MCP's request/response model:
timeoutMs (default: 5000 ms)This makes real-time data accessible in a single tool call without managing persistent connections.
BYBIT_API_SECRET) and RSA-SHA256 (via BYBIT_API_PRIVATE_KEY_PATH) per Bybit's V5 API specificationchmod 600 and never commit it to source controlIf you've configured the server but your AI assistant shows no tools or "No MCP servers configured":
Claude Code reads MCP server config from ~/.claude.json (per-project), not from ~/.claude/settings.json. The recommended way to add the server is via CLI:
claude mcp add bybit -- npx -y bybit-official-trading-server@latest
This writes the config to the correct location.
node / npx if neededSome environments spawn subprocesses without loading your shell profile (.zshrc / .zprofile), so PATH may not include the Node.js bin directory. Find the full path and use it explicitly:
# Find your npx path
which npx
# Example: /usr/local/bin/npx
MCP servers connect at session startup. After adding or changing config, you must exit and restart your AI assistant for changes to take effect.
Test that the server can start and respond to MCP protocol:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1"}}}' | npx -y bybit-official-trading-server@latest
Your AI client manages the MCP server process itself via stdio. A manually started server instance is completely separate — the client won't connect to it. Let the client handle the lifecycle automatically.
# Install dependencies
npm install
# Start the server in development mode
npm run dev
# Type check
npm run typecheck
# Build for production
npm run build
Cryptocurrency trading involves substantial risk of loss. Please read the following before use:
BYBIT_TESTNET=true)Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)MIT
MCP server for Bybit's V5 API — 382 tools spanning market data, trading, positions, assets, earn and WebSocket streams.
{ "mcpServers": { "bybit-exchange-trading-mcp": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}도구
아직 도구 목록이 없습니다. 원격 서버는 첫 상태 확인 후에 도구 목록이 생깁니다.
FAQ
이 페이지에서 Cursor, Claude Desktop, Claude Code 또는 VS Code용 stdio 설정을 복사합니다. PlugMCP 프록시가 아니라 게시자의 설치 방식을 사용합니다.
이 레코드에는 필수 환경 변수가 등록되어 있지 않습니다.
Trading은(는) stdio를 통해 로컬에서 실행됩니다.
마지막 확인: 2026-10-28. MCP server for Bybit's V5 API — 382 tools spanning market data, trading, positions, assets, earn and WebSocket streams.