Skip to main content
Glama
deribit-mcp

deribit-mcp

by freeeverett

deribit-mcp

Bring Deribit into your AI assistant. Works with Claude Code, Codex and any other MCP client — one command to install, and your assistant can read markets, inspect your account and manage orders.

claude mcp add deribit -- npx -y deribit-mcp

Once it is installed you can ask things like "what does the BTC option chain look like right now?", "show me the implied volatility on the March calls" or "how much free margin is left in my account?".

Two safety defaults: it connects to testnet by default, and trading is off by default. Placing a real order requires you to turn both on explicitly.


Installation

Claude Code

For market data only, no configuration is needed:

claude mcp add deribit -- npx -y deribit-mcp

To query your account and orders, add API credentials and switch to mainnet:

claude mcp add deribit \
  --env DERIBIT_ENV=prod \
  --env DERIBIT_CLIENT_ID=your_client_id \
  --env DERIBIT_CLIENT_SECRET=your_client_secret \
  -- npx -y deribit-mcp

Codex

Edit ~/.codex/config.toml (or the project's .codex/config.toml):

[mcp_servers.deribit]
command = "npx"
args = ["-y", "deribit-mcp"]

[mcp_servers.deribit.env]
DERIBIT_ENV = "prod"
DERIBIT_CLIENT_ID = "your_client_id"
DERIBIT_CLIENT_SECRET = "your_client_secret"

Other MCP clients

Any client that speaks stdio works. The command is npx -y deribit-mcp, and configuration is passed through environment variables.

Running from source (optional)

To pin a specific revision, or if you have modified the code yourself, you can point the client straight at the sources and skip 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", "/absolute/path/deribit-mcp/src/index.ts"]

The cost is roughly twice the startup time (about 160ms vs 77ms) and a local dependency install. For everyday use, npx -y deribit-mcp is still the recommendation.

Getting API credentials

Create a key under Deribit account settings → API.

What you want to do

Permission the key needs

Read public market data only

no key required

Query account, positions, orders and fills

trade:read

Place, edit, cancel and close

trade:read_write

Prefer least privilege: if you only want the assistant to analyse things, trade:read is enough, and then no order can be placed even if the trading switch is turned on by mistake.


Related MCP server: Crypto Options Desk MCP

Configuration

Environment variable

Default

Meaning

DERIBIT_ENV

test

test for testnet, prod for mainnet

DERIBIT_CLIENT_ID

—

API key. Without it, only the public market data tools are available

DERIBIT_CLIENT_SECRET

—

API secret; must be set together with DERIBIT_CLIENT_ID

DERIBIT_ENABLE_TRADING

false

Set to true to expose place / edit / cancel / close

DERIBIT_API_BASE

—

Custom endpoint; rarely needed

Testnet is a separate world: accounts and API keys on test.deribit.com do not work on mainnet at all, so you need to register separately at test.deribit.com. Testnet hands out free test coins, which makes it the right place to rehearse a workflow before switching to mainnet.

Full testnet integration suite

Create a git-ignored .env.test in the project root containing testnet API credentials only:

DERIBIT_CLIENT_ID=your_testnet_client_id
DERIBIT_CLIENT_SECRET=your_testnet_client_secret

Then run:

npm run test:all

That entry point reads .env.test natively and forces the connection to testnet (it will not adopt a mainnet or custom endpoint from the file). It drives all 39 tools through a real stdio MCP client and requires a key with trade:read_write: it creates, edits and cancels a limit order carrying a unique test label, briefly opens and closes a market position, and creates a test combo. On exit the script cancels anything left under that label, and the command fails if that cleanup fails. npm test runs offline regressions for request retries and order filters, followed by the public-endpoint smoke tests against testnet; it needs no credentials.


About the trading tools

The order-placing tools are not exposed by default — without DERIBIT_ENABLE_TRADING=true your assistant cannot even see them, so it cannot trip over them.

Once enabled you get: place order, edit order, cancel order, close position, create combo instrument.

Please understand:

  • These operations produce real fills on your real account, with real money

  • Rehearse on testnet first, then consider mainnet

  • On mainnet with trading enabled the server prints an explicit warning at startup, and the assistant is instructed that it must confirm with you before executing

  • But the final gate is you: when an order request appears, read it carefully before approving

If you only want analysis and would rather the assistant never touched your orders, leave the switch off — market data and account queries are entirely unaffected.


What it can do

39 tools in total.

Market data (18, no credentials needed)

Instrument and currency listings, contract specifications, expirations, option chains (open interest / implied volatility / bid-ask), live quotes and order book depth, option Greeks, historical candles, mark price history, index spot and history, historical realised volatility, the DVOL volatility index, perpetual funding rates, market-wide trades, exchange volumes, yield-bearing token APR, delivery prices, settlement and bankruptcy records, combo instruments, platform status and exchange announcements.

Account and orders (16, credentials required)

Account equity and margin, all-currency overview and account locks, position details, subaccount listing, portfolio margin simulation, transaction log, settlement and delivery records, deposit/withdrawal/transfer history, open orders, order state, order history, trigger order history, fill details, per-order fills, and order margin estimation.

Trading (5, credentials required and explicitly enabled)

Place order (limit / market / stop / take-profit / trailing stop / iceberg / advanced option pricing), edit order, cancel order, close position, create multi-leg combo instrument.


API coverage

How this server maps onto the official Deribit API, by the categories the official specification uses. It covers 81 of the 172 REST endpoints.

Category

Status

Market Data

fully implemented (30/30)

Combo Books

fully implemented (5/5)

Trading

implemented except market-maker features (29/37) — no MMP configuration/status/reset, no mass_quote / cancel_quotes, and move_positions is deliberately not exposed

Supporting

implemented — public/status and public/get_time; public/test is skipped as redundant

Authentication

public/auth only — exchange_token and fork_token are not implemented

Account Management

read-only queries only (11/41) — summaries, positions, subaccount listing, transaction log, portfolio simulation. No subaccount or API key management

Wallet

read-only history only (3/21) — transfers, deposits, withdrawals. Executing a deposit, withdrawal or transfer is not implemented

Block Trade

not implemented

Block RFQ

not implemented

Liquidity Support Program (lsp)

not implemented

Session Management

not implemented

A further 10 endpoints are WebSocket-only (subscriptions and session management) and are out of scope for a stdio JSON-RPC server.

The endpoint-level breakdown, including which tool calls which method, lives in docs/API-COVERAGE.md.


Reading the version number

A version looks like 2.20260915.0:

  • 2 — the Deribit API major version (v2)

  • 20260915 — the Deribit documentation release this is aligned to (2026-09-15)

  • 0 — the nth revision against that documentation release

In other words, the middle segment tells you which day's Deribit documentation a release tracks. When Deribit changes the API, this project follows by pushing that middle segment to the new date.


FAQ

The assistant says it cannot find the Deribit tools. Check the client's MCP log. At startup the server writes the current environment, credential status and the number of registered tools to stderr, which usually makes it obvious whether the configuration took effect.

I only see the market data tools; the account tools are missing. The credentials were not picked up. Confirm that both DERIBIT_CLIENT_ID and DERIBIT_CLIENT_SECRET are set — with only one of them the server fails to start and says which one is missing.

I cannot see the order-placing tools. They need DERIBIT_ENABLE_TRADING=true plus configured credentials. That default is deliberate.

I get invalid_credentials. The key or secret is wrong, or you are using a testnet key against mainnet (or vice versa). Accounts are not shared between the two.

I get an error about an insufficient scope. The API key lacks trade:read_write. The server raises this before placing an order rather than letting you believe one went out. Grant the permission in the Deribit dashboard, or turn the trading switch off.

I changed the configuration and nothing happened. The MCP server is launched by the client at startup, so restart the client after changing environment variables.


License

MIT

Available Tools

18 tools
deribit_get_announcementsDeribit AnnouncementsA
Read-onlyIdempotent

查询交易所公告,包括系统升级、维护窗口、新合约上线和规则变更。body 字段是 HTML。排查异常行情或下单失败前值得先看一眼这里。

Inputs: count, start_timestamp.

deribit_get_apr_historyDeribit APR HistoryA
Read-onlyIdempotent

查询生息代币的历史年化收益率(APR),按自然日返回。仅支持 usde、steth、usdc、build 四个币种,其它币种没有这项数据。

Inputs: currency (required), limit, before.

deribit_get_combosDeribit CombosA
Read-onlyIdempotent

查询交易所已有的组合合约。提供 combo_id 时返回单个组合详情;ids_only=true 时只返回该币种的组合 id 列表(载荷远小于完整列表);否则按 currency 返回完整组合列表。

Inputs: state, combo_id, currency, ids_only.

deribit_get_delivery_pricesDeribit Delivery PricesA
Read-onlyIdempotent

查询指定指数的历史交割价格,用于核对到期合约的结算。

Inputs: index_name (required), count, offset.

deribit_get_expirationsDeribit ExpirationsA
Read-onlyIdempotent

列出期货或期权的可交易到期日。时间戳单位为毫秒;currency 和 kind 可使用 any 表示不过滤。

Inputs: kind (required), currency (required), currency_pair.

deribit_get_fundingDeribit Perpetual FundingA
Read-onlyIdempotent

查询永续合约在指定时间范围内的累计资金费率和资金费历史;给 length 时额外返回该长度的资金费走势图数据。时间戳单位为毫秒。

Inputs: end_timestamp (required), instrument_name (required), start_timestamp (required), length.

deribit_get_historical_candlesDeribit Historical CandlesB
Read-onlyIdempotent

查询指定合约的历史 K 线和成交量。时间戳单位为毫秒。

Inputs: resolution (required), end_timestamp (required), instrument_name (required), start_timestamp (required).

deribit_get_historical_volatilityDeribit Historical VolatilityA
Read-onlyIdempotent

查询指定币种的历史已实现波动率序列,单位为年化百分比。

Inputs: currency (required).

deribit_get_index_priceDeribit Index PriceA
Read-onlyIdempotent

查询指定指数的当前价格;给 range 时同时返回该区间的指数价格历史;省略 index_name 时返回可用指数名称。

Inputs: type, range, index_name.

deribit_get_instruments_infoDeribit Instruments InfoA
Read-onlyIdempotent

查询 Deribit 支持的币种和可交易合约。省略全部参数时仅返回币种;给 currency 返回该币种的合约列表;给 instrument_name 返回单个合约的详细规格(含 tick size、合约乘数、手续费率、到期时间和 instrument id)。

Inputs: kind, currency, instrument_name.

deribit_get_market_quoteDeribit Market QuoteA
Read-onlyIdempotent

查询指定合约的实时行情、盘口深度、隐含波动率和期权 Greeks。instrument_name 与 instrument_id 二选一,用 id 查询时只返回盘口。

Inputs: depth, instrument_id, instrument_name.

deribit_get_mark_price_historyDeribit Mark Price HistoryA
Read-onlyIdempotent

查询指定合约的历史标记价格序列,返回 [时间戳, 标记价] 数组对。时间戳单位为毫秒。注意:Deribit 只对参与波动率指数计算的那部分期权保留标记价格历史,期货和永续会返回空数组,空结果属于正常情况而非故障。

Inputs: end_timestamp (required), instrument_name (required), start_timestamp (required).

deribit_get_option_chainDeribit Option ChainA
Read-onlyIdempotent

查询合约摘要,包括持仓量、隐含波动率、成交量和买卖价。给 currency 返回整条期权链或该币种其它类型的合约摘要;给 instrument_name 只返回单个合约的摘要。两者必须二选一。

Inputs: kind, currency, instrument_name.

deribit_get_public_settlementsDeribit Public SettlementsA
Read-onlyIdempotent

查询全市场的结算、交割和穿仓事件,不含个人持仓损益。currency 与 instrument_name 必须二选一。个人的期权交割和结算结果请用 deribit_get_settlement_history。

Inputs: type, count, currency, continuation, +2 more.

deribit_get_public_tradesDeribit Public TradesA
Read-onlyIdempotent

查询全市场公开成交,不包含个人成交。currency 与 instrument_name 必须二选一。给时间戳会走官方的时间窗口专用端点,给 start_seq/end_seq 则按成交序号翻页,两种过滤方式不能混用。

Inputs: kind, count, end_seq, sorting, +5 more.

deribit_get_statusDeribit Platform StatusA
Read-onlyIdempotent

查询 Deribit 平台状态和服务器时间,可用于确认维护或结算窗口。

Inputs: no named parameters.

deribit_get_trade_volumesDeribit Trade VolumesA
Read-onlyIdempotent

查询 Deribit 全交易所按币种汇总的 24 小时成交量,分为看涨期权、看跌期权、期货和现货。extended=true 时额外返回 7 日和 30 日成交量。这是交易所整体数据,与个人成交无关。

Inputs: extended.

deribit_get_volatility_indexDeribit Volatility Index (DVOL)A
Read-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

    A4/5.0

    Scored across 18 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count4/5

    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.

    Completeness5/5

    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

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      A 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.
      22
      6
      -
    • A
      license
      B
      quality
      C
      maintenance
      An 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.
      22
      2
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      A 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.
      403
      1,095 npm
      45
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP 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