# 0xDegenMo/lighter-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/0xDegenMo/lighter-mcp  
**GitHub Stars:** 3  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/0xdegenmo-lighter-mcp

## Description
MCP server for Lighter — a zero-fee zk-rollup perpetual DEX. Trade 190 perpetuals (crypto + RWA: PAXG/XAU gold, XAG silver, WTI oil, equity tickers like TSLA/AMZN/ASML) from Claude Desktop, Cursor, Hermes, or any MCP client. Three credential tiers (PUBLIC market data → READ account → TRADE signing), native on-chain stop-loss / take-profit, server-side safety caps (max-quote-USD, slippage, symbol allowlist). pip install 0xdegenmo-lighter-mcp.

## Tools
Capabilities this server exposes over MCP:

- **get_status** — current mode, safety policy, integrator config (no secrets)
- **get_signup_info** — Lighter signup URL + referral code (5% bonus for new users)
- **how_to_approve_integrator** — instructions for opt-in / opt-out
- **get_balance** — collateral / margin-in-use / available / asset_value

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "lighter-mcp": {
    "command": "uvx",
    "args": ["0xdegenmo-lighter-mcp"],
    "env": {
      "LIGHTER_URL": "",
      "LIGHTER_ACCOUNT_INDEX": "",
      "LIGHTER_PRIVATE_KEY": "",
      "LIGHTER_API_KEY_INDEX": "",
      "LIGHTER_READ_ONLY": "",
      "LIGHTER_MAX_QUOTE_USD": "",
      "LIGHTER_MAX_SLIPPAGE": "",
      "LIGHTER_ALLOWED_SYMBOLS": ""
    }
  }
}
```

**Requires environment variables:** `LIGHTER_URL`, `LIGHTER_ACCOUNT_INDEX`, `LIGHTER_PRIVATE_KEY`, `LIGHTER_API_KEY_INDEX`, `LIGHTER_READ_ONLY`, `LIGHTER_MAX_QUOTE_USD`, `LIGHTER_MAX_SLIPPAGE`, `LIGHTER_ALLOWED_SYMBOLS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What 0xDegenMo/lighter-mcp MCP server does

The 0xDegenMo/lighter-mcp MCP server connects MCP clients to Lighter, a zero-fee zk-rollup perpetual DEX on Ethereum. It exposes market discovery and data tools, account queries, and trading operations through the Model Context Protocol. Supported markets are discovered from Lighter’s order-book API rather than being hard-coded to a single asset set, allowing the server to work across the listed perpetual contracts.

The server is organized into three access levels. PUBLIC mode provides market information without credentials. READ mode adds account information after an account index is supplied. TRADE mode adds order and position actions when a private API key is also configured, unless read-only mode is enabled.

## How it works

The 0xDegenMo/lighter-mcp MCP server runs locally as a Python module and communicates with an MCP client such as Claude Desktop, Cursor, Hermes, or a custom MCP application. At startup, it selects a mode from the environment variables that are present. Credentials are not needed for the public tools, while account and trading tools are only registered when their corresponding configuration is available.

Trading requests use Lighter’s API signing model. The README recommends using a sub-account API key rather than a main-wallet signing key. The key signs for that sub-account and is described as unable to withdraw funds or access the main wallet. Market orders can be sized in USDC notional, while limit orders use base-asset quantity and price. Price and size encoding is handled per market.

## Setup and configuration

Install the Python package with `pip install 0xdegenmo-lighter-mcp`. The server can then be started with `python -m lighter_mcp` and added to an MCP client’s configuration. A public setup needs no Lighter account. READ mode requires `LIGHTER_ACCOUNT_INDEX`; trading additionally requires `LIGHTER_PRIVATE_KEY`, and can use `LIGHTER_API_KEY_INDEX` to select the API key.

The main endpoint is configured with `LIGHTER_URL`. Safety settings include `LIGHTER_MAX_QUOTE_USD`, `LIGHTER_MAX_SLIPPAGE`, and `LIGHTER_ALLOWED_SYMBOLS`. `LIGHTER_READ_ONLY=true` prevents trading tools from being registered, and `LIGHTER_NO_INTEGRATOR=true` omits integrator parameters from orders. The README advises keeping private keys out of source control and using a funded sub-account rather than a main wallet.

## Tools and capabilities

The 0xDegenMo/lighter-mcp MCP server includes tools for:

- Listing markets and retrieving a specific market.
- Reading candles, tickers, order books, and funding rates.
- Checking status, signup information, and integrator approval instructions.
- Reading balances and open positions in READ mode.
- Setting leverage and placing market or limit orders in TRADE mode.
- Creating reduce-only stop-loss and take-profit orders.
- Closing positions and canceling one or all orders.

Stop-loss and take-profit orders are placed as on-chain orders and are intended to remain active across client restarts. Integrator approval is optional, can be revoked, and expires after the default period stated in the README.

## Limitations and notes

Trading capability carries direct financial risk. The private key configured for the server can sign transactions for its associated Lighter sub-account, so it should be treated as a secret. The default opening-trade cap is 100 USDC, and market orders have a default 0.5% slippage limit. Reduce-only orders bypass the quote-size cap so positions can be closed or reduced.

The optional integrator fee is not required to install or use the server. It is activated only after an on-chain approval; Lighter Standard Accounts otherwise have the fee conditions described in the README. The supplied material does not state a software license for the repository.

_Full upstream README: https://allmcps.com/mcp/0xdegenmo-lighter-mcp/readme_

