Bybit MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Bybit MCP Server get the current price of BTCUSDT"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bybit MCP Server
Multi-language Documentation
A Model Context Protocol (MCP) server for Bybit exchange, enabling AI coding tools like Claude Code and Cursor to interact with Bybit's trading platform.
Quick Start
Installation
npm install -g bybit-mcp-serverConfiguration
This MCP server can be used with various AI tools that support MCP:
Claude Code Configuration
For Testnet (Recommended - Safe for testing):
Add to claude_desktop_config.json:
{
"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"
}
}
}
}For Mainnet (⚠️ WARNING: Uses real funds):
Add to claude_desktop_config.json:
{
"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"
}
}
}
}Cursor Configuration
Use the same configuration as Claude Code above, but add to .cursor/mcp_config.json with mcp.servers instead of mcpServers.
Environment Setup
Option 1: Testnet (Recommended)
BYBIT_API_KEY=your_testnet_api_key_here
BYBIT_API_SECRET=your_testnet_api_secret_here
BYBIT_ENVIRONMENT=testnet
DEBUG=falseOption 2: Mainnet (⚠️ Real funds)
BYBIT_API_KEY=your_mainnet_api_key_here
BYBIT_API_SECRET=your_mainnet_api_secret_here
BYBIT_ENVIRONMENT=mainnet
DEBUG=falseGetting API Keys
For Testnet:
Visit Bybit Testnet
Register an account
Go to API Management and create API keys
Enable required permissions (read, trade)
For Mainnet:
Visit Bybit
Complete account verification
Go to API Management and create API keys
Enable required permissions (read, trade)
Set IP restrictions for additional security
Related MCP server: CCXT MCP Server
Available Tools
Market Data
get_price- Get current price for a trading symbolget_orderbook- Get order book depth for a trading symbolget_klines- Get historical candlestick dataget_24hr_ticker- Get 24-hour trading statistics
Account Management
get_account_info- Get account information and balancesget_wallet_balance- Get wallet balance for specific account typeget_open_orders- Get list of open/active ordersget_order_history- Get historical orders
Trading (⚠️ Can use real funds on mainnet)
place_order- Place a new ordercancel_order- Cancel an existing ordercancel_all_orders- Cancel all orders for a symbol or category
Usage Examples
Ask your AI assistant to:
"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"
"Get my trading history for the last 20 orders"
Security
⚠️ Important Security Notes:
TESTNET is the default and recommended environment for safety
MAINNET operations use real funds - use with extreme caution
API keys are automatically redacted from error messages
Always test thoroughly on testnet before using mainnet
Trading operations will display warnings when using mainnet
🔐 API Key Safety:
Never commit API keys to version control
Use environment variables for credentials
Regularly rotate your API keys
Use IP restrictions in Bybit API settings
Development
npm run build # Compile TypeScript
npm run dev # Development mode
npm run lint # Run linting
npm run typecheck # Type checking
npm run watch # Watch modeLocal Development
Clone the repository:
git clone https://github.com/your-username/bybit-mcp-server.git
cd bybit-mcp-serverInstall dependencies:
npm installSet up environment:
cp .env.example .env
# Edit .env with your API credentialsRun in development mode:
npm run devConfiguration Options
Variable | Description | Default | Required |
| Your Bybit API key | - | ✅ |
| Your Bybit API secret | - | ✅ |
|
|
| ❌ |
| Custom API base URL | Auto-detected | ❌ |
| Enable debug logging |
| ❌ |
API Reference
This server implements Bybit's V5 API endpoints. For detailed API documentation:
Contributing
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
MIT License - see LICENSE file for details.
Support
Available Tools
11 toolscancel_all_ordersA
Cancel all orders for a symbol or category (⚠️ WARNING: Affects real orders on mainnet)
Inputs: category (required), symbol.
cancel_orderC
Cancel an existing order (⚠️ WARNING: Affects real orders on mainnet)
Inputs: category (required), symbol (required), orderId, orderLinkId.
get_24hr_tickerC
Get 24-hour trading statistics for symbols
Inputs: symbol.
get_account_infoB
Get account information and balances
Inputs: no named parameters.
get_klinesC
Get historical candlestick data for a trading symbol
Inputs: symbol (required), interval (required), limit.
get_open_ordersC
Get list of open/active orders
Inputs: category (required), symbol, limit.
get_orderbookC
Get the order book depth for a trading symbol
Inputs: symbol (required), limit.
get_order_historyC
Get historical orders
Inputs: category (required), symbol, limit.
get_priceC
Get the current price for a trading symbol
Inputs: symbol (required).
get_wallet_balanceC
Get wallet balance for a specific account type
Inputs: accountType (required), coin.
place_orderB
Place a new order (⚠️ WARNING: Can use real funds on mainnet)
Inputs: category (required), symbol (required), side (required), orderType (required), +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Every tool has a clearly distinct purpose with no ambiguity. Each targets a specific action on a distinct resource (e.g., cancel_all_orders vs. cancel_order, get_24hr_ticker vs. get_price, get_account_info vs. get_wallet_balance). The descriptions reinforce this clarity, making misselection unlikely.
All tools follow a consistent verb_noun pattern with snake_case throughout. The naming convention is predictable (e.g., get_*, cancel_*, place_order), making it easy for agents to understand and navigate the toolset without confusion.
With 11 tools, the count is well-scoped for a cryptocurrency exchange server. Each tool earns its place by covering essential trading operations (e.g., market data, order management, account info), avoiding bloat while providing comprehensive functionality.
The toolset offers complete CRUD/lifecycle coverage for trading on Bybit. It includes market data (get_price, get_klines, get_orderbook), order management (place_order, cancel_order, get_open_orders, get_order_history), account operations (get_account_info, get_wallet_balance), and auxiliary functions (cancel_all_orders, get_24hr_ticker), with no obvious gaps that would cause agent failures.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Trade Papertrade BTC and ETH perps from Claude, ChatGPT, Codex, Cursor and any MCP client.
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
Related MCP Servers
- AlicenseBqualityFmaintenanceA Model Context Protocol server that provides read-only access to Bybit's cryptocurrency exchange API, allowing users to query real-time cryptocurrency data using natural language.1231 npm16MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact with cryptocurrency exchanges through CCXT, allowing for tasks like fetching balances, market data, creating orders, and trading operations in a standardized way.8MIT
- AlicenseBqualityBmaintenanceA Model Context Protocol server that provides Claude Code with seamless access to Binance exchange API functionality for market data retrieval, account management, and trading operations.10366 npm34MIT
- FlicenseBqualityDmaintenanceA comprehensive MCP server providing full access to Bybit's v5 API for real-time market data, trading operations, and account management. It enables AI assistants to execute trades, manage positions, and monitor wallet balances with built-in safety controls for both testnet and production environments.2230 PyPI6-