Skip to main content

Getting Started

This guide covers local mode (stdio) for use with Claude Desktop, Cursor, and similar MCP clients. For remote deployment, see Remote Setup.

Prerequisites

  • Python 3.11+
  • A Bybit account with API keys
  • An MCP-compatible client (Claude Desktop, Cursor, etc.)

1. Get API Keys

  1. Log into Bybit → Account → API Management
  2. Create a new API key (System-generated, HMAC)
  3. For testing, use Testnet: https://testnet.bybit.com

2. Configure MCP Client

Claude Desktop

Add to your 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",
"BYBIT_MODE": "read"
}
}
}
}

Cursor

Add to your .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",
"BYBIT_MODE": "read"
}
}
}
}

3. Environment Variables

VariableDefaultDescription
BYBIT_API_KEYAPI key from Bybit
BYBIT_API_SECRETAPI secret from Bybit
BYBIT_TESTNETtrueUse testnet (true) or mainnet (false)
BYBIT_MODEreadPermission mode: read, trade, or full
BYBIT_RECV_WINDOWRequest receive window in ms (e.g. 5000)

4. Permission Modes

ModeAllowed Tools
readMarket data, account info, all read-only queries
tradeEverything in read + orders, cancel, leverage, TP/SL
fullEverything in trade + internal transfers

HIGH-risk write operations (place_order, amend_order, cancel_all_orders, set_leverage, internal_transfer) use a confirmation flow — the server returns a summary first, and the AI must call confirm_order to execute.

5. Verify

Ask your AI assistant:

"What's the current BTC price on Bybit?"

If configured correctly, it will use the get_tickers tool to fetch the price.

Next Steps