Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PACIFICA_PRIVATE_KEYYesPrivate key for Pacifica (Solana key).
LIGHTER_API_KEY_INDEXNoOverride 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_KEYYesPrivate key for Hyperliquid (EVM-compatible key). Also used for Lighter.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription
trading-guideStep-by-step guide for trading with perp-cli via this MCP server. Covers market data lookup, trade preview, execution, and position management.
arb-strategyFunding 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

NameDescription
cli_schemaFull CLI command schema — all commands, args, options, exchanges, and error codes
market_pricesLive cross-exchange prices for all perpetual futures markets
funding_ratesCurrent funding rates across all exchanges with spread analysis

Latest Blog Posts

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