perp-cli
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. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_marketsA | Get all available perpetual futures markets on an exchange, including price, funding rate, volume, and max leverage. Works without API keys. |
| get_orderbookA | Get the order book (bids and asks) for a symbol on an exchange. Works without API keys. |
| get_funding_ratesA | Compare funding rates across all 4 exchanges (Pacifica, Hyperliquid, Lighter, Aster). Returns rates per symbol with spread analysis |
| get_pricesA | Get cross-exchange prices for symbols. Fetches mark prices from all 4 exchanges for comparison |
| get_balanceA | Get account balance (equity, available margin, margin used, unrealized PnL) on an exchange |
| get_positionsA | Get all open positions on an exchange, including size, entry price, PnL, leverage |
| get_open_ordersB | Get all open/pending orders on an exchange |
| portfolioA | Cross-exchange portfolio summary: balances, positions, and risk metrics across all 4 exchanges |
| suggest_commandA | 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_commandA | Explain what a perp CLI command does, its parameters, and any risks. Helps the user understand a command before running it |
| arb_scanA | Scan for funding rate arbitrage opportunities across exchanges. Finds symbols with the largest funding rate spreads |
| health_checkA | Ping all 4 exchanges and return connectivity status and latency |
| trade_previewA | 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_executeA | Execute a trade. IMPORTANT: Always call trade_preview first and get explicit user confirmation before calling this tool. Supports market and limit orders. |
| trade_closeA | Close an existing position. IMPORTANT: Call trade_preview first with the opposite side to show impact, then get user confirmation. |
| get_funding_analysisA | Analyze funding income across exchanges — cumulative totals, annualized rates, and per-arb-position breakdown. Great for tracking funding arb profitability. |
| get_pnl_analysisA | P&L analysis combining trading fees and funding income — shows net profit/loss by exchange with daily breakdown |
| get_arb_compareA | 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 |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hypurrquant/perp-cli'
If you have feedback or need assistance with the MCP directory API, please join our Discord server