Bybit MCP Server
The Bybit MCP Server provides read-only access to Bybit's cryptocurrency exchange API, enabling programmatic interaction with trading data and account management.
Access Market Data: Get real-time ticker information, orderbook data, kline/candlestick data, market information, and recent trades for trading pairs
Retrieve Instrument Details: Obtain detailed information about trading pairs, including base/quote currencies and trading parameters
Manage User Data: Access wallet balances, current positions, and order history (requires authentication)
Multiple Trading Categories: Supports spot, linear, and inverse trading
Interactive Tools: Includes CLI for Ollama LLM interaction and direct access to trading functions
Customizable: Configure server and client through environment variables
Provides integration with Ollama's LLM server, allowing interactive chat with Ollama models while using the Bybit tools to access cryptocurrency data.
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's the current price of Bitcoin?"
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 (MCP) server that provides read-only access to Bybit's cryptocurrency exchange API.
THIS IS ALPHA QUALITY SOFTWARE - USE AT YOUR OWN RISK!
Only ever use a read-only API key with this server. I wouldn't trust my code with your "money" and neither should you!
Features
This MCP server provides the following tools for interacting with Bybit's API:
get_ticker: Get real-time ticker information for a trading pairget_orderbook: Get orderbook (market depth) data for a trading pairget_kline: Get kline/candlestick data for a trading pairget_market_info: Get detailed market information for trading pairsget_trades: Get recent trades for a trading pairget_instrument_info: Get detailed instrument information for a specific trading pairget_wallet_balance: Get wallet balance information for the authenticated userget_positions: Get current positions information for the authenticated userget_order_history: Get order history for the authenticated userget_ml_rsi: Get machine learning-based RSI (Relative Strength Index) for a trading pairget_market_structure: Get market structure information for a trading pairget_order_blocks: Detect institutional order accumulation zonesget_order_history: Get order history for the authenticated userget_orderbook: Get orderbook (market depth) data for a trading pairget_ticker: Get real-time ticker information for a trading pair
There is also a highly experimental WebUI, see WebUI README for details.

