MCP Directory

How to add perp-cli to Cursor

Multi-DEX perpetual futures MCP server for Pacifica, Hyperliquid, Lighter & Aster — market data, trading, and funding-rate arbitrage. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 31 · stdio · apikey

Cursor config for perp-cli

npm install -g perp-cli
{
  "mcpServers": {
    "perp-cli": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "perp-cli",
        "perp-mcp"
      ],
      "env": {
        "PACIFICA_PRIVATE_KEY": "your-solana-key",
        "HYPERLIQUID_PRIVATE_KEY": "your-evm-key",
        "LIGHTER_PRIVATE_KEY": "your-evm-key",
        "ASTER_API_KEY": "your-api-key"
      }
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the perp-cli config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of perp-cli's tools to confirm it's connected.

Before you start

  • Node.js with npx (or a global `npm install -g perp-cli`)
  • For trading/account tools: exchange private keys or API keys (Pacifica Solana key, Hyperliquid/Lighter EVM key, Aster API key) supplied as environment variables
  • No credentials needed for market-data tools

What perp-cli can do in Cursor

get_markets

List available markets across exchanges (read-only, no keys required).

get_orderbook

Fetch the orderbook for a symbol (read-only, no keys required).

get_funding_rates

Get current funding rates across exchanges (read-only, no keys required).

get_prices

Get current prices / mid prices (read-only, no keys required).

arb_scan

Scan for funding-rate arbitrage opportunities (read-only, no keys required).

health_check

Check adapter health across all four DEX (read-only, no keys required).

get_balance

Get account balance for an exchange (requires keys).

get_positions

List open positions (requires keys).

Security

Market-data tools require no credentials. Account and trading tools require exchange private keys / API keys supplied via environment variables (PACIFICA_PRIVATE_KEY, HYPERLIQUID_PRIVATE_KEY, LIGHTER_PRIVATE_KEY, ASTER_API_KEY). These keys control real funds on live DEX accounts — store them securely and be aware that trading tools can execute real orders. The same EVM key works for both Hyperliquid and Lighter. Responses are auto-sanitized (control chars stripped, prompt-injection patterns blocked).

perp-cli + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the perp-cli config there under the "mcpServers" key and restart the client.

Is perp-cli safe to use with Cursor?

Market-data tools require no credentials. Account and trading tools require exchange private keys / API keys supplied via environment variables (PACIFICA_PRIVATE_KEY, HYPERLIQUID_PRIVATE_KEY, LIGHTER_PRIVATE_KEY, ASTER_API_KEY). These keys control real funds on live DEX accounts — store them securely and be aware that trading tools can execute real orders. The same EVM key works for both Hyperliquid and Lighter. Responses are auto-sanitized (control chars stripped, prompt-injection patterns blocked).

Do I need API keys to use the MCP server?

No — market-data tools (get_markets, get_orderbook, get_funding_rates, get_prices, arb_scan, health_check) work without any keys. Add exchange keys via environment variables only when you want account data and live trading.

How do I run the MCP server?

Add the mcpServers config block with command `npx` and args `["-y", "-p", "perp-cli", "perp-mcp"]` to your MCP client (Claude Desktop, Cursor, etc.). A global `npm install -g perp-cli` also works.

Which exchanges are supported?

Pacifica (Solana), Hyperliquid (HyperEVM), Lighter (Ethereum), and Aster (BNB Chain). The same EVM key works for both Hyperliquid and Lighter.

View repo Full perp-cli page