Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PACIFICA_PRIVATE_KEY | Yes | Private key for Pacifica (Solana key). | |
| LIGHTER_API_KEY_INDEX | No | Override for Lighter API key index. Indexes 0–3 are reserved by Lighter's frontend. perp-cli defaults to index 4. Valid range: 4–254. | |
| HYPERLIQUID_PRIVATE_KEY | Yes | Private key for Hyperliquid (EVM-compatible key). Also used for Lighter. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_markets | Get all available perpetual futures markets on an exchange, including price, funding rate, volume, and max leverage |
| get_orderbook | Get the order book (bids and asks) for a symbol on an exchange |
| get_funding_rates | Compare funding rates across all 3 exchanges (Pacifica, Hyperliquid, Lighter). Returns rates per symbol with spread analysis |
| get_prices | Get cross-exchange prices for symbols. Fetches mark prices from all 3 exchanges for comparison |
| get_balance | Get account balance (equity, available margin, margin used, unrealized PnL) on an exchange |
| get_positions | Get all open positions on an exchange, including size, entry price, PnL, leverage |
| get_open_orders | Get all open/pending orders on an exchange |
| portfolio | Cross-exchange portfolio summary: balances, positions, and risk metrics across all exchanges |
| suggest_command | Given a natural language trading goal, suggest the exact perp CLI commands to run. Does NOT execute anything — only returns commands for the user to review and run manually |
| explain_command | Explain what a perp CLI command does, its parameters, and any risks. Helps the user understand a command before running it |
| arb_scan | Scan for funding rate arbitrage opportunities across exchanges. Finds symbols with the largest funding rate spreads |
| health_check | Ping all exchanges and return connectivity status and latency |
| trade_preview | Preview a trade WITHOUT executing. Returns estimated fill price, fees, margin impact, and risk checks. ALWAYS call this before trade_execute and show the result to the user for confirmation. |
| trade_execute | Execute a trade. IMPORTANT: Always call trade_preview first and get explicit user confirmation before calling this tool. Supports market and limit orders. |
| trade_close | Close an existing position. IMPORTANT: Call trade_preview first with the opposite side to show impact, then get user confirmation. |
| get_funding_analysis | Analyze funding income across exchanges — cumulative totals, annualized rates, and per-arb-position breakdown. Great for tracking funding arb profitability. |
| get_pnl_analysis | P&L analysis combining trading fees and funding income — shows net profit/loss by exchange with daily breakdown |
| get_arb_compare | Compare active arbitrage positions side by side — ROI, funding income, price PnL, and annualized returns for each position |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| trading-guide | Step-by-step guide for trading with perp-cli via this MCP server. Covers market data lookup, trade preview, execution, and position management. |
| arb-strategy | Funding rate arbitrage strategy guide. How to find, execute, and manage cross-exchange arbitrage positions using perp-cli. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| cli_schema | Full CLI command schema — all commands, args, options, exchanges, and error codes |
| market_prices | Live cross-exchange prices for all perpetual futures markets |
| funding_rates | Current funding rates across all exchanges with spread analysis |