mcp-bybit
MCP server from dlwjdtn535/mcp-bybit-server
claude mcp add --transport stdio dlwjdtn535-mcp-bybit-server docker run -i --rm --init -e ACCESS_KEY={ACCESS_KEY} -e SECRET_KEY={SECRET_KEY} dlwjdtn535/mcp-bybit-server:latest \
--env ACCESS_KEY="Your Bybit API Key" \
--env SECRET_KEY="Your Bybit API Secret"How to use
This MCP server provides a Bybit API interface accessible through MCP tools. It exposes a suite of tools that wrap Bybit REST API calls into easy-to-use MCP actions, including fetching market data (order books, K-lines, tickers), obtaining account balances and positions, and placing or canceling orders. The tools are designed to be invoked from MCP-enabled clients (such as Claude, Roo Code, or Cline) and will return structured responses suitable for downstream workflows or prompts.
To use the server, configure it in your MCP settings file (mcp_settings.json) under mcpServers. For Docker-based deployment, ensure you provide your Bybit API credentials via environment variables (ACCESS_KEY and SECRET_KEY) and optionally set TESTNET to true for testnet usage. Once configured, call tools like get_orderbook, get_kline, get_tickers, get_wallet_balance, get_positions, place_order, cancel_order, and more to interact with Bybit programmatically through the MCP interface.
How to install
Prerequisites:
- Docker installed and running (or adapt to your preferred deployment method from the README instructions).
- A Bybit API key with appropriate permissions (Read and Trade at minimum) and IP restrictions configured as needed.
- Access to the internet for pulling the Docker image.
Installation steps (Docker):
-
Pull the latest MCP Bybit server image: docker pull dlwjdtn535/mcp-bybit-server:latest
-
Run the container with your credentials: docker run -i --rm --init
-e ACCESS_KEY=YOUR_BYBIT_API_KEY
-e SECRET_KEY=YOUR_BYBIT_API_SECRET
-e TESTNET=false
dlwjdtn535/mcp-bybit-server:latest -
(Optional) If you want to configure via a .env file, you can replace the environment variable settings accordingly and reference them in your launch script.
Notes:
- Replace YOUR_BYBIT_API_KEY and YOUR_BYBIT_API_SECRET with your actual credentials.
- If using Testnet, set TESTNET to true.
- Always keep keys secure and avoid committing them to public repos.
Additional notes
Environment variables:
- ACCESS_KEY: Your Bybit API key.
- SECRET_KEY: Your Bybit API secret.
- TESTNET: Optional; set to true to use Bybit testnet.
- If using Docker with a .env file, you can source the file before running the container to inject variables.
Common issues:
- If API keys are invalid or lack required permissions, you will receive authentication or permission errors from Bybit.
- Network connectivity or firewall rules may block API access; ensure outbound HTTPS to Bybit endpoints is allowed.
- When using IP-restricted keys, ensure the server's IP is allowed by Bybit.
Tools available (high level):
- get_orderbook, get_kline, get_tickers for market data.
- get_wallet_balance, get_positions for account data.
- place_order, cancel_order, get_order_history, get_open_orders for order management.
- set_trading_stop, set_margin_mode for risk and margin controls.
- get_api_key_information, get_instruments_info for metadata and credentials.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP