
dlwjdtn535/mcp-bybit-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Bybit MCP (Model Context Protocol) Server. Provides a convenient interface to interact with the Bybit V5 API using MCP 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 . Read this before configuring it: - 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 set TRADING_ENABLED=true. - Set 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. - No tool returns your keys; logs only report whether a key is present. - Provide them through environment variables only. Requires Python 3.12+. This project uses uv.
README
Показан фрагмент оригинального README. Открыть оригинал.
MCP Bybit API Interface
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.
⚠️ Security & Safety
This server can place real 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. Set
TESTNET=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.
Installation
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 stdio
After install, the mcp-bybit-server command is the entry point used by the MCP client configs below.
Installing via Smithery
To install this Bybit API Interface server for Claude Desktop automatically via Smithery:
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).
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"
}
}
}
}
Установка
docker 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Конфигурация
{
"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"
}
}
}
}