deribit-mcp
Use deribit-mcp to bring Deribit market data into an MCP-capable AI assistant, with optional account read access and explicitly enabled real trading.
Query currencies, instruments, contract specs, instrument IDs, tick sizes, fees and expirations.
Inspect option chains with open interest, implied volatility, volume, bid/ask, and option Greeks.
Get live quotes, order book depth, historical candles, mark price history, index prices/history, realized volatility, and DVOL volatility index.
Check perpetual funding rates, public trades, exchange trade volumes, and yield-bearing token APR history.
Look up delivery prices, public settlements/bankruptcy events, combo instruments, platform status, and announcements.
With API credentials, read account equity/margin, positions, subaccounts, portfolio margin simulation, transaction logs, settlements, deposits/withdrawals/transfers, open orders, order history, trigger orders, and fills.
With credentials plus DERIBIT_ENABLE_TRADING=true, place/edit/cancel orders, close positions, and create combo instruments.
Safety defaults: testnet and trading disabled unless explicitly changed.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@deribit-mcp show me the current BTC options chain"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
deribit-mcp
Connect Deribit to your AI assistant. Works with any MCP client such as Claude Code and Codex. One command to connect, letting your assistant check market data, view accounts, and manage orders.
claude mcp add deribit -- npx -y deribit-mcpOnce installed, you can ask: "What does BTC's options chain look like right now?", "Show me the implied volatility of call options expiring in March", "How much available margin do I have left in my account?"
Two safety defaults: it connects to the testnet by default and has trading disabled by default. To place real orders, you must explicitly enable both.
Installation
Claude Code
For market data only, no configuration needed:
claude mcp add deribit -- npx -y deribit-mcpTo view accounts and orders, add API credentials and switch to mainnet:
claude mcp add deribit \
--env DERIBIT_ENV=prod \
--env DERIBIT_CLIENT_ID=你的_client_id \
--env DERIBIT_CLIENT_SECRET=你的_client_secret \
-- npx -y deribit-mcpCodex
Edit ~/.codex/config.toml (or .codex/config.toml in your project):
[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"Other MCP clients
Any client that supports stdio can use it. The command is npx -y deribit-mcp, and configuration is passed via environment variables.
Running from source (optional)
If you want to pin a specific version or have modified the code yourself, you can point directly at the source without having to remember to rebuild after every change:
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"]The trade-off is roughly double the startup time (about 160ms vs 77ms), and you need dependencies installed locally. For everyday use, npx -y deribit-mcp is still recommended.
Getting API credentials
Create a key in Deribit Account Settings → API.
What you want to do | Permissions required for the key |
View public market data only | No key needed |
View account, positions, orders, and trades |
|
Place, modify, cancel, and close orders |
|
It's recommended to grant the least privilege: if you only want the assistant to analyze for you, trade:read is enough — even if you accidentally enable the trading switch, it won't be able to place orders.
Related MCP server: Crypto Options Desk MCP
Configuration
Environment variable | Default | Description |
|
|
|
| — | API key. If not set, only public market data tools are available |
| — | API secret, must be provided together with |
|
| Set to |
| — | Custom API endpoint, usually not needed |
The testnet is separate: accounts and API keys on
test.deribit.comare completely incompatible with the mainnet. You need to register separately at test.deribit.com. The testnet offers free test coins, so it's a good place to run through the flow before switching to mainnet.
Full testnet integration tests
Create a git-ignored .env.test in the project root, containing only testnet API credentials:
DERIBIT_CLIENT_ID=你的测试网_client_id
DERIBIT_CLIENT_SECRET=你的测试网_client_secretThen run:
npm run test:allThis entry point natively reads .env.test and forces a testnet connection (it will not use mainnet or custom endpoint settings from the file). It runs all 39 tools through a real stdio MCP client and requires the key to have trade:read_write: it creates, modifies, and cancels limit orders with a unique test tag, briefly opens and closes positions with market orders, and creates a test portfolio. When the script exits, it cancels orders by that tag as a fallback; if cleanup fails, the command exits with a failure. The existing npm run smoke remains a fast public-interface regression that requires no credentials.
About trading features
Order-related tools are disabled by default — unless you set DERIBIT_ENABLE_TRADING=true, your assistant won't even see these tools, so there's no risk of accidental use.
Once enabled, you can: place orders, modify orders, cancel orders, close positions, and create portfolio contracts.
Please be aware:
These actions will produce real fills on your real account — the money is real
It's recommended to get familiar with the flow on the testnet before considering mainnet
When mainnet + trading are enabled, the service prints an explicit warning at startup, and the assistant also receives an instruction that it must confirm with the user before executing
But the final gate is you: whenever an order request appears, read it carefully before clicking approve
If you only want the assistant to analyze and not touch orders, don't enable this switch — market data and account queries are completely unaffected.
What it can do
39 tools in total.
Market data (18, no credentials needed)
Instrument and currency lists, contract specs, expiration dates, options chains (open interest / implied volatility / bid-ask prices), real-time quotes and order book depth, option Greeks, historical candlesticks, mark price history, index spot and history, historical realized volatility, DVOL volatility index, perpetual funding rates, all-market trades, exchange volume, interest-bearing token APR, delivery prices, settlement and liquidation records, portfolio contracts, platform status, and exchange announcements.
Account and orders (16, credentials required)
Account equity and margin, all-currency overview and account locks, position details, sub-account list, portfolio margin simulation, fund flows, settlement and delivery records, deposit/withdrawal/transfer history, current open orders, order status, historical orders, trigger order history, trade details, fills for a single order, and order margin estimation.
Trading (5, credentials required and explicitly enabled)
Place orders (limit / market / stop loss / take profit / trailing stop / iceberg / advanced option pricing), modify orders, cancel orders, close positions, and create multi-leg portfolio contracts.
See docs/API-COVERAGE.md for the full mapping of tools to API endpoints.
How to read the version number
Version numbers look like 2.20260721.0:
2— Deribit API major version (v2)20260721— the publication date of the Deribit official documentation it aligns to (2026-07-21)0— the revision number under that documentation version
In other words, the middle segment tells you which day's Deribit documentation this version tracks. When Deribit updates its API, this project will bump the middle segment to the new date.
FAQ
The assistant says it can't find the Deribit tools? Check the client's MCP logs. At startup, the service prints the current environment, credential status, and the number of registered tools to stderr, so you can tell at a glance whether the configuration didn't take effect or something else is wrong.
You can only see market data tools, and all account tools are missing?
That means the credentials weren't read. Make sure both DERIBIT_CLIENT_ID and DERIBIT_CLIENT_SECRET are configured — if only one is set, the service will fail to start and tell you which one is missing.
Can't see the trading tools?
You need DERIBIT_ENABLE_TRADING=true and configured credentials. This is intentional default behavior.
Getting an invalid_credentials error?
The key or secret is wrong, or you're using a testnet key while connected to mainnet (or vice versa). The two sides don't share accounts.
Getting an error saying insufficient scope?
The API key doesn't have trade:read_write permission. The service will error out before placing the order, rather than making you think the order was already sent. Add the permission to the key in the Deribit dashboard, or turn off the trading switch.
Changed the configuration but it didn't take effect? The MCP service is started when the client launches, so you need to restart the client after changing environment variables.
License
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.2241 PyPI6-
- 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.4001,212 npm44MIT- 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