
Bybit MCP (Model Context Protocol) Server. Provides a convenient interface to interact with the
Bybit MCP (Model Context Protocol) Server. Provides a convenient interface to interact with the Bybit V5 API using MCP tools. Allows fetching market data, managing account information, and placing/canceling orders via API calls wrapped as tools.
·
Bybit MCP (Model Context Protocol) Server. Provides a convenient interface to interact with the Bybit V5 API using MCP tools. Allows fetching market data, managing account information, and placing/canceling orders via API calls wrapped as tools.
This server can place real trades with real money. Read this before configuring it:
place_order, cancel_order, amend_order, cancel_all_orders, set_trading_stop, set_margin_mode, set_leverage) return an error unless you explicitly set TRADING_ENABLED=true.TESTNET=true while you experiment. Combine with TRADING_ENABLED=false for a fully read-only setup, or set READONLY_MODE=true to hard-block every mutating tool regardless of other settings.MAX_ORDER_SIZE_USDT (default 100) limits the estimated notional value of an order to guard against accidental large trades.Requires Python 3.12+. This project uses uv.
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 stdioAfter install, the mcp-bybit-server command is the entry point used by the MCP client configs below.
To install this Bybit API Interface server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @dlwjdtn535/mcp-bybit-server --client claudeAdd one of the following to your MCP settings file (e.g. claude_desktop_config.json / mcp_settings.json).
Using uv (run from a cloned repo):
{
"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).
Using Docker:
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.
| Variable | Required | Default | Description |
|---|---|---|---|
ACCESS_KEY | Yes | – | Bybit API key. |
SECRET_KEY | Yes | – | Bybit API secret. |
MEMBER_ID | No | – | Bybit member ID (optional). |
TESTNET | No | false | Use the Bybit testnet when true. |
TRADING_ENABLED | No | false | Must be true to allow any mutating/trading tool. |
READONLY_MODE | No | false | When true, blocks every mutating tool (takes precedence over TRADING_ENABLED). |
MAX_ORDER_SIZE_USDT | No | 100 | Caps the estimated notional value (USDT) of a single order. |
RESPONSE_VERBOSITY | No | normal | minimal trims get_tickers/get_positions responses to core fields to save tokens; normal/full return the full payload. |
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_ENABLED=true)validate_order — pre-flight validation; never places an order. Not blocked by trading flags.place_order — place an order; supports dry_run=true to 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:
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 to main.
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:
Your support helps maintain and improve this project. Thank you! 🙏
For additional inquiries or support, please contact:
We welcome your questions and feedback!
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add bybit -- uv run --directory /absolute/path/to/mcp-bybit-server mcp-bybit-server{
"mcpServers": {
"bybit": {
"env": {
"TESTNET": "",
"ACCESS_KEY": "",
"SECRET_KEY": "",
"TRADING_ENABLED": ""
},
"args": [
"run",
"--directory",
"/absolute/path/to/mcp-bybit-server",
"mcp-bybit-server"
],
"command": "uv"
}
}
}code --add-mcp '{"name":"bybit","env":{"TESTNET":"","ACCESS_KEY":"","SECRET_KEY":"","TRADING_ENABLED":""},"args":["run","--directory","/absolute/path/to/mcp-bybit-server","mcp-bybit-server"],"command":"uv"}'[mcp_servers.bybit]
command = "uv"
args = ["run", "--directory", "/absolute/path/to/mcp-bybit-server", "mcp-bybit-server"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/mcp-bybit-api-interface to learn what the "MCP Bybit API Interface" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
npx -y @smithery/cli install @dlwjdtn535/mcp-bybit-server --client claudeThis server runs locally, so we can't read its tool list over the web yet.
We could not run this server: it ships no npx package for our sandbox and no public endpoint. The four checks that need a live server are left out, and the grade tops out at B until one exists.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/mcp-bybit-api-interface)Nothing comparable is listed yet.
No tagged releases on record.
Connect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "mcp-bybit-api-interface" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.