bybit-mcp
Click on "Install 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-mcpShow me my Bybit account balance."
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
The most comprehensive MCP server for Bybit ā 247 tools covering the entire Bybit V5 API
Quick Start ⢠Features ⢠Configuration ⢠Tools Reference ⢠Troubleshooting ⢠Contributing
šÆ Overview
Bybit MCP Server enables AI assistants like Claude, Cursor, ChatGPT, and other MCP-compatible clients to interact directly with the Bybit cryptocurrency exchange. Execute trades, manage portfolios, analyze markets, and automate strategies ā all through natural language.
Why Bybit MCP?
š„ Complete Coverage ā 247 tools spanning every Bybit V5 API endpoint
š Secure by Design ā API credentials never leave your machine
šļø Read-Only Mode ā Use all market tools without any API key
š” Triple Transport ā STDIO, SSE, and Streamable HTTP
š Universal Compatibility ā Works with Claude Desktop, Cursor, ChatGPT, and any MCP client
ā” Zero Config Start ā Just
uv run bybit.pyand go
Related MCP server: Bybit MCP Server
⨠Features
š Trading & Markets
Spot Trading ā Market & limit orders, batch operations
Derivatives ā Linear & inverse perpetuals
Order Management ā Amend, cancel, batch, DCP
Market Data ā Klines, orderbook, tickers, funding rates
Open Interest ā Long/short ratio, ADL alerts
š° Earn & Lending
Simple Earn ā Stake, redeem, yield tracking
Crypto Loans ā Old & new (fixed + flexible)
Leveraged Tokens ā Subscribe & redeem
Spot Margin ā Cross-margin trading
OTC Lending ā Institutional loan management
š¦ Account & Assets
Wallet ā Deposits, withdrawals, transfers
Multi-Account ā Sub-accounts, universal transfers
Asset Convert ā Crypto-to-crypto, small balance, fiat
Margin Modes ā Cross, isolated, portfolio margin
Risk Management ā MMP, leverage, TP/SL
š ļø Advanced
Spread Trading ā Spread instruments & orders
Block Trading (RFQ) ā Request for quote workflow
Broker ā Earnings, rate limits, vouchers
Strategy ā Built-in arbitrage detection
Announcements ā Exchange news & system status
š Quick Start
Method 1: Ask AI to Install (Recommended)
Simply tell your AI assistant:
"Help me install the Bybit MCP server from https://github.com/JohnnyWic/bybit-mcp"
Your AI will clone the repo, install dependencies, and configure everything automatically. Works with Claude Code, Cursor, and other MCP-compatible clients.
Method 2: Manual Setup
1. Install
git clone https://github.com/JohnnyWic/bybit-mcp.git
cd bybit-mcp
uv syncRequires Python ā„ 3.13 and uv.
2. Add to Your MCP Client
Add the following to your MCP config file:
Client | Config File |
Claude Desktop |
|
Cursor |
|
Claude Code | Run |
JSON config (Claude Desktop / Cursor):
{
"mcpServers": {
"bybit-mcp": {
"command": "uv",
"args": ["--directory", "/path/to/bybit-mcp", "run", "bybit.py"]
}
}
}Claude Code CLI:
claude mcp add bybit-mcp -- uv --directory /path/to/bybit-mcp run bybit.py3. Configure API Key (Optional)
Create a .env file in the project root:
cp .env.example .envBYBIT_API_KEY=your_api_key_here
BYBIT_SECRET_KEY=your_secret_key_here
BYBIT_TESTNET=falseOr pass credentials inline in the MCP config:
{
"mcpServers": {
"bybit-mcp": {
"command": "uv",
"args": [
"--directory", "/path/to/bybit-mcp", "run", "bybit.py",
"--bybit-api-key", "YOUR_API_KEY",
"--bybit-secret-key", "YOUR_SECRET_KEY"
]
}
}
}š” No API key? No problem! All 23 market data tools work without authentication.
š Security Note: Never commit your
.envfile. It's already in.gitignore.
Transport Modes
uv run bybit.py # STDIO (default)
uv run bybit.py --transport sse --port 8000 # SSE
uv run bybit.py --transport streamable-http --port 8000 # Streamable HTTPš¬ Usage Examples
Check Market Price
"What's the current price of BTC?"Place a Trade
"Buy 0.01 BTC at market price on spot"Analyze Funding Rates
"Show me the funding rate history for ETHUSDT over the last 24 hours"Manage Positions
"What are my open positions? Set a stop loss at 95000 for my BTCUSDT long"Portfolio Overview
"Show my unified account balance and all open orders"š Available Tools (246)
Module | Tools | Description |
Market | 23 | Prices, klines, orderbook, funding rates, open interest, tickers (no API key needed) |
Trade | 15 | Market/limit orders, amend, cancel, batch operations, DCP |
Account | 25 | Balance, fee rates, margin mode, collateral, MMP, transaction log |
Position | 11 | Positions, leverage, TP/SL, auto-margin, move positions |
Asset | 41 | Deposits, withdrawals, transfers, convert, fiat, address management |
Lending | 39 | Crypto loans ā legacy + new (fixed & flexible) |
User | 15 | Sub-accounts, API key management, affiliate |
RFQ | 15 | Block trading ā create/cancel RFQ, quotes, executions |
Spot Margin | 12 | Spot margin trading, borrow, repay, collateral |
Spread | 11 | Spread instruments, orderbook, trading |
Broker | 10 | Broker earnings, rate limits, vouchers |
OTC | 7 | Institutional OTC lending |
Pre-Upgrade | 6 | Pre-upgrade historical data queries |
Earn | 6 | Staking, redemption, yield tracking |
Leveraged Token | 5 | Leveraged token subscribe/redeem |
Announcement | 2 | Exchange announcements, system status |
Strategy | 2 | Built-in arbitrage pair detection |
Total: 246 tools
uv run python -c "
import src.tools
from src import mcp
for name in sorted(mcp._tool_manager._tools):
print(name)
"šļø Project Structure
bybit-mcp/
āāā bybit.py # Entry point (backward compatible)
āāā src/
ā āāā __init__.py # Shared FastMCP instance
ā āāā main.py # CLI: dotenv + argparse + logging + mcp.run()
ā āāā client.py # Config singleton + HMAC signing + HTTP methods
ā āāā tools/
ā āāā __init__.py # Auto-imports all tool modules
ā āāā market.py # 23 tools ā public market data
ā āāā trade.py # 15 tools ā order management
ā āāā account.py # 25 tools ā account operations
ā āāā position.py # 11 tools ā position management
ā āāā asset.py # 41 tools ā wallet & transfers
ā āāā lending.py # 39 tools ā crypto loans
ā āāā earn.py # 6 tools ā staking & yield
ā āāā leveraged_token.py # 5 tools ā leveraged tokens
ā āāā spot_margin.py # 12 tools ā spot margin
ā āāā user.py # 15 tools ā sub-accounts & API keys
ā āāā broker.py # 10 tools ā broker services
ā āāā otc.py # 7 tools ā OTC lending
ā āāā spread.py # 11 tools ā spread trading
ā āāā rfq.py # 15 tools ā block trading RFQ
ā āāā pre_upgrade.py # 6 tools ā pre-upgrade data
ā āāā announcement.py # 2 tools ā announcements
ā āāā strategy.py # 2 tools ā arbitrage strategies
āāā .env.example # Environment variable template
āāā pyproject.toml # Project config & dependencies
āāā LICENSE # MIT Licenseš§ Troubleshooting
MCP Server Not Loading / "No MCP servers configured"
If you've configured the server but /mcp shows no tools or "No MCP servers configured":
1. Check the correct configuration file
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-mcp -- uv --directory /path/to/bybit-mcp run bybit.pyThis writes the config to the correct location. If you manually edited ~/.claude/settings.json, the server won't be found.
2. Use the full path to uv
Claude Code spawns MCP server subprocesses without loading your shell profile (.zshrc / .zprofile), so PATH may not include ~/.local/bin. Use the absolute path:
# Find your uv path
which uv
# Example output: /Users/yourname/.local/bin/uv
# Add with full path
claude mcp add bybit-mcp -- /Users/yourname/.local/bin/uv --directory /path/to/bybit-mcp run bybit.py3. Restart Claude Code after configuration changes
MCP servers connect at session startup. After adding or changing config, you must exit and restart Claude Code for changes to take effect.
4. Verify the server starts correctly
Test that the server can start and respond to MCP protocol:
# Test import
uv run python -c "from src.main import main; print('Import OK')"
# Test MCP initialize handshake
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1"}}}' | uv run bybit.pyIf the import fails, run uv sync to install dependencies.
5. Don't run the server manually
Claude Code manages the MCP server process itself via stdio. A manually started server instance is completely separate ā Claude Code won't connect to it. Let Claude Code handle the lifecycle automatically.
Quick Diagnosis Checklist
Symptom | Cause | Fix |
| Config in wrong file ( | Use |
Config exists but tools don't load |
| Use absolute path to |
Tools loaded before but not now | Session not restarted after config change | Restart Claude Code |
Server works manually but not in Claude Code | Manual server is a separate process | Don't start manually; let Claude Code manage it |
Import errors on startup | Dependencies not installed | Run |
ā ļø Disclaimer
This software is provided for educational and informational purposes only.
Not Financial Advice ā This tool does not provide financial, investment, or trading advice
Use at Your Own Risk ā Cryptocurrency trading involves substantial risk of loss
API Security ā Protect your API credentials; use IP restrictions and disable withdrawal permissions
Test First ā Always test on Bybit Testnet before using real funds (
--testnetflag)No Warranty ā The software is provided "as is" without warranty of any kind
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Adding New Tools
Add your tool function in the appropriate
src/tools/*.pymoduleDecorate with
@mcp.tool()Use
_public_getfor unauthenticated or_signed_get/_signed_postfor authenticated endpointsThat's it ā tools are auto-registered on import
š Resources
Resource | Description |
Official Bybit API documentation | |
Practice trading with test funds | |
Model Context Protocol spec | |
Fast Python package manager |
š License
This project is licensed under the MIT License ā see the LICENSE file for details.
Built with ā¤ļø for the Bybit trading community
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI coding tools like Claude Code and Cursor to interact with Bybit's trading platform for market data retrieval, account management, and trading operations.Last updated111613MIT
- 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.Last updated225

Bybit MCP Serverofficial
AlicenseBqualityCmaintenanceA production-ready MCP server for Bybit ā 206 tools covering market data, trading, positions, account management, assets, and real-time WebSocket streams. Enables AI assistants to interact directly with the Bybit cryptocurrency exchange through natural language.Last updated10032823MIT- Alicense-qualityCmaintenanceAn MCP server that enables AI agents to scan the market, manage positions, and retrieve trading metrics for Bybit through natural language commands.Last updated1MIT
Related MCP Connectors
MCP server for Gainium ā manage trading bots, deals, and balances via AI assistants
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JohnnyWic/bybit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server