Skip to main content
Glama
leverra-mcp

leverra-mcp

Official
by leverra-labs
README.md
# leverra-mcp

An MCP server for perps traders and prop firms. It gives an AI assistant three groups of tools:

- **Live markets:** markets and funding across Hyperliquid, dYdX and Aster.
- **Accounts:** any Hyperliquid account's positions and track record.
- **Challenge math, offline:** prop challenge checks, day-by-day replays, liquidation price and position sizing.

It is read-only, needs no API keys and has no config.

It runs on the same adapters and rule code as the [Leverra terminal](https://dapp.leverra.app) and its Ask AI copilot. [Leverra](https://leverra.app) is a permissionless on-chain prop firm for perps, with open partner capital pools. Leverra never holds the capital or guarantees payouts.

## Tools

| Tool | Source | What it answers |
|---|---|---|
| `markets` | Hyperliquid, dYdX, Aster | "Where is BTC cheapest to hold long right now?" Mark, 24h change, hourly and yearly funding, OI and volume per venue, plus the spread |
| `funding_spreads` | same | Coins listed on 2+ venues, ranked by the funding gap; thin venues filtered out |
| `hyperliquid_account` | Hyperliquid `/info` | Any address's positions, liquidation prices, margin and open orders |
| `track_record` | Hyperliquid `/info` | PnL, max drawdown, volume, win rate and fees for a day, week, month or all time |
| `check_challenge` | offline | Passed, failed or on-track, plus the dollars left on each rule |
| `replay_challenge` | offline | The day a challenge would have passed or failed, intraday lows included |
| `liquidation_price` | offline | Hyperliquid's isolated-margin formula |
| `position_size` | offline | Size so that hitting the stop loses exactly X% |

Funding is normalised to an hourly rate. Aster's 8-hour (or per-symbol) rate is divided by its interval, and yearly is hourly × 24 × 365. When a venue fails, the result lists it under `failed` and the tool never makes up a number.

## Setup

Claude Code:

```sh
claude mcp add leverra -- npx -y github:leverra-labs/leverra-mcp#v0.1.0
```

Claude Desktop, Cursor or any MCP client (`mcpServers`):

```json
{
  "leverra": { "command": "npx", "args": ["-y", "github:leverra-labs/leverra-mcp#v0.1.0"] }
}
```

Node 20 or later.

## Real output (2026-12-02)

`markets` with `{ "coin": "BTC" }`:

```text
BTC at 2026-12-02T07:34:35.394Z: hyperliquid 59784.5 (funding 0.0013%/h), dydx 59734.08651 (funding 0.0019%/h),
aster 59781.33304348 (funding 0.0009%/h). Spread: long aster, short dydx, 0.0010%/h (8.95%/yr) before fees.
```

`funding_spreads` with `{ "limit": 3 }`:

```text
Widest funding spreads at 2026-12-02T07:34:35.407Z: TRUMP long hyperliquid / short aster 0.0080%/h;
WLFI long hyperliquid / short aster 0.0078%/h; HYPE long aster / short hyperliquid 0.0018%/h. Before fees.
```

`check_challenge` with `{ "rules": { "preset": 0 }, "equity": 106200, "day_start": 107300, "peak": 107300, "days": 6 }`:

```text
on-track: Inside every limit. To target $1,800, left today $3,900, above floor $16,200 (floor $90,000).
```

Each result also carries the full JSON (`structuredContent`) so an agent can work with exact numbers.

A funding spread is not free money. Funding resets every hour, and fees, slippage, price moves between venues and liquidation risk all count against it.

## Status

| | |
|---|---|
| Markets, funding, account, track record, challenge math | Live |
| Partner pool and settlement reads (on-chain) | In progress, once the pool contracts are deployed |

## Development

```sh
pnpm install
pnpm test        # every tool against recorded venue shapes, in-memory MCP client
pnpm test:live   # the real sources
pnpm typecheck
pnpm build && node dist/index.js   # stdio
```

Apache-2.0. Security reports: see [SECURITY.md](SECURITY.md).

TDQS

A3.9/5.0

Scored across 8 tools

Disambiguation4/5

Each tool has a clearly stated lane: cross-venue funding comparison, market snapshots, two prop-rule evaluators, two offline calculators, and two Hyperliquid account readers. The only mild overlap is that markets with a coin also returns a funding spread, which partially duplicates funding_spreads, and check_challenge vs replay_challenge sit close together (live account vs historical walk-forward), though their descriptions make the distinction clear.

Naming Consistency4/5

All names are lowercase snake_case with consistent noun-phrase style, so the set reads predictably. The only deviation is that some names are noun-only (markets, liquidation_price, track_record, hyperliquid_account) while two use verb_noun (check_challenge, replay_challenge), a minor inconsistency rather than a confusing one.

Tool Count5/5

Eight tools is well within the sweet spot and each one maps to a distinct workflow: research (funding_spreads, markets), prop-firm evaluation (check_challenge, replay_challenge), risk math (liquidation_price, position_size) and account due diligence (hyperliquid_account, track_record). No tool looks redundant or bolted on.

Completeness3/5

The market-data and risk-math side is solid, but account/position data is Hyperliquid-only even though markets and funding cover dYdX and Aster, so an agent working those venues hits a dead end. There is also no way to discover supported prop firms or their rule sets, and no historical funding or candle data, leaving notable gaps around the stated multi-venue scope.

Maintenance

ActivityNo data
ResponsivenessOutdated data