Skip to content

EternaHybridExchange/bybit-mcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bybit MCP Server

Trade Bybit perpetual futures from any AI agent. No API keys to manage, no infrastructure to run.

0.014% maker fees on futures. Isolated sub-accounts. Works in 30 seconds.

License: MIT Bybit MCP Protocol

Powered by Eterna MCP Gateway


30-Second Setup

{
  "mcpServers": {
    "bybit-trading": {
      "type": "streamable-http",
      "url": "https://mcp.eterna.exchange/mcp"
    }
  }
}

Ask your AI to call register_agent. It gets an API key. Add the key to the config, restart, trade.


Why Managed Over Self-Hosted?

Eterna (managed) Self-hosted Bybit MCP Direct Bybit API
Setup 30 seconds 15-30 min 2-4 hours
Bybit API keys Auto-provisioned You create & rotate You create & rotate
Agent isolation Dedicated sub-account Shared account Shared account
Risk management Built-in None Build your own
Key security Argon2-hashed Plaintext env vars Plaintext env vars
Futures fees 0.014% / 0.035% 0.02% / 0.055% (default) 0.02% / 0.055% (default)
Spot fees 0.065% / 0.0775% 0.1% / 0.1% (default) 0.1% / 0.1% (default)
Transport HTTP (works remotely) stdio (local only) HTTP
Maintenance Zero You manage updates You manage

For detailed comparisons with specific self-hosted alternatives, see docs/vs-self-hosted.md.


Works With Your Stack

No pre-existing API key needed. Your agent connects, registers itself, and starts trading.

LangChain

from langchain_mcp_adapters.client import MultiServerMCPClient

# 1. Connect without auth -- agent calls register_agent to get a key
async with MultiServerMCPClient({
    "trading": {
        "url": "https://mcp.eterna.exchange/mcp",
        "transport": "streamable_http",
    }
}) as client:
    tools = client.get_tools()  # includes register_agent

# 2. Reconnect with the key
async with MultiServerMCPClient({
    "trading": {
        "url": "https://mcp.eterna.exchange/mcp",
        "transport": "streamable_http",
        "headers": {"Authorization": f"Bearer {api_key}"},
    }
}) as client:
    tools = client.get_tools()  # all trading tools

AutoGen

from autogen_ext.tools.mcp import McpWorkbench, StreamableHttpParams

# 1. Register (no auth needed)
async with McpWorkbench(StreamableHttpParams(url=MCP_URL)) as wb:
    tools = await wb.list_tools()  # includes register_agent

# 2. Trade with the key
async with McpWorkbench(StreamableHttpParams(
    url=MCP_URL,
    headers={"Authorization": f"Bearer {api_key}"},
)) as wb:
    tools = await wb.list_tools()  # all trading tools

CrewAI

from crewai_tools.mcp import MCPServerAdapter

# After registration (see examples/ for full flow)
server = MCPServerAdapter(
    server_url="https://mcp.eterna.exchange/mcp",
    headers={"Authorization": f"Bearer {api_key}"},
)
tools = server.tools

Full working examples: examples/


Available Tools

Category Tool Description
Registration register_agent Register a new trading agent and receive an API key
Market Data get_tickers Current prices and 24h stats for Bybit linear perpetuals
get_instruments Contract specs: tick size, lot size, leverage limits
get_orderbook Live order book (bids and asks) up to 200 levels
Account get_balance USDT equity, available balance, and margin usage
get_positions Open positions with entry price, PnL, and leverage
get_orders Active and recent order history with fill info
Trading place_order Place market or limit orders with optional TP/SL and leverage
close_position Close an entire position at market price
Funding get_deposit_address Get deposit address for a coin and chain
get_deposit_records View deposit transaction history
transfer_to_trading Move funds from Funding wallet to Trading wallet

Examples


Coming Soon

  • 130+ additional Bybit API endpoints (order management, position controls, kline data)
  • Code execution sandbox -- submit TypeScript strategies for isolated execution
  • Strategy runtime -- deploy strategies on cron, zero LLM at runtime
  • Backtesting engine with historical data replay

See the full roadmap.


Ecosystem

Repository Description
eterna-mcp Eterna MCP Gateway -- full documentation and protocol reference
bybit-mcp-server This repository -- Bybit-focused entry point
mcp-trading-agent IDE configs and trading strategies
awesome-mcp-trading Curated list of MCP trading resources

Contact

Questions, feedback, or partnership inquiries: hello@eterna.exchange


License

MIT License. See LICENSE for details.

Releases

No releases published

Packages

 
 
 

Contributors