deribit-mcp
deribit-mcp
Deribit をあなたの AI アシスタントに接続します。Claude Code、Codex などあらゆる MCP クライアントに対応し、ワンコマンドで接続。アシスタントが相場の確認、口座の閲覧、注文管理をできるようにします。
claude mcp add deribit -- npx -y deribit-mcpインストールが終われば、「BTCの現在のオプションチェーンは?」「3月満期のコールオプションのインプライド・ボラティリティを見せて」「私の口座の余力はいくら?」と聞くだけでOKです。
2つの安全デフォルト: デフォルトでテストネットに接続し、デフォルトで取引は無効です。本番注文を出すには、両方とも明示的にオンにする必要があります。
インストール
Claude Code
相場を見るだけなら、設定は一切不要です:
claude mcp add deribit -- npx -y deribit-mcp口座と注文を確認するには、API 認証情報を追加してメインネットに切り替えます:
claude mcp add deribit \
--env DERIBIT_ENV=prod \
--env DERIBIT_CLIENT_ID=你的_client_id \
--env DERIBIT_CLIENT_SECRET=你的_client_secret \
-- npx -y deribit-mcpCodex
~/.codex/config.toml(またはプロジェクト内の .codex/config.toml)を編集します:
[mcp_servers.deribit]
command = "npx"
args = ["-y", "deribit-mcp"]
[mcp_servers.deribit.env]
DERIBIT_ENV = "prod"
DERIBIT_CLIENT_ID = "你的_client_id"
DERIBIT_CLIENT_SECRET = "你的_client_secret"その他の MCP クライアント
stdio に対応しているクライアントならどれでも使えます。コマンドは npx -y deribit-mcp で、設定は環境変数で渡します。
ソースから実行する(任意)
特定のバージョンに固定したい場合や、コードを自分で変更した場合は、ソースを直接指定できます。変更のたびに再ビルドを忘れずに:
git clone https://github.com/freeeverett/deribit-mcp.git
cd deribit-mcp && npm install[mcp_servers.deribit]
command = "npx"
args = ["tsx", "/绝对路径/deribit-mcp/src/index.ts"]欠点は、起動が約2倍遅くなること(約160ms対77ms)と、ローカルに依存関係がインストールされている必要があることです。日常的な利用では、やはり npx -y deribit-mcp をお勧めします。
API 認証情報を取得する
Deribit アカウント設定 → API でキーを作成します。
やりたいこと | 必要な key の権限 |
公開相場を見るだけ | key は不要 |
口座・ポジション・注文・約定を確認 |
|
注文・変更・キャンセル・決済 |
|
最小権限を推奨します:アシスタントに分析だけさせたい場合は、trade:read を付与すれば十分です。そうすれば、誤って取引スイッチをオンにしても注文はできません。
Related MCP server: Crypto Options Desk MCP
設定項目
環境変数 | デフォルト | 説明 |
|
|
|
| — | API キー。未設定の場合は公開相場ツールのみ利用可能 |
| — | API シークレット。 |
|
|
|
| — | カスタム接続先。通常は不要 |
テストネットは独立しています:
test.deribit.comのアカウントと API キーはメインネットとは一切互換性がなく、test.deribit.com で別途登録する必要があります。テストネットでは無料でテストコインがもらえるので、先にフローを試してからメインネットに切り替えるのに適しています。
全量テストネット結合テスト
プロジェクトのルートに、git で無視される .env.test を作成し、テストネットの API 認証情報のみを記述します:
DERIBIT_CLIENT_ID=你的测试网_client_id
DERIBIT_CLIENT_SECRET=你的测试网_client_secret次に実行します:
npm run test:allこのエントリポイントは .env.test をネイティブに読み取り、強制的にテストネットへ接続します(ファイル内のメインネットやカスタムエンドポイント設定は採用されません)。実際の stdio MCP クライアントを介して全 39 ツールを実行し、キーに trade:read_write が必要です。一意のテストタグを付けた指値注文を作成・変更・キャンセルし、短時間の成行注文でポジションを開閉し、テスト複合注文を作成します。スクリプト終了時にはそのタグで注文を確実にキャンセルします。クリーンアップに失敗した場合は、コマンドは失敗ステータスで終了します。既存の npm run smoke は、認証情報を必要としない高速な公開インターフェースのリグレッションテストとして引き続き利用できます。
取引機能について
注文関連のツールはデフォルトでは無効です。DERIBIT_ENABLE_TRADING=true を設定しない限り、アシスタントはこれらのツールを一切認識できないため、誤操作の心配もありません。
有効にすると利用可能:注文、注文変更、キャンセル、決済、複合注文の作成。
必ずご理解ください:
これらの操作は実際の口座で実際の約定を発生させます。お金は本物です
まずテストネットでフローに慣れてから、メインネットを検討することをお勧めします
メインネット + 取引有効時は、サービス起動時に明示的な警告が表示され、アシスタントにも「実行前にユーザーに確認すること」という指示が渡されます
しかし最終的なゲートはあなた自身です:注文リクエストが来たら、よく確認してから承認をクリックしてください
アシスタントに分析だけさせて注文を触らせたくない場合は、このスイッチをオンにしないでください。相場と口座照会にはまったく影響しません。
できること
全 39 ツール。
相場(18個、認証情報不要)
銘柄と通貨リスト、銘柄仕様、満期日、オプションチェーン(建玉・インプライド・ボラティリティ・売買気配)、リアルタイム相場と板の厚み、オプションのグリークス、過去のローソク足、マーク価格の履歴、指数の現在値と履歴、過去の実現ボラティリティ、DVOL ボラティリティ指数、無期限先物の資金調達レート、全市場の出来高、取引所の取引量、利付きトークンのAPR、決済価格、清算・強制決済履歴、複合注文、プラットフォームステータス、取引所のお知らせ。
口座と注文(16個、認証情報が必要)
口座の純資産と証拠金、全通貨の概要と口座ロック、ポジション明細、サブアカウント一覧、ポートフォリオ証拠金シミュレーション、入出金履歴、決済・受渡履歴、振替履歴、現在の注文、注文ステータス、注文履歴、トリガー注文履歴、約定明細、注文ごとの約定、注文証拠金の見積もり。
取引(5個、認証情報と明示的な有効化が必要)
注文(指値・成行・逆指値・利益確定・トレーリングストップ・アイスバーグ・オプション高度な価格設定)、注文変更、キャンセル、決済、複数レッグの複合注文の作成。
完全なツールと API の対応表は docs/API-COVERAGE.md を参照してください。
バージョン番号の見方
バージョン番号は 2.20260721.0 のような形式です:
2— Deribit API のメジャーバージョン(v2)20260721— 対応する Deribit 公式ドキュメントの公開日(2026-07-21)0— そのドキュメントバージョンでのリビジョン番号
つまり、中央の部分を見れば、そのバージョンがどの日の Deribit ドキュメントに対応しているかがわかります。Deribit が API を更新すると、このプロジェクトも中央の部分を新しい日付に更新します。
よくある質問
アシスタントが Deribit ツールが見つからないと言う場合? クライアントの MCP ログを確認してください。サービス起動時に現在の環境、認証情報の状態、登録済みツールの数が stderr に出力されるので、設定が反映されていないのか、それとも別の問題なのかが一目でわかります。
相場ツールしか見えず、口座ツールがすべて表示されない場合?
認証情報が読み込まれていません。DERIBIT_CLIENT_ID と DERIBIT_CLIENT_SECRET の両方が設定されているか確認してください。片方だけの場合、サービスは起動に失敗し、どちらが不足しているかが表示されます。
注文ツールが表示されない場合?
DERIBIT_ENABLE_TRADING=true と、認証情報の設定が必要です。これは意図的なデフォルト動作です。
invalid_credentials エラーが発生する場合?
キーまたはシークレットが正しくないか、テストネットのキーをメインネットに接続しようとしています(その逆も同様)。両者のアカウントは互換性がありません。
スコープが不足しているというエラーが発生する場合?
API キーに trade:read_write 権限がありません。サービスは注文を出す前にエラーを返すので、注文が送信されたと誤解することはありません。Deribit の管理画面でキーに権限を追加するか、取引スイッチをオフにしてください。
設定を変更しても反映されない場合? MCP サービスはクライアントの起動時に起動されるため、環境変数を変更したらクライアントを再起動する必要があります。
ライセンス
MIT
Available Tools
18 toolsderibit_get_announcementsDeribit AnnouncementsARead-onlyIdempotent
查询交易所公告,包括系统升级、维护窗口、新合约上线和规则变更。body 字段是 HTML。排查异常行情或下单失败前值得先看一眼这里。
Inputs: count, start_timestamp.
deribit_get_apr_historyDeribit APR HistoryARead-onlyIdempotent
查询生息代币的历史年化收益率(APR),按自然日返回。仅支持 usde、steth、usdc、build 四个币种,其它币种没有这项数据。
Inputs: currency (required), limit, before.
deribit_get_combosDeribit CombosARead-onlyIdempotent
查询交易所已有的组合合约。提供 combo_id 时返回单个组合详情;ids_only=true 时只返回该币种的组合 id 列表(载荷远小于完整列表);否则按 currency 返回完整组合列表。
Inputs: state, combo_id, currency, ids_only.
deribit_get_delivery_pricesDeribit Delivery PricesARead-onlyIdempotent
查询指定指数的历史交割价格,用于核对到期合约的结算。
Inputs: index_name (required), count, offset.
deribit_get_expirationsDeribit ExpirationsARead-onlyIdempotent
列出期货或期权的可交易到期日。时间戳单位为毫秒;currency 和 kind 可使用 any 表示不过滤。
Inputs: kind (required), currency (required), currency_pair.
deribit_get_fundingDeribit Perpetual FundingARead-onlyIdempotent
查询永续合约在指定时间范围内的累计资金费率和资金费历史;给 length 时额外返回该长度的资金费走势图数据。时间戳单位为毫秒。
Inputs: end_timestamp (required), instrument_name (required), start_timestamp (required), length.
deribit_get_historical_candlesDeribit Historical CandlesBRead-onlyIdempotent
查询指定合约的历史 K 线和成交量。时间戳单位为毫秒。
Inputs: resolution (required), end_timestamp (required), instrument_name (required), start_timestamp (required).
deribit_get_historical_volatilityDeribit Historical VolatilityARead-onlyIdempotent
查询指定币种的历史已实现波动率序列,单位为年化百分比。
Inputs: currency (required).
deribit_get_index_priceDeribit Index PriceARead-onlyIdempotent
查询指定指数的当前价格;给 range 时同时返回该区间的指数价格历史;省略 index_name 时返回可用指数名称。
Inputs: type, range, index_name.
deribit_get_instruments_infoDeribit Instruments InfoARead-onlyIdempotent
查询 Deribit 支持的币种和可交易合约。省略全部参数时仅返回币种;给 currency 返回该币种的合约列表;给 instrument_name 返回单个合约的详细规格(含 tick size、合约乘数、手续费率、到期时间和 instrument id)。
Inputs: kind, currency, instrument_name.
deribit_get_market_quoteDeribit Market QuoteARead-onlyIdempotent
查询指定合约的实时行情、盘口深度、隐含波动率和期权 Greeks。instrument_name 与 instrument_id 二选一,用 id 查询时只返回盘口。
Inputs: depth, instrument_id, instrument_name.
deribit_get_mark_price_historyDeribit Mark Price HistoryARead-onlyIdempotent
查询指定合约的历史标记价格序列,返回 [时间戳, 标记价] 数组对。时间戳单位为毫秒。注意:Deribit 只对参与波动率指数计算的那部分期权保留标记价格历史,期货和永续会返回空数组,空结果属于正常情况而非故障。
Inputs: end_timestamp (required), instrument_name (required), start_timestamp (required).
deribit_get_option_chainDeribit Option ChainARead-onlyIdempotent
查询合约摘要,包括持仓量、隐含波动率、成交量和买卖价。给 currency 返回整条期权链或该币种其它类型的合约摘要;给 instrument_name 只返回单个合约的摘要。两者必须二选一。
Inputs: kind, currency, instrument_name.
deribit_get_public_settlementsDeribit Public SettlementsARead-onlyIdempotent
查询全市场的结算、交割和穿仓事件,不含个人持仓损益。currency 与 instrument_name 必须二选一。个人的期权交割和结算结果请用 deribit_get_settlement_history。
Inputs: type, count, currency, continuation, +2 more.
deribit_get_public_tradesDeribit Public TradesARead-onlyIdempotent
查询全市场公开成交,不包含个人成交。currency 与 instrument_name 必须二选一。给时间戳会走官方的时间窗口专用端点,给 start_seq/end_seq 则按成交序号翻页,两种过滤方式不能混用。
Inputs: kind, count, end_seq, sorting, +5 more.
deribit_get_statusDeribit Platform StatusARead-onlyIdempotent
查询 Deribit 平台状态和服务器时间,可用于确认维护或结算窗口。
Inputs: no named parameters.
deribit_get_trade_volumesDeribit Trade VolumesARead-onlyIdempotent
查询 Deribit 全交易所按币种汇总的 24 小时成交量,分为看涨期权、看跌期权、期货和现货。extended=true 时额外返回 7 日和 30 日成交量。这是交易所整体数据,与个人成交无关。
Inputs: extended.
deribit_get_volatility_indexDeribit Volatility Index (DVOL)ARead-onlyIdempotent
查询 DVOL 波动率指数的 OHLC 数据。时间戳单位为毫秒。
Inputs: currency (required), resolution (required), end_timestamp (required), start_timestamp (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool targets a distinct data type (volumes, instruments, expirations, quotes, candle history, funding, etc.) with no overlapping purposes. The descriptions clearly differentiate between exchange-level aggregates and instrument-specific data, making misselection unlikely.
All 18 tools follow the exact pattern 'deribit_get_<noun_phrase>', using consistent snake_case and a uniform verb. The names are descriptive and predictable, enabling agents to infer what each tool does without ambiguity.
18 tools is on the high end but still reasonable for a comprehensive public market data server covering quotes, histories, volatility, funding, settlements, and announcements. The scope justifies the count, though it pushes slightly beyond the typical 3-15 range.
The server covers the full spectrum of public Deribit data: instruments, quotes, order books, options chains, historical candles, mark prices, indices, volatility, funding, trades, settlements, combos, and announcements. No obvious gaps exist for public market data; the mention of a personal settlement tool indicates a clear boundary between public and private data.
Maintenance
Related MCP Connectors
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
MCP server exposing the Backtest360 engine API as tools for AI agents.
Related MCP Servers
- FlicenseBqualityDmaintenanceA comprehensive MCP server providing full access to Bybit's v5 API for real-time market data, trading operations, and account management. It enables AI assistants to execute trades, manage positions, and monitor wallet balances with built-in safety controls for both testnet and production environments.226-
- AlicenseBqualityCmaintenanceAn MCP server that gives an LLM agent a typed, audited tool surface over quant crypto-options desk analytics: gamma exposure, vanna, skew, vol surface, options flow, technicals, portfolio greeks, scenario analysis, and live positions.222MIT

Bybit MCP Serverofficial
AlicenseCqualityBmaintenanceA production-ready MCP server for Bybit — 206 tools covering market data, trading, positions, account management, assets, and real-time WebSocket streams. Enables AI assistants to interact directly with the Bybit cryptocurrency exchange through natural language.4031,095 npm45MIT- AlicenseNot gradedqualityDmaintenanceMCP server for cryptocurrency trading across multiple exchanges (Bybit, Binance, KuCoin, etc.) with real-time price data, comparison, and natural language query support. Integrates with AI assistants via the Model Context Protocol.MIT