This MCP server provides read-only access to Bybit's cryptocurrency exchange API through the Model Context Protocol (MCP) interface. It allows you to retrieve real-time market data, account information, and perform technical analysis on cryptocurrency trading pairs.
npm i -g pnpm
)pnpm i
cp .env.example .env
.env
file with your Bybit API credentials:BYBIT_API_KEY=your-api-key-here
BYBIT_API_SECRET=your-api-secret-here
BYBIT_USE_TESTNET=false
DEBUG=false
pnpm serve
pnpm start:http
This starts an HTTP server on port 8080 that supports both modern Streamable HTTP and legacy SSE transports.
If you want to use the server with Ollama:
(cd client && pnpm i)
cp client/.env.example client/.env
.env
file:OLLAMA_HOST=http://localhost:11434
DEFAULT_MODEL=qwen3-30b-a3b-ud-nothink-128k:q4_k_xl
pnpm start
Add the following to ~/Library/Application\ Support/Claude/claude_desktop_config.json
:
{
"mcpServers": {
"bybit": {
"command": "node",
"args": ["/path/to/bybit-mcp/build/index.js"],
"env": {
"BYBIT_API_KEY": "your-api-key",
"BYBIT_API_SECRET": "your-api-secret",
"BYBIT_USE_TESTNET": "false"
}
}
}
}
Add the following to ~/.config/gomcp/config.yaml
:
mcp_servers:
- name: "bybit"
command: "cd /path/to/bybit-mcp && pnpm run serve"
arguments: []
env:
BYBIT_API_KEY: "" # Add your Bybit API READ ONLY key here
BYBIT_API_SECRET: "" # Add your Bybit API READ ONLY secret here
BYBIT_USE_TESTNET: "true" # Set to false for production
DEBUG: "false" # Optional: Set to true for debug logging
Retrieves real-time ticker information for a trading pair.
{
"name": "get_ticker",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot"
}
}
Retrieves market depth data for a trading pair.
{
"name": "get_orderbook",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot",
"limit": 25
}
}
Retrieves candlestick data for a trading pair.
{
"name": "get_kline",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot",
"interval": "1",
"limit": 200
}
}
Retrieves detailed market information for trading pairs.
{
"name": "get_market_info",
"arguments": {
"category": "spot",
"symbol": "BTCUSDT",
"limit": 200
}
}
Retrieves recent trades for a trading pair.
{
"name": "get_trades",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot",
"limit": 200
}
}
Retrieves detailed instrument information for a specific trading pair.
{
"name": "get_instrument_info",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot"
}
}
Retrieves wallet balance information for the authenticated user.
{
"name": "get_wallet_balance",
"arguments": {
"accountType": "UNIFIED",
"coin": "BTC"
}
}
Retrieves current positions information for the authenticated user.
{
"name": "get_positions",
"arguments": {
"category": "linear",
"symbol": "BTCUSDT",
"limit": 200
}
}
Retrieves order history for the authenticated user.
{
"name": "get_order_history",
"arguments": {
"category": "spot",
"symbol": "BTCUSDT",
"limit": 200
}
}
spot
: Spot tradinglinear
: Linear perpetual contractsinverse
: Inverse perpetual contractsThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.