Connects to Bybit cryptocurrency exchange APIs to get market data, manage accounts, and execute testnet trading operations through AI coding tools.

Integrates with Bybit cryptocurrency exchange APIs to provide real-time market data, account management, and testnet-only trading operations for cryptocurrency trading and portfolio management applications.

6986 views3Local (stdio)

What it does

  • Fetch real-time cryptocurrency market data
  • Manage Bybit account information
  • Execute trades on testnet environment
  • Monitor portfolio balances
  • Access trading history
  • Query order book data

Best for

Cryptocurrency traders building automated strategiesDevelopers creating crypto trading applicationsPortfolio managers tracking investmentsTesting trading algorithms safely
Testnet support for safe testingWorks with Claude and CursorMulti-language documentation

About Bybit

Bybit is a community-built MCP server published by ethancod1ng that provides AI assistants with tools and capabilities via the Model Context Protocol. Integrate your app with Bybit for real-time crypto data, testnet trading, and account management. Power your portfolio w It is categorized under finance, developer tools.

How to install

You can install Bybit in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

Bybit is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Bybit MCP Server

smithery badge npm

Multi-language Documentation

A Model Context Protocol (MCP) server for Bybit exchange, enabling AI coding tools like Claude Code and Cursor to interact with Bybit's trading platform.

Quick Start

Installation

npm install -g bybit-mcp-server

Configuration

This MCP server can be used with various AI tools that support MCP:

Claude Cursor

Claude Code Configuration

For Testnet (Recommended - Safe for testing): Add to claude_desktop_config.json:

{
  "mcpServers": {
    "bybit": {
      "command": "npx",
      "args": ["bybit-mcp-server"],
      "env": {
        "BYBIT_API_KEY": "your_testnet_api_key",
        "BYBIT_API_SECRET": "your_testnet_api_secret",
        "BYBIT_ENVIRONMENT": "testnet"
      }
    }
  }
}

For Mainnet (⚠️ WARNING: Uses real funds): Add to claude_desktop_config.json:

{
  "mcpServers": {
    "bybit": {
      "command": "npx",
      "args": ["bybit-mcp-server"],
      "env": {
        "BYBIT_API_KEY": "your_mainnet_api_key",
        "BYBIT_API_SECRET": "your_mainnet_api_secret",
        "BYBIT_ENVIRONMENT": "mainnet"
      }
    }
  }
}

Cursor Configuration

Use the same configuration as Claude Code above, but add to .cursor/mcp_config.json with mcp.servers instead of mcpServers.

Environment Setup

Option 1: Testnet (Recommended)

BYBIT_API_KEY=your_testnet_api_key_here
BYBIT_API_SECRET=your_testnet_api_secret_here
BYBIT_ENVIRONMENT=testnet
DEBUG=false

Option 2: Mainnet (⚠️ Real funds)

BYBIT_API_KEY=your_mainnet_api_key_here
BYBIT_API_SECRET=your_mainnet_api_secret_here
BYBIT_ENVIRONMENT=mainnet
DEBUG=false

Getting API Keys

For Testnet:

  1. Visit Bybit Testnet
  2. Register an account
  3. Go to API Management and create API keys
  4. Enable required permissions (read, trade)

For Mainnet:

  1. Visit Bybit
  2. Complete account verification
  3. Go to API Management and create API keys
  4. Enable required permissions (read, trade)
  5. Set IP restrictions for additional security

Available Tools

Market Data

  • get_price - Get current price for a trading symbol
  • get_orderbook - Get order book depth for a trading symbol
  • get_klines - Get historical candlestick data
  • get_24hr_ticker - Get 24-hour trading statistics

Account Management

  • get_account_info - Get account information and balances
  • get_wallet_balance - Get wallet balance for specific account type
  • get_open_orders - Get list of open/active orders
  • get_order_history - Get historical orders

Trading (⚠️ Can use real funds on mainnet)

  • place_order - Place a new order
  • cancel_order - Cancel an existing order
  • cancel_all_orders - Cancel all orders for a symbol or category

Usage Examples

Ask your AI assistant to:

  • "Get the current price of BTCUSDT on Bybit"
  • "Show me the order book for ETHUSDT with 50 levels"
  • "Get my account balance"
  • "Place a limit buy order for 0.1 BTC at $45000"
  • "Cancel all my open orders for BTCUSDT"
  • "Get my trading history for the last 20 orders"

Security

⚠️ Important Security Notes:

  • TESTNET is the default and recommended environment for safety
  • MAINNET operations use real funds - use with extreme caution
  • API keys are automatically redacted from error messages
  • Always test thoroughly on testnet before using mainnet
  • Trading operations will display warnings when using mainnet

🔐 API Key Safety:

  • Never commit API keys to version control
  • Use environment variables for credentials
  • Regularly rotate your API keys
  • Use IP restrictions in Bybit API settings

Development

npm run build     # Compile TypeScript
npm run dev       # Development mode
npm run lint      # Run linting
npm run typecheck # Type checking
npm run watch     # Watch mode

Local Development

  1. Clone the repository:
git clone https://github.com/your-username/bybit-mcp-server.git
cd bybit-mcp-server
  1. Install dependencies:
npm install
  1. Set up environment:
cp .env.example .env
# Edit .env with your API credentials
  1. Run in development mode:
npm run dev

Configuration Options

VariableDescriptionDefaultRequired
BYBIT_API_KEYYour Bybit API key-
BYBIT_API_SECRETYour Bybit API secret-
BYBIT_ENVIRONMENTtestnet or mainnettestnet
BYBIT_BASE_URLCustom API base URLAuto-detected
DEBUGEnable debug loggingfalse

API Reference

This server implements Bybit's V5 API endpoints. For detailed API documentation:

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE file for details.

Support

Alternatives

Related Skills

Browse all skills
ui-design-system

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

6
finance-skills

Production-ready financial analyst skill with ratio analysis, DCF valuation, budget variance analysis, and rolling forecast construction. 4 Python tools (all stdlib-only). Works with Claude Code, Codex CLI, and OpenClaw.

3
cli-builder

Guide for building TypeScript CLIs with Bun. Use when creating command-line tools, adding subcommands to existing CLIs, or building developer tooling. Covers argument parsing, subcommand patterns, output formatting, and distribution.

2
openai-knowledge

Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.

0
api-documenter

Master API documentation with OpenAPI 3.1, AI-powered tools, and modern developer experience practices. Create interactive docs, generate SDKs, and build comprehensive developer portals. Use PROACTIVELY for API documentation or developer portal creation.

0
ydc-ai-sdk-integration

Integrate Vercel AI SDK applications with You.com tools (web search, AI agent, content extraction). Use when developer mentions AI SDK, Vercel AI SDK, generateText, streamText, or You.com integration with AI SDK.

0