← Back to perp-cli

Install perp-cli

Pick your client, copy the command, done.

1

Add it to Claude Code

claude mcp add perp-cli -- npx -y perp-cli --json

Environment Variables

Set these before running perp-cli.

VariableDescriptionRequired
LIGHTER_API_KEY_INDEXOverride the default Lighter API key index (4-254).No

Available Tools (5)

Once configured, perp-cli gives your AI agent access to:

marketAccess market data including prices, orderbooks, funding rates, and klines.
exchangecommandsymbol
tradeExecute market, limit, and stop orders with support for advanced strategies.
exchangeactionsymbolsize
accountRetrieve balance, positions, PnL, and margin settings.
exchangecommand
arbScan and execute funding rate arbitrage opportunities.
modeoptions
portfolioGet a unified overview of balances, positions, and risk across all exchanges.

Try It Out

After setup, try these prompts with your AI agent:

Get a unified portfolio overview across all connected exchanges.
Scan for current funding rate arbitrage opportunities between perp markets.
Check the current mid-price and orderbook for ETH on Hyperliquid.
Close all open positions on the Pacifica exchange.
Set a take-profit and stop-loss for my current BTC long position.
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Node.js 18+ with npm/npx installed
Alternative installation methods

NPX

npx -y perp-cli --json portfolio

Keep this setup from going cold

Save the docs, env vars, and workflow around perp-cli in Conare so Claude Code, Codex, and Cursor remember it next time.

Remember this setup