MCP Bybit API Interface
About
An interface for interacting with the Bybit cryptocurrency exchange API.
Details
- Author
- dlwjdtn535
- Categories
- Cloud Service, Other, API
Jump to
Configuration (Claude Desktop, Cline, Roo Code, etc.)
Add one of the following to your MCP settings file (e.g.claude_desktop_config.json/mcp_settings.json).
{ "mcpServers": { "bybit": { "command": "uv", "args": ](https://smithery.ai/server/@dlwjdtn535/mcp-bybit-server)[ "run", "--directory", "/absolute/path/to/mcp-bybit-server", "mcp-bybit-server" ], "env": { "ACCESS_KEY": "YOUR_BYBIT_API_KEY", "SECRET_KEY": "YOUR_BYBIT_SECRET_KEY", "TESTNET": "true", "TRADING_ENABLED": "false" } } } }
On Windows, use an absolute path with double backslashes (e.g.C:\\Users\\YOUR_USERNAME\\mcp-bybit-server).
First pull the image:docker pull dlwjdtn535/mcp-bybit-server:latest
{ "mcpServers": { "bybit-server-docker": { "command": "docker", "args": [ "run", "-i", "--rm", "--init", "-e", "ACCESS_KEY=YOUR_BYBIT_API_KEY", "-e", "SECRET_KEY=YOUR_BYBIT_SECRET_KEY", "-e", "TESTNET=true", "-e", "TRADING_ENABLED=false", "-e", "MAX_ORDER_SIZE_USDT=100", "dlwjdtn535/mcp-bybit-server:latest" ] } } }
Note: Always use@latestor a specific version tag for both NPX and Docker to ensure you are using the intended version.
- get_orderbook— order book (category,symbol,limit?).
- get_kline— candlesticks (category,symbol,interval,start?,end?,limit?).
- get_tickers— ticker info (category,symbol).
- get_public_trade_history— recent public trades (category,symbol,limit?).
- get_instruments_info— instrument metadata / limits (category,symbol,status?,baseCoin?).
- get_funding_rate_history— funding rate history for perps (category,symbol,startTime?,endTime?,limit?).
- get_open_interest— open interest over time (category,symbol,intervalTime?, ...).
- get_fee_rate— maker/taker fee rates (category,symbol?,baseCoin?).
- get_server_time— Bybit server time.
- market_snapshot— composite market view (orderbook + ticker + kline + instrument + recent trades, plus funding rate & open interest for futures) in a single call.
- get_wallet_balance— balances (accountType,coin?).
- get_positions— open positions (category,symbol?).
- get_order_history— historical orders.
- get_open_orders— current open orders.
- get_api_key_information— API key details.
An interface for interacting with the Bybit cryptocurrency exchange API.
Bybit MCP (Model Context Protocol) Server. Provides a convenient interface to interact with theBybit V5 APIusing MCP tools. Allows fetching market data, managing account information, and placing/canceling orders via API calls wrapped as tools.
This server can placereal trades with real money. Read this before configuring it:
- Trading is disabled by default.Mutating tools (place_order,cancel_order,amend_order,cancel_all_orders,set_trading_stop,set_margin_mode,set_leverage) return an error unless you explicitly setTRADING_ENABLED=true.
- Use the testnet first.SetTESTNET=truewhile you experiment. Combine withTRADING_ENABLED=falsefor a fully read-only setup, or setREADONLY_MODE=trueto hard-block every mutating tool regardless of other settings.
- Order size is capped.MAX_ORDER_SIZE_USDT(default100) limits the estimated notional value of an order to guard against accidental large trades.
- API keys are never logged or exposed.No tool returns your keys; logs only report whether a key is present.
- Never commit your API keys.Provide them through environment variables only.
Requires Python 3.12+. This project usesuv.
git clone https://github.com/dlwjdtn535/mcp-bybit-server.git cd mcp-bybit-server uv sync uv run mcp-bybit-server # runs the MCP server over stdio
After install, themcp-bybit-servercommand is the entry point used by the MCP client configs below.
To install this Bybit API Interface server for Claude Desktop automatically viaSmithery:
npx -y @smithery/cli install @dlwjdtn535/mcp-bybit-server --client claude
Configuration (Claude Desktop, Cline, Roo Code, etc.)
Add one of the following to your MCP settings file (e.g.claude_desktop_config.json/mcp_settings.json).
{ "mcpServers": { "bybit": { "command": "uv", "args": [ "run", "--directory", "/absolute/path/to/mcp-bybit-server", "mcp-bybit-server" ], "env": { "ACCESS_KEY": "YOUR_BYBIT_API_KEY", "SECRET_KEY": "YOUR_BYBIT_SECRET_KEY", "TESTNET": "true", "TRADING_ENABLED": "false" } } } }
On Windows, use an absolute path with double backslashes (e.g.C:\\Users\\YOUR_USERNAME\\mcp-bybit-server).
First pull the image:docker pull dlwjdtn535/mcp-bybit-server:latest
{ "mcpServers": { "bybit-server-docker": { "command": "docker", "args": [ "run", "-i", "--rm", "--init", "-e", "ACCESS_KEY=YOUR_BYBIT_API_KEY", "-e", "SECRET_KEY=YOUR_BYBIT_SECRET_KEY", "-e", "TESTNET=true", "-e", "TRADING_ENABLED=false", "-e", "MAX_ORDER_SIZE_USDT=100", "dlwjdtn535/mcp-bybit-server:latest" ] } } }
Note: Always use@latestor a specific version tag for both NPX and Docker to ensure you are using the intended version.
- get_orderbook— order book (category,symbol,limit?).
- get_kline— candlesticks (category,symbol,interval,start?,end?,limit?).
- get_tickers— ticker info (category,symbol).
- get_public_trade_history— recent public trades (category,symbol,limit?).
- get_instruments_info— instrument metadata / limits (category,symbol,status?,baseCoin?).
- get_funding_rate_history— funding rate history for perps (category,symbol,startTime?,endTime?,limit?).
- get_open_interest— open interest over time (category,symbol,intervalTime?, ...).
- get_fee_rate— maker/taker fee rates (category,symbol?,baseCoin?).
- get_server_time— Bybit server time.
- market_snapshot— composite market view (orderbook + ticker + kline + instrument + recent trades, plus funding rate & open interest for futures) in a single call.
- get_wallet_balance— balances (accountType,coin?).
- get_positions— open positions (category,symbol?).
- get_order_history— historical orders.
- get_open_orders— current open orders.
- get_api_key_information— API key details.
Trading (mutating — requiresTRADING_ENABLED=true)
- validate_order— pre-flight validation; never places an order. Not blocked by trading flags.
- place_order— place an order; supportsdry_run=trueto validate without placing.
- amend_order— modify an existing order in place.
- cancel_order— cancel a single order.
- cancel_all_orders— cancel all open orders (optionally scoped).
- set_trading_stop— set take profit / stop loss / trailing stop.
- set_margin_mode— set isolated/cross margin.
- set_leverage— set leverage for a futures symbol.
(Refer to the function docstrings in the code for detailed parameter descriptions and examples.)
To use this Bybit API interface, create an API key from Bybit:
- Log into your Bybit account.
- Navigate to API Management.
- Create a new API key.
- Important security settings:
- Enable IP restriction if possible, and add ONLY the IP address(es) the server runs from.
- Never share your API keys or expose them in public repositories.
- Recommended permissions:
- Read (required)
- Trade (required only if you enable order execution)
- Wallet (required for balance checking)
uv sync --group dev # install dev dependencies (pytest, ruff) uv run ruff check . # lint uv run pytest -q # run the unit test suite (no live API calls)
CI (GitHub Actions) runs lint + tests on every push/PR; Docker images are built and published automatically on pushes tomain.
If you find this project helpful and would like to support its development:
You can also support this project by signing up for Bybit using our referral link:
- My Bybit Referral Link
- Referral Code: J1O4JK
Your support helps maintain and improve this project. Thank you! 🙏
For additional inquiries or support, please contact:
Provides seamless access to the Binance exchange API. Requires Binance API credentials to be configured.
Interact with the Binance API to view portfolios, convert tokens, and execute trades with minimal market impact.
Access the Binance Futures API for trading, account management, and market data.
WunderTrading MCP connects AI agents to live crypto trading execution on 20+ supported exchanges through a single MCP integration. Use it to turn AI-driven signals, market analysis, sentiment, screenshots, and custom strategy logic into real trades on exchanges including Binance, Bybit, Coinbase, Bitget, OKX, KuCoin, Hyperliquid, and BingX. Supports MCP and REST API workflows for order execution, trade management, and AI-powered automation.
Manage stock and crypto portfolios, place trades, and access market data via the Alpaca Trading API.
Interact with over 100 cryptocurrency exchange APIs using the CCXT library.
A Node.js service for interacting with the LnExchange API for spot trading.
Access prediction market data from the PolyMarket API.
A professional trading server with over 26 tools for Bybit API integration.
Access market data, manage accounts, and execute trades on the Upbit Cryptocurrency Exchange via its OpenAPI.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





