MCP Directory

perp-cli

Multi-DEX perpetual futures MCP server for Pacifica, Hyperliquid, Lighter & Aster — market data, trading, and funding-rate arbitrage.

Unverified
stdio (local)
API key
TypeScript

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
npm install -g perp-cli

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "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"
      }
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

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

About perp-cli

perp-cli ships an MCP server (perp-mcp) that gives AI agents unified access to four perpetual-futures DEXes — Pacifica, Hyperliquid, Lighter, and Aster. It surfaces read-only market data (prices, orderbooks, funding rates, arbitrage scans, adapter health) without any credentials, and adds account and trading capabilities (balances, positions, portfolio, trade preview/execute/close, PnL and funding analysis, arb comparison) once exchange keys are provided via environment variables. The server exposes 18 tools, 3 resources, and 2 prompts, and is designed for agent use with structured JSON output, pre-trade validation, and response sanitization.

Tools & capabilities (15)

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).

portfolio

Cross-exchange unified overview of balances, positions, and risk (requires keys).

trade_preview

Preview / validate a trade before submitting (requires keys).

trade_execute

Execute a trade order (requires keys).

trade_close

Close an open position (requires keys).

get_funding_analysis

Analyze personal funding payments (requires keys).

get_pnl_analysis

Analyze realized + unrealized PnL and funding (requires keys).

get_arb_compare

Compare arbitrage opportunities with account context (requires keys).

What this server can do

perp-cli provides tools for these capabilities — tap one to see every MCP server that does the same:

When to use it

  • Let an AI agent monitor prices, orderbooks, and funding rates across Pacifica, Hyperliquid, Lighter, and Aster with no setup
  • Scan for and compare perp-perp and spot-perp funding-rate arbitrage opportunities
  • Get a unified cross-exchange portfolio view (balances, positions, risk) in a single call
  • Preview and execute perpetual futures trades through an MCP client once keys are configured
  • Analyze PnL and personal funding payments across multiple DEXes

Security notes

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 FAQ

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.

What does the MCP server expose?

18 tools, 3 resources (market://prices, market://funding-rates, perp://schema), and 2 prompts (trading-guide, arb-strategy).

Alternatives to perp-cli

Compare all alternatives →

Official Stripe server for payments, customers, subscriptions, invoices, and billing via natural language.

Featured
Verified
stdio (local)
API key
TypeScript
12 tools
Updated 1 month agoRepo

Coinbase's AgentKit MCP extension for onchain actions: transfers, swaps, and contract calls.

Verified
stdio (local)
API key
TypeScript
9 tools
Updated 1 month agoRepo

Alpaca's official trading server for stocks, ETFs, options, and crypto in plain English.

Verified
stdio (local)
API key
Python
12 tools
Updated 1 month agoRepo