Bybit MCP Server
Bybit MCP サーバー
Bybit の暗号通貨取引 API への読み取り専用アクセスを提供するモデル コンテキスト プロトコル (MCP)サーバー。
これはアルファ品質のソフトウェアです - 自己責任で使用してください。
このサーバーでは読み取り専用のAPIキーのみを使用してください。私のコードをあなたの「お金」に預けることは絶対にありませんし、あなたもそうすべきではありません!
Started integrated server
Chatting with llama-3.2-11b-instruct:Q8_0 (Ctrl+C to exit)
Tools are available - ask about cryptocurrency data!
You: Whats the current spot price for USDT/BTC?
Assistant: <tool>get_ticker</tool>
<arguments>
{
"category": "spot",
"symbol": "BTCUSDT"
}
</arguments>
Tool result: {
"timestamp": "2024-12-14T12:32:30.628Z",
"meta": {
"requestId": "ad5177bc-93d1-49ed-80a1-dd95b3ec970b"
},
"symbol": "BTCUSDT",
"category": "spot",
"lastPrice": "101368.71",
"price24hPcnt": "0.0107",
"highPrice24h": "102661.3",
"lowPrice24h": "99683.96",
"prevPrice24h": "100292.67",
"volume24h": "22543.911683",
"turnover24h": "2285318788.68303381",
"bid1Price": "101366.07",
"bid1Size": "0.136049",
"ask1Price": "101366.08",
"ask1Size": "0.648039",
"usdIndexPrice": "101365.707576"
}
Processing result...
The current spot price for USDT/BTC is $101,368.71.特徴
この MCP サーバーは、Bybit の API と対話するための次のツールを提供します。
get_ticker: 取引ペアのリアルタイムのティッカー情報を取得するget_orderbook: 取引ペアの注文簿(市場の深さ)データを取得するget_kline: 取引ペアのkline/ローソク足データを取得するget_market_info: 取引ペアの詳細な市場情報を取得するget_trades: 取引ペアの最近の取引を取得するget_instrument_info: 特定の取引ペアの詳細な商品情報を取得するget_wallet_balance: 認証されたユーザーのウォレット残高情報を取得するget_positions: 認証されたユーザーの現在の位置情報を取得するget_order_history: 認証されたユーザーの注文履歴を取得する
Related MCP server: Binance MCP Server
要件とインストール
Node.js (v20+)
pnpm (
npm i -g pnpm)以下のクイック スタートに示すように Ollama クライアントを実行する場合は、選択したモデルに加えて、Ollama がインストールされ、実行されている必要があります。
pnpm iクイックスタート
パッケージをインストールするには、すべてをビルドし、対話型クライアントを起動します。
pnpm i.env.example ファイルを .env にコピーし、詳細を入力します。
cp .env.example .env
code .envMCP サーバー (のみ)
pnpm serveMCPサーバーとOllamaクライアント
必要なクライアント パッケージをインストールします。
(cd client && pnpm i)クライアントの .env.example ファイルを .env にコピーし、詳細を入力します。
cp client/.env.example client/.env
code client/.env次に、1 つのコマンドでクライアントとサーバーを起動します。
pnpm start構成
環境変数
サーバーでは、Bybit API 資格情報を環境変数として設定する必要があります。
BYBIT_API_KEY: Bybit APIキー(必須)BYBIT_API_SECRET: Bybit API シークレット (必須) -重要 - 読み取り専用の API キーのみを作成してください。BYBIT_USE_TESTNET: メインネットの代わりにテストネットを使用するには「true」に設定します(オプション、デフォルトは false)DEBUG: デバッグログを有効にするには「true」に設定します(オプション、デフォルトは false)
クライアント環境変数 (./client/.env):
OLLAMA_HOST: Ollamaサーバーのホスト(デフォルトはhttp://localhost:11434 )DEFAULT_MODEL: チャットに使用するデフォルトのモデル(デフォルトはllama-3.2-11b-instruct:Q8_0)
MCP設定の構成
このサーバーをMCPクライアントで使用するには、MCP設定ファイルにサーバーを追加する必要があります。ファイルの場所はクライアントによって異なります。
MCPの例 - クロードデスクトップ
場所: ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"bybit": {
"command": "node",
"args": ["/path/to/bybit-mcp/build/index.js"],
"env": {
"BYBIT_API_KEY": "your-api-key",
"BYBIT_API_SECRET": "your-api-secret",
"BYBIT_USE_TESTNET": "false"
}
}
}
}MCPの例 - gomcp
場所: ~/.config/gomcp/config.yaml
mcp_servers:
- name: "bybit"
command: "cd /path/to/bybit-mcp && pnpm run serve"
arguments: []
env:
BYBIT_API_KEY: "" # Add your Bybit API **READ ONLY** key here
BYBIT_API_SECRET: "" # Add your Bybit API **READ ONLY** secret here
BYBIT_USE_TESTNET: "true" # Set to false for production
DEBUG: "false" # Optional: Set to true for debug loggingクライアント統合
このパッケージには、Ollama LLMとbybit-mcpサーバーの両方とやり取りするためのコマンドラインインターフェースを提供するTypeScriptクライアントが含まれています。クライアントは以下の機能をサポートしています。
Ollamaモデルとのインタラクティブチャット
すべてのbybit-mcp取引ツールへの直接アクセス
自動サーバー管理
環境ベースの構成
デバッグログ
詳細なクライアントドキュメントについては、クライアントの README を参照してください。
サーバーの実行
生産
サーバーを構築します。
pnpm buildサーバーを実行します。
node build/index.js発達
TypeScript の自動再コンパイルを使用した開発の場合:
pnpm watch開発中に MCP サーバーを検査するには:
pnpm inspectorツールドキュメント
ティッカー情報を取得する
{
"name": "get_ticker",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot" // optional, defaults to "spot"
}
}注文簿データを取得する
{
"name": "get_orderbook",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot", // optional, defaults to "spot"
"limit": 25 // optional, defaults to 25 (available: 1, 25, 50, 100, 200)
}
}クライン/ローソク足データを取得する
{
"name": "get_kline",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot", // optional, defaults to "spot"
"interval": "1", // optional, defaults to "1" (available: "1", "3", "5", "15", "30", "60", "120", "240", "360", "720", "D", "M", "W")
"limit": 200 // optional, defaults to 200 (max 1000)
}
}市場情報を入手する
{
"name": "get_market_info",
"arguments": {
"category": "spot", // optional, defaults to "spot"
"symbol": "BTCUSDT", // optional, if not provided returns info for all symbols in the category
"limit": 200 // optional, defaults to 200 (max 1000)
}
}最近の取引を取得
{
"name": "get_trades",
"arguments": {
"symbol": "BTCUSDT",
"category": "spot", // optional, defaults to "spot"
"limit": 200 // optional, defaults to 200 (max 1000)
}
}機器情報を取得する
{
"name": "get_instrument_info",
"arguments": {
"symbol": "BTCUSDT", // required
"category": "spot" // optional, defaults to "spot"
}
}次のような取引商品に関する詳細情報を返します:
基準通貨と引用通貨
取引状況
ロットサイズフィルター(最小/最大注文数量)
価格フィルター(目盛りサイズ)
レバレッジ設定(先物)
契約詳細(先物)
ウォレット残高を取得
{
"name": "get_wallet_balance",
"arguments": {
"accountType": "UNIFIED", // required (available: "UNIFIED", "CONTRACT", "SPOT")
"coin": "BTC" // optional, if not provided returns all coins
}
}ポジションを取得
{
"name": "get_positions",
"arguments": {
"category": "linear", // required (available: "linear", "inverse")
"symbol": "BTCUSDT", // optional
"baseCoin": "BTC", // optional
"settleCoin": "USDT", // optional
"limit": 200 // optional, defaults to 200
}
}注文履歴を取得する
{
"name": "get_order_history",
"arguments": {
"category": "spot", // required (available: "spot", "linear", "inverse")
"symbol": "BTCUSDT", // optional
"baseCoin": "BTC", // optional
"orderId": "1234567890", // optional
"orderLinkId": "myCustomId", // optional
"orderStatus": "Filled", // optional (available: "Created", "New", "Rejected", "PartiallyFilled", "PartiallyFilledCanceled", "Filled", "Cancelled", "Untriggered", "Triggered", "Deactivated")
"orderFilter": "Order", // optional (available: "Order", "StopOrder")
"limit": 200 // optional, defaults to 200
}
}サポートされているカテゴリ
spot:スポット取引linear:線形永久契約inverse:逆永久契約
ライセンス
マサチューセッツ工科大学
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that provides access to CoinMarketCap's cryptocurrency data, enabling AI applications to retrieve cryptocurrency listings, quotes, and detailed information.37
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that exposes Binance cryptocurrency exchange data to LLMs, allowing agents to access real-time prices, order books, and historical market data without requiring API keys.20MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI coding tools like Claude Code and Cursor to interact with Bybit's trading platform for market data retrieval, account management, and trading operations.111613MIT
- FlicenseBqualityDmaintenanceA Model Context Protocol server that provides real-time cryptocurrency price fetching capabilities using the CoinGecko API. It enables LLMs to retrieve and process the latest price for any coin by its name or symbol.2
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Live financial data MCP: FX, crypto, stocks, news, URL reader. x402 on Base: $0.001/call.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sammcj/bybit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server