All code is subject to breaking changes and feature additions / removals as I continue to develop this project.
Related MCP server: Binance MCP Server
Requirements & Installation
Node.js (v22+)
pnpm (
npm i -g pnpm)If you want to run the Ollama client as shown in the quick start below, you'll need Ollama installed and running, as well as your model of choice.
pnpm iQuick Start
To install packages build everything and start the interactive client:
pnpm iCopy the .env.example file to .env and fill in your details.
cp .env.example .env
code .envMCP-Server (Only)
Stdio Transport (Default)
pnpm serveHTTP/SSE Transport
pnpm start:httpThe HTTP server runs on port 8080 by default and provides both modern Streamable HTTP and legacy SSE transports, making it compatible with web applications and various MCP clients. See HTTP Server Documentation for detailed information.
MCP-Server and Ollama client
Install required client packages:
(cd client && pnpm i)Copy the client .env.example file to .env and fill in your details.
cp client/.env.example client/.env
code client/.envThen to start the client and server in one command:
pnpm startConfiguration
Environment Variables
The server requires Bybit API credentials to be set as environment variables:
BYBIT_API_KEY: Your Bybit API key (required)BYBIT_API_SECRET: Your Bybit API secret (required) - IMPORTANT - Only ever create a read-only API key!BYBIT_USE_TESTNET: Set to "true" to use testnet instead of mainnet (optional, defaults to false)DEBUG: Set to "true" to enable debug logging (optional, defaults to false)
Client environment variables (./client/.env):
OLLAMA_HOST: The host of the Ollama server (defaults to http://localhost:11434)DEFAULT_MODEL: The default model to use for chat (defaults to qwen3-30b-a3b-ud-nothink-128k:q4_k_xl)
MCP Settings Configuration
To use this server with MCP clients, you need to add it to your MCP settings configuration file. The file location depends on your client:
MCP Example - Claude Desktop
Location: ~/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"
}
}
}
}MCP Example - gomcp
Location: ~/.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 loggingClient Integration
This package includes a TypeScript client that provides a command-line interface for interacting with both Ollama LLMs and the bybit-mcp server. The client supports:
Interactive chat with Ollama models
Direct access to all bybit-mcp trading tools
Automatic server management
Environment-based configuration
Debug logging
For detailed client documentation, see the client README.
Running the Server
Production
Build the server:
pnpm buildRun the server:
node build/index.jsDevelopment
For development with automatic TypeScript recompilation:
pnpm watchTo inspect the MCP server during development:
pnpm inspectorTool Documentation
Get Ticker Information
{
"name": "get_ticker",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot" // optional, defaults to "spot"
}
}Get Orderbook Data
{
"name": "get_orderbook",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot", // optional, defaults to "spot"
"limit": 25 // optional, defaults to 25 (available: 1, 25, 50, 100, 200)
}
}Get Kline/Candlestick Data
{
"name": "get_kline",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot", // optional, defaults to "spot"
"interval": "1", // optional, defaults to "1" (available: "1", "3", "5", "15", "30", "60", "120", "240", "360", "720", "D", "M", "W")
"limit": 200 // optional, defaults to 200 (max 1000)
}
}Get Market Information
{
"name": "get_market_info",
"arguments": {
"category": "spot", // optional, defaults to "spot"
"symbol": "BTCUSDT", // optional, if not provided returns info for all symbols in the category
"limit": 200 // optional, defaults to 200 (max 1000)
}
}Get Recent Trades
{
"name": "get_trades",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot", // optional, defaults to "spot"
"limit": 200 // optional, defaults to 200 (max 1000)
}
}Get Instrument Information
{
"name": "get_instrument_info",
"arguments": {
"symbol": "BTCUSDT", // required
"category": "spot" // optional, defaults to "spot"
}
}Returns detailed information about a trading instrument including:
Base and quote currencies
Trading status
Lot size filters (min/max order quantities)
Price filters (tick size)
Leverage settings (for futures)
Contract details (for futures)
Get Wallet Balance
{
"name": "get_wallet_balance",
"arguments": {
"accountType": "UNIFIED", // required (available: "UNIFIED", "CONTRACT", "SPOT")
"coin": "BTC" // optional, if not provided returns all coins
}
}Get Positions
{
"name": "get_positions",
"arguments": {
"category": "linear", // required (available: "linear", "inverse")
"symbol": "BTCUSDT", // optional
"baseCoin": "BTC", // optional
"settleCoin": "USDT", // optional
"limit": 200 // optional, defaults to 200
}
}Get Order History
{
"name": "get_order_history",
"arguments": {
"category": "spot", // required (available: "spot", "linear", "inverse")
"symbol": "BTCUSDT", // optional
"baseCoin": "BTC", // optional
"orderId": "1234567890", // optional
"orderLinkId": "myCustomId", // optional
"orderStatus": "Filled", // optional (available: "Created", "New", "Rejected", "PartiallyFilled", "PartiallyFilledCanceled", "Filled", "Cancelled", "Untriggered", "Triggered", "Deactivated")
"orderFilter": "Order", // optional (available: "Order", "StopOrder")
"limit": 200 // optional, defaults to 200
}
}Supported Categories
spot: Spot tradinglinear: Linear perpetual contractsinverse: Inverse perpetual contracts
License
MIT
Available Tools
12 toolsget_instrument_infoC
Get detailed instrument information for a specific trading pair
Inputs: symbol (required), category.
get_klineC
Get kline/candlestick data for a trading pair. Supports optional reference ID for data verification.
Inputs: symbol (required), category, includeReferenceId, interval, +1 more.
get_market_infoC
Get detailed market information for trading pairs
Inputs: category, limit, symbol.
get_market_structureC
Advanced market structure analysis combining ML-RSI, order blocks, and liquidity zones. Provides comprehensive market regime detection and trading recommendations.
Inputs: category (required), interval (required), symbol (required), analysisDepth, +3 more.
get_ml_rsiB
Get ML-enhanced RSI using K-Nearest Neighbors algorithm for pattern recognition. Provides adaptive overbought/oversold levels and enhanced RSI values based on historical pattern similarity.
Inputs: category (required), interval (required), symbol (required), featureCount, +6 more.
get_order_blocksC
Detect institutional order accumulation zones based on volume analysis. Identifies bullish and bearish order blocks using volume peaks and tracks their mitigation status.
Inputs: category (required), interval (required), symbol (required), bearishBlocks, +4 more.
get_orderbookC
Get orderbook (market depth) data for a trading pair
Inputs: symbol (required), category, limit.
get_order_historyC
Get order history for the authenticated user
Inputs: category (required), baseCoin, limit, orderFilter, +4 more.
get_positionsC
Get positions information for the authenticated user
Inputs: category (required), baseCoin, limit, settleCoin, +1 more.
get_tickerC
Get real-time ticker information for a trading pair. Supports optional reference ID for data verification.
Inputs: symbol (required), category, includeReferenceId.
get_tradesC
Get recent trades for a trading pair
Inputs: symbol (required), category, limit.
get_wallet_balanceC
Get wallet balance information for the authenticated user
Inputs: accountType (required), coin.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools have distinct purposes, but there is some overlap between get_market_info, get_instrument_info, and get_ticker, which all provide market-related data for trading pairs. The descriptions help differentiate them, but an agent might need to carefully choose between these for specific needs.
All tool names follow a consistent verb_noun pattern using snake_case, starting with 'get_' followed by a descriptive noun phrase. This uniformity makes the tool set predictable and easy to navigate for an agent.
With 12 tools, the count is well-scoped for a trading server, covering market data, analysis, and user account operations. Each tool appears to serve a specific function without redundancy, fitting the domain appropriately.
The tool set covers key areas like market data retrieval, advanced analysis, and user account management, but lacks tools for executing trades or managing orders, which are core actions in a trading domain. This gap might limit agent workflows for full trading automation.
Related MCP Connectors
Unlock the power of real-time cryptocurrency data with our Crypto Price Insights MCP server.
Pay-per-call crypto data over x402 (USDC on Base). Hosted, no wallet or key held by the server.
A Model Context Protocol server exposing real-time and historical Colombo Stock Exchange (CSE) data to AI agents and LLM applications. Provides quotes and OHLCV price history, full financial statements (income, balance sheet, cash flow), pre-computed technicals (moving averages, RS ratings, volume signals), macroeconomic indicators, corporate actions, and rule-based screening across CSE stocks and sector indices, everything needed to build CSE-aware trading assistants, research tools, and market-analysis agents. This is the official MCP server of www.ceyloncharts.com
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides access to CoinMarketCap's cryptocurrency data, enabling AI applications to retrieve cryptocurrency listings, quotes, and detailed information.37-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that exposes Binance cryptocurrency exchange data to LLMs, allowing agents to access real-time prices, order books, and historical market data without requiring API keys.21MIT
- 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.1134 npm13MIT
- FlicenseBqualityDmaintenanceA Model Context Protocol server that provides real-time cryptocurrency price fetching capabilities using the CoinGecko API. It enables LLMs to retrieve and process the latest price for any coin by its name or symbol.2-