MCP Connector

Integrate Bybit for AI Trading

MCP server for Bybit exchange: real-time prices, order book, account balances, and order placement for AI assistants.

Works with bybit

Maintainer of this project? Claim this page to edit the listing.


62
Spark score
out of 100
Updated 7 months ago
Version 1.0.0
Models
universal

Add to Favorites

Why it matters

Connect AI assistants to the Bybit cryptocurrency exchange to access market data, manage accounts, and execute automated trades.

Outcomes

What it gets done

01

Retrieve real-time market data (prices, order books, historical data).

02

Manage account information and wallet balances.

03

Place, modify, and cancel cryptocurrency orders.

04

Integrate with AI platforms like Claude Desktop and Cursor.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-bybit | bash

Capabilities

Tools your agent gets

get_price

Get the current price for a trading symbol

get_orderbook

Get the order book depth for a trading symbol

get_klines

Get historical candlestick data

get_24hr_ticker

Get 24-hour trading statistics

get_account_info

Get account information and balances

get_wallet_balance

Get wallet balance for a specific account type

get_open_orders

Get a list of open/active orders

get_order_history

Get order history

+3 tools

Overview

Bybit MCP Server

An MCP server for Bybit providing real-time market data, account balance management, and order placement/cancellation for AI assistants. Use when an AI assistant needs to check Bybit prices, balances, or order history, or place and cancel orders - test on testnet first.

What it does

An MCP server for the Bybit cryptocurrency exchange that lets AI assistants interact with the trading platform to get real-time market data, manage account balances, and place or cancel orders.

When to use - and when NOT to

Use this connector when an AI assistant needs to check Bybit prices or order books, retrieve account balance and order history, or place and cancel orders on Bybit directly from a chat interface. Test on testnet first - mainnet operations use real funds. Not a fit for exchanges other than Bybit, or for use cases requiring guaranteed execution guarantees beyond what the Bybit V5 API itself provides.

Capabilities

Market data tools: get_price (current price for a trading symbol), get_orderbook (order book depth for a symbol), get_klines (historical candlestick data), and get_24hr_ticker (24-hour trading statistics).

Account tools: get_account_info (account and balance information), get_wallet_balance (wallet balance for a specific account type), get_open_orders (list of open/active orders), and get_order_history (historical orders).

Trading tools: place_order (place a new order), cancel_order (cancel a specific existing order), and cancel_all_orders (cancel all orders for a symbol or category).

Additional features include real-time crypto market data access, account and wallet balance management, order placement and cancellation, historical trading data retrieval, support for both testnet and mainnet environments, automatic API key masking for security, and integration with Claude Desktop and Cursor. It implements the Bybit V5 API endpoints.

How to install

npm install -g bybit-mcp-server

or via npx:

npx bybit-mcp-server

or from source:

git clone https://github.com/your-username/bybit-mcp-server.git
cd bybit-mcp-server
npm install
cp .env.example .env
npm run dev

Configure in Claude Desktop with required environment variables BYBIT_API_KEY and BYBIT_API_SECRET, and optional BYBIT_ENVIRONMENT (testnet or mainnet), BYBIT_BASE_URL, and DEBUG:

{
  "mcpServers": {
    "bybit": {
      "command": "npx",
      "args": ["bybit-mcp-server"],
      "env": {
        "BYBIT_API_KEY": "your_testnet_api_key",
        "BYBIT_API_SECRET": "your_testnet_api_secret",
        "BYBIT_ENVIRONMENT": "testnet"
      }
    }
  }
}

Example natural-language requests it supports include checking the current price of BTCUSDT on Bybit, showing the order book for ETHUSDT with 50 levels, retrieving your account balance, placing a limit buy order for 0.1 BTC at $45000, and cancelling all open orders for BTCUSDT. Documentation is available in English, Chinese, and Japanese.

Who it's for

Traders and developers who want to check Bybit prices, order books, and account balances, or place and cancel orders, directly through an AI assistant like Claude Desktop or Cursor - starting on testnet before moving to mainnet with real funds.

Source README

MCP server for the Bybit cryptocurrency exchange that enables AI assistants to interact with trading platforms for retrieving market data, managing accounts, and executing automated trades.

Installation

NPM Global

npm install -g bybit-mcp-server

NPX

npx bybit-mcp-server

From Source

git clone https://github.com/your-username/bybit-mcp-server.git
cd bybit-mcp-server
npm install
cp .env.example .env
npm run dev

Configuration

Claude Desktop (Testnet)

{
  "mcpServers": {
    "bybit": {
      "command": "npx",
      "args": ["bybit-mcp-server"],
      "env": {
        "BYBIT_API_KEY": "your_testnet_api_key",
        "BYBIT_API_SECRET": "your_testnet_api_secret",
        "BYBIT_ENVIRONMENT": "testnet"
      }
    }
  }
}

Claude Desktop (Mainnet)

{
  "mcpServers": {
    "bybit": {
      "command": "npx",
      "args": ["bybit-mcp-server"],
      "env": {
        "BYBIT_API_KEY": "your_mainnet_api_key",
        "BYBIT_API_SECRET": "your_mainnet_api_secret",
        "BYBIT_ENVIRONMENT": "mainnet"
      }
    }
  }
}

Available Tools

Tool Description
get_price Get the current price of a trading symbol
get_orderbook Get the order book depth for a trading symbol
get_klines Get historical candlestick data
get_24hr_ticker Get 24-hour trading statistics
get_account_info Get account information and balances
get_wallet_balance Get wallet balance for a specific account type
get_open_orders Get a list of open/active orders
get_order_history Get order history
place_order Place a new order
cancel_order Cancel an existing order
cancel_all_orders Cancel all orders for a symbol or category

Features

  • Access real-time cryptocurrency market data
  • Manage account balance and wallet
  • Place and cancel orders
  • Retrieve historical trading data
  • Support for both testnet and mainnet environments
  • Automatic API key masking for security
  • Integration with Claude Desktop and Cursor

Environment Variables

Required

  • BYBIT_API_KEY - Your Bybit API key
  • BYBIT_API_SECRET - Your Bybit API secret

Optional

  • BYBIT_ENVIRONMENT - Environment to use (testnet or mainnet)
  • BYBIT_BASE_URL - Custom API base URL
  • DEBUG - Enable debug logging

Usage Examples

Get the current price of BTCUSDT on Bybit
Show me the order book for ETHUSDT with 50 levels
Get my account balance
Place a limit buy order for 0.1 BTC at $45000
Cancel all my open orders for BTCUSDT

Resources

Notes

⚠️ WARNING: Mainnet operations use real funds. Testnet is recommended for testing. Always thoroughly test on testnet before using mainnet. Implements Bybit V5 API endpoints. Multilingual documentation is available in English, Chinese, and Japanese.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.