- Home
- MCP servers
- Derive
Derive
- javascript
0
GitHub Stars
javascript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You set up this MCP server to access Lyra Derive data and trading capabilities via a local or remote MCP endpoint. It provides real-time market data, historical data, account management, trading, RFQ, and risk tools across options, perpetuals, and spot instruments, all accessible through a uniform MCP interface.
How to use
Use an MCP client to connect to the Derive MCP server and call the available tools to fetch data or execute trades. You can read real-time data for single instruments with a ticker, or pull bulk data with multi-instrument tickers and order books. You can place orders, view your positions, manage subaccounts and collateral, and interact with RFQs and risk tools. Start with account overview to understand your rate limits and available subaccounts, then call trading or data endpoints as needed. Use the provided environment variables to sign requests for private endpoints and supply your wallet information when you intend to trade.
How to install
Prerequisites: you need Node.js installed on your system. You may optionally use a package manager like npm. The setup steps below assume you will run the MCP server locally and connect clients to it.
# Install prerequisites (Node.js must be installed separately)
# Clone the project repository
git clone https://example.com/derive-mcp derive-mcp
cd derive-mcp
# Install dependencies
npm install
# Start the MCP server (the final step described later may differ by environment)
npm run start
Additional sections
Configuration, security, and usage notes help you operate the Derive MCP server safely and efficiently.
Configuration and usage notes
Environment variables shown for private endpoints include the wallet address and the private key needed for signing, if you intend to trade. The server also uses the environment to determine the runtime network (mainnet or testnet). The HTTP endpoints expose the data and trading surface you interact with through the MCP. Use the provided environment variables to enable private actions and to identify your wallet when signing requests.
Troubleshooting
If you encounter API errors or authentication errors, verify that your wallet address is correctly configured in DERIVE_WALLET and that DERIVE_PRIVATE_KEY is set when you perform trading actions. Check that you are connected to the intended environment (mainnet vs testnet) and confirm your subaccount and instrument names are valid. For rate limits, inspect the current limits via the get_account tool and adjust request frequency or pagination as needed.
Available tools
get_currencies
Get all available trading currencies on the platform to discover trading pairs.
get_instruments
Fetch tradeable instruments for a given currency and type, including fees and constraints.
get_ticker
Retrieve real-time ticker data for a single instrument, including bid/ask, volume, and Greeks for options.
get_tickers
Fetch tickers for multiple instruments efficiently to monitor several markets.
get_orderbook
Obtain the real-time order book with depth and spread analysis for an instrument.
get_spot_feed_history
Access historical spot feed/index price data for analysis.
get_trade_history
Query tick-by-tick trade history with filtering and pagination.
get_funding_rate_history
Retrieve historical funding rates for perpetual contracts.
get_option_settlement_history
Get option expiration and settlement data.
get_liquidation_history
View platform-wide liquidation events and related details.
get_account
Fetch account overview including subaccounts, rate limits, and fees.
get_subaccounts
List all subaccounts for a wallet with labels and status.
get_balance
Obtain total balances across subaccounts and collaterals.
get_positions
Fetch open positions with PnL, Greeks, and risk metrics.
get_collaterals
Retrieve collateral information and valuations for subaccounts.
get_margin
Access detailed margin metrics and status.
place_order
Place market or limit orders for options, perps, and spot instruments.
cancel_order
Cancel a specific open order.
cancel_all_orders
Bulk cancel orders with optional filtering by currency or instrument.
replace_order
Atomically replace an existing order with new parameters.
get_open_orders
List all open orders for a subaccount.
get_orders_history
Fetch complete order history with fills and status.
get_my_trades
View personal trade history including fees and realized PnL.
get_funding_history
Track funding payments received or paid.
get_deposit_history
Review deposit transactions and statuses.
get_withdrawal_history
Review withdrawal transactions and statuses.
send_rfq
Request quotes from market makers for a given instrument.
get_rfqs
View active RFQs and quotes for a subaccount.
execute_quote
Execute a market-maker quote at the quoted price.
get_liquidation_price
Compute the current liquidation price for a position.
margin_watch
Identify accounts approaching liquidation and provide actions.