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 What is the current price of BTC/USDT?"
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
A Model Context Protocol server for the Bybit V5 API.
Connect AI assistants (Claude, Cursor, etc.) to Bybit for market data, trading, and account management — locally via stdio or remotely via HTTP with OAuth authentication.
Quick Start
Local (stdio)
uvx bybit-mcp-serverRemote (Docker)
docker pull ghcr.io/workspace/bybit-mcp-server:latest
docker run -p 8000:8000 \
-e BYBIT_MCP_ADMIN_PASSWORD=your-password \
-e BYBIT_MCP_SECRET_KEY=$(python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())") \
-e BYBIT_MCP_ISSUER_URL=https://your-server.example.com \
-v bybit-data:/app/data \
ghcr.io/workspace/bybit-mcp-server:latestRelated MCP server: MCP Bitget Trading Server
Transport Modes
Mode | Transport | Auth | Credentials | Use Case |
Local |
| None | Env vars | Claude Desktop, Cursor |
Remote |
| OAuth 2.0 | Web settings page | Claude Custom Connectors, shared servers |
MCP Client Configuration
Claude Desktop (Local)
Add to claude_desktop_config.json:
{
"mcpServers": {
"bybit": {
"command": "uvx",
"args": ["bybit-mcp-server"],
"env": {
"BYBIT_API_KEY": "your-api-key",
"BYBIT_API_SECRET": "your-api-secret",
"BYBIT_TESTNET": "true"
}
}
}
}Claude Custom Connectors (Remote)
Deploy the server with Docker (see Deployment)
In Claude settings, add a Custom Connector:
URL:
https://your-server.example.com
Claude handles OAuth automatically — you'll be prompted to log in with admin credentials
After connecting, visit
https://your-server.example.com/settingsto enter your Bybit API keys
Cursor (Local)
Add to .cursor/mcp.json:
{
"mcpServers": {
"bybit": {
"command": "uvx",
"args": ["bybit-mcp-server"],
"env": {
"BYBIT_API_KEY": "your-api-key",
"BYBIT_API_SECRET": "your-api-secret",
"BYBIT_TESTNET": "true"
}
}
}
}Available Tools (27)
Category | Tools | Permission |
Market |
|
|
Account |
|
|
Trade |
|
|
Position |
|
|
Asset |
|
|
Deployment
Docker Compose
services:
bybit-mcp:
image: ghcr.io/workspace/bybit-mcp-server:latest
ports:
- "8000:8000"
environment:
- BYBIT_MCP_ADMIN_PASSWORD=your-secure-password
- BYBIT_MCP_SECRET_KEY=your-fernet-key
- BYBIT_MCP_ISSUER_URL=https://your-server.example.com
volumes:
- bybit-data:/app/data
restart: unless-stopped
volumes:
bybit-data:Generate a Fernet key:
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"Environment Variables
Local Mode (stdio)
Variable | Default | Description |
| — | API key from Bybit |
| — | API secret from Bybit |
|
| Use testnet ( |
|
| Permission mode: |
| — | Request receive window in ms |
Remote Mode (streamable-http)
Variable | Default | Description |
|
| Set to |
|
| HTTP bind address |
|
| HTTP port |
|
| Admin login username |
| — | Admin login password (required) |
| — | Fernet key for encrypting API keys at rest (required) |
| — | Public URL with scheme, e.g. |
|
| SQLite database file path |
Development
git clone https://github.com/workspace/bybit-mcp-server.git
cd bybit-mcp-server
uv sync --all-extras
uv run pytest
uv run bybit-mcp-serverDocumentation
Full docs at workspace.github.io/bybit-mcp-server
License
MIT
Available Tools
28 toolsamend_orderADestructive
Amend an existing order (HIGH risk - requires confirmation).
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name
orderId: Order ID (either orderId or orderLinkId required)
orderLinkId: User custom order ID
qty: New order quantity
price: New order price
triggerPrice: New trigger price
takeProfit: New take profit price
stopLoss: New stop loss price
Inputs: symbol (required), category (required), qty, price, +5 more. Returns: result
cancel_all_ordersADestructive
Cancel all open orders (HIGH risk - requires confirmation).
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name
baseCoin: Base coin
settleCoin: Settle coin
Inputs: category (required), symbol, baseCoin, settleCoin. Returns: result
cancel_orderADestructive
Cancel an existing order (MEDIUM risk - no confirmation required).
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name
orderId: Order ID (either orderId or orderLinkId required)
orderLinkId: User custom order ID
Inputs: symbol (required), category (required), orderId, orderLinkId. Returns: result
confirm_orderADestructive
Execute a previously prepared HIGH-risk operation after review.
When a HIGH-risk tool (place_order, amend_order, cancel_all_orders, set_leverage,
internal_transfer) is called, it returns a confirmation summary instead of executing.
Call this tool with the confirmation_id to actually execute the operation.
Args:
confirmation_id: The confirmation_id returned by the HIGH-risk tool.
Inputs: confirmation_id (required). Returns: result
get_account_infoARead-only
Get account margin mode and configuration info.
Inputs: no named parameters. Returns: result
get_closed_pnlARead-only
Query closed profit and loss records.
Args:
category: Product type - linear, inverse
symbol: Symbol name
startTime: Start timestamp in milliseconds
endTime: End timestamp in milliseconds
limit: Limit per page (max 100, default 50)
cursor: Pagination cursor
Inputs: category (required), limit, cursor, symbol, +2 more. Returns: result
get_coin_balanceARead-only
Query coin balance of a specific account type.
Args:
accountType: Account type - UNIFIED, CONTRACT, SPOT, OPTION, FUND
coin: Coin name
memberId: UID (required when querying sub UID balance)
withTransferSafeAmount: Query transfer safe amount (0 or 1)
Inputs: accountType (required), coin, memberId, withTransferSafeAmount. Returns: result
get_coin_infoARead-only
Query coin information including chain info, deposit/withdraw status.
Args:
coin: Coin name. If omitted, returns all coins.
Inputs: coin. Returns: result
get_fee_rateBRead-only
Get trading fee rate.
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name
baseCoin: Base coin
Inputs: symbol, baseCoin, category. Returns: result
get_funding_rate_historyARead-only
Query historical funding rate.
Args:
category: Product type - linear, inverse
symbol: Symbol name (e.g. BTCUSDT)
startTime: Start timestamp in milliseconds
endTime: End timestamp in milliseconds
limit: Limit for data size per page (max 200, default 200)
Inputs: symbol (required), category (required), limit, endTime, +1 more. Returns: result
get_instruments_infoBRead-only
Query instrument specifications and trading rules.
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name
status: Symbol status filter - Trading, Settling, etc.
baseCoin: Base coin
limit: Limit for data size per page
cursor: Pagination cursor
Inputs: category (required), limit, cursor, status, +2 more. Returns: result
get_klineARead-only
Query kline/candlestick data.
Args:
category: Product type - spot, linear, inverse
symbol: Symbol name (e.g. BTCUSDT)
interval: Kline interval - 1,3,5,15,30,60,120,240,360,720,D,M,W
start: Start timestamp in milliseconds
end: End timestamp in milliseconds
limit: Limit for data size per page (max 200, default 200)
Inputs: symbol (required), category (required), interval (required), end, +2 more. Returns: result
get_open_interestARead-only
Get open interest for each symbol.
Args:
category: Product type - linear, inverse
symbol: Symbol name (e.g. BTCUSDT)
intervalTime: Interval - 5min, 15min, 30min, 1h, 4h, 1d
startTime: Start timestamp in milliseconds
endTime: End timestamp in milliseconds
limit: Limit for data size per page (max 200, default 50)
cursor: Pagination cursor
Inputs: symbol (required), category (required), intervalTime (required), limit, +3 more. Returns: result
get_open_ordersARead-only
Query unfilled or partially filled orders.
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name
baseCoin: Base coin (for linear/inverse only)
orderId: Order ID
orderLinkId: User custom order ID
limit: Limit per page (max 50, default 20)
cursor: Pagination cursor
Inputs: category (required), limit, cursor, symbol, +3 more. Returns: result
get_orderbookARead-only
Query order book depth data.
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name (e.g. BTCUSDT)
limit: Depth limit (spot: 1-200, default 1; derivatives: 1-500, default 25)
Inputs: symbol (required), category (required), limit. Returns: result
get_order_historyARead-only
Query order history.
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name
orderId: Order ID
orderLinkId: User custom order ID
orderStatus: Order status - New, PartiallyFilled, Filled, Cancelled, etc.
limit: Limit per page (max 50, default 20)
cursor: Pagination cursor
Inputs: category (required), limit, cursor, symbol, +3 more. Returns: result
get_positionsBRead-only
Query real-time position data.
Args:
category: Product type - linear, inverse, option
symbol: Symbol name
baseCoin: Base coin
settleCoin: Settle coin
limit: Limit per page (max 200, default 20)
cursor: Pagination cursor
Inputs: category (required), limit, cursor, symbol, +2 more. Returns: result
get_public_tradesBRead-only
Query recent public trading data.
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name (e.g. BTCUSDT)
baseCoin: Base coin (for option only)
optionType: Option type - Call, Put (for option only)
limit: Limit for data size (spot: 1-60 default 60; others: 1-1000 default 500)
Inputs: symbol (required), category (required), limit, baseCoin, +1 more. Returns: result
get_server_timeARead-only
Get the current Bybit server time.
Inputs: no named parameters. Returns: result
get_tickersARead-only
Get latest price ticker for a symbol.
Args:
category: Product type - spot, linear, inverse, option
symbol: Trading pair (e.g. BTCUSDT). If omitted, returns all tickers for the category.
Inputs: category (required), symbol. Returns: result
get_trade_historyBRead-only
Query trade execution history.
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name
orderId: Order ID
startTime: Start timestamp in milliseconds
endTime: End timestamp in milliseconds
limit: Limit per page (max 100, default 50)
cursor: Pagination cursor
Inputs: category (required), limit, cursor, symbol, +3 more. Returns: result
get_transfer_historyBRead-only
Query internal transfer records.
Args:
transferId: UUID of transfer
coin: Coin name
status: Transfer status - SUCCESS, PENDING, FAILED
startTime: Start timestamp in milliseconds
endTime: End timestamp in milliseconds
limit: Limit per page (max 50, default 20)
cursor: Pagination cursor
Inputs: coin, limit, cursor, status, +3 more. Returns: result
get_wallet_balanceARead-only
Get wallet balance and account risk information.
Args:
accountType: Account type - UNIFIED, CONTRACT, SPOT, OPTION, FUND
coin: Coin name (e.g. BTC). If omitted, returns all coins with balance.
Inputs: accountType (required), coin. Returns: result
internal_transferADestructive
Transfer funds between account types under same UID (HIGH risk, requires 'full' mode).
Args:
transferId: UUID (generate a UUID before calling)
coin: Coin name (e.g. USDT)
amount: Transfer amount (as string)
fromAccountType: Source account type - UNIFIED, CONTRACT, SPOT, OPTION, FUND
toAccountType: Destination account type
Inputs: coin (required), amount (required), transferId (required), toAccountType (required), +1 more. Returns: result
place_orderADestructive
Place an order (HIGH risk - requires confirmation).
Args:
category: Product type - spot, linear, inverse, option
symbol: Symbol name (e.g. BTCUSDT)
side: Buy or Sell
orderType: Market or Limit
qty: Order quantity (as string)
price: Order price (required for Limit orders)
timeInForce: Time in force - GTC, IOC, FOK, PostOnly
orderLinkId: User custom order ID
reduceOnly: Reduce only (true means close position)
takeProfit: Take profit price
stopLoss: Stop loss price
Inputs: qty (required), side (required), symbol (required), category (required), +7 more. Returns: result
set_auto_add_marginADestructive
Turn on/off auto-add-margin for isolated margin position (MEDIUM risk).
Args:
category: Product type - linear
symbol: Symbol name
autoAddMargin: 0 to turn off, 1 to turn on
positionIdx: Position index (0: one-way, 1: hedge buy, 2: hedge sell)
Inputs: symbol (required), category (required), autoAddMargin (required), positionIdx. Returns: result
set_leverageADestructive
Set leverage for a position (HIGH risk - requires confirmation).
Args:
category: Product type - linear, inverse
symbol: Symbol name
buyLeverage: Buy leverage (0 to max for risk limit)
sellLeverage: Sell leverage (0 to max for risk limit)
Inputs: symbol (required), category (required), buyLeverage (required), sellLeverage (required). Returns: result
set_trading_stopADestructive
Set take profit, stop loss, or trailing stop for a position (MEDIUM risk).
Args:
category: Product type - linear, inverse
symbol: Symbol name
takeProfit: Take profit price
stopLoss: Stop loss price
trailingStop: Trailing stop distance
tpTriggerBy: TP trigger price type - LastPrice, MarkPrice, IndexPrice
slTriggerBy: SL trigger price type
tpSize: TP order quantity
slSize: SL order quantity
positionIdx: Position index (0: one-way, 1: hedge buy, 2: hedge sell)
Inputs: symbol (required), category (required), slSize, tpSize, +6 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 28 tools
Each tool targets a distinct operation, with clear descriptions that prevent confusion. Overlaps like get_wallet_balance and get_coin_balance are differentiated by specific parameters and purposes.
All tools use a consistent snake_case naming pattern with intuitive prefixes (get_, set_, place_, amend_, cancel_, etc.) that clearly indicate the action.
28 tools cover a wide range of exchange operations without being excessive. The count is appropriate for the depth of functionality provided, though slightly on the higher side.
The tool surface covers the core trading lifecycle (market data, orders, positions, account, transfers) comprehensively. Minor gaps exist, such as the absence of direct deposit/withdraw tools and advanced position margin adjustments.
Maintenance
Related MCP Connectors
Trade 16 crypto exchanges + MetaTrader 5 from your AI assistant via one MCP connection.
OpenFinance gives any AI agent easy trading across every major market through one hosted MCP server. Trade crypto spot and perpetuals on Hyperliquid with market, limit and TWAP orders, leverage and margin control. Trade stocks, indices, commodities, forex and pre-IPO names as Hyperliquid HIP-3 perps. Trade Polymarket prediction markets with odds, order books, positions, PnL and trader leaderboards. Swap and bridge across 40+ EVM chains and Solana with Relay and Jupiter, find memecoins across 200+ chains, launch tokens on Robinhood Chain and Solana, and buy crypto with card, bank or UPI. Write actions are designed to ask for your confirmation first. Connect with OAuth (sign in to OpenFinance and approve) or an API key. Works with Claude, ChatGPT, Cursor, VS Code, Codex and any MCP client. No install. Home: https://openfinance.tech/agents · Docs: https://docs.openfinance.tech · GitHub: https://github.com/openfinance-tech/mcp
Read-only MetaTrader 5 for AI agents: balances, positions, history and prices. Sign in with OAuth.
Let AI agents read and trade MetaTrader 5 accounts. Sign in with OAuth; read-only unless you allow.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables cryptocurrency trading on Bybit exchange through comprehensive market data access, account management, and automated trading operations. Features smart position validation, trailing stop losses, and risk management tools with demo mode support for safe testing.21MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Bitget cryptocurrency exchange for spot and futures trading. Supports real-time market data, order management, account balances, leverage control, and position tracking with demo trading capabilities.176MIT

Bybit MCP Serverofficial
AlicenseCqualityBmaintenanceA 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.4001,212 npm44MIT- FlicenseNot gradedqualityDmaintenanceEnables LLM agents to access BingX cryptocurrency exchange market data and execute trades through the official API, with support for account management, order creation, and technical indicators.-