Server data from the Official MCP Registry
Read Lighter perpetual markets and place guarded orders, including the H100 compute-price market.
About
Read Lighter perpetual markets and place guarded orders, including the H100 compute-price market.
Security Report
This MCP server for the Lighter perpetuals exchange has solid security fundamentals with proper authentication, input validation, and a well-designed notional cap system to limit order sizes. The codebase demonstrates good credential handling practices and appropriate permission scoping for its purpose. Minor code quality observations around error handling and logging do not materially impact security. Supply chain analysis found 3 known vulnerabilities in dependencies (2 critical, 1 high severity). Package verification found 1 issue (1 critical, 0 high severity).
5 files analyzed · 8 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
Unverified package source
We couldn't verify that the installable package matches the reviewed source code. Proceed with caution.
What You'll Need
Set these up before or after installing:
Environment variable: LIGHTER_NETWORK
Environment variable: LIGHTER_ACCOUNT_INDEX
Environment variable: LIGHTER_API_KEY_INDEX
Environment variable: LIGHTER_API_KEY_PRIVATE_KEY
Environment variable: LIGHTER_MAX_NOTIONAL_USD
Environment variable: LIGHTER_CHAIN_ID
Environment variable: LIGHTER_READ_ONLY_TOKEN
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-winter0x-lighter-mcp": {
"env": {
"LIGHTER_NETWORK": "your-lighter-network-here",
"LIGHTER_CHAIN_ID": "your-lighter-chain-id-here",
"LIGHTER_ACCOUNT_INDEX": "your-lighter-account-index-here",
"LIGHTER_API_KEY_INDEX": "your-lighter-api-key-index-here",
"LIGHTER_READ_ONLY_TOKEN": "your-lighter-read-only-token-here",
"LIGHTER_MAX_NOTIONAL_USD": "your-lighter-max-notional-usd-here",
"LIGHTER_API_KEY_PRIVATE_KEY": "your-lighter-api-key-private-key-here"
},
"args": [
"-y",
"lighter-mcp"
],
"command": "npx"
}
}
}Documentation
View on GitHubFrom the project's GitHub README.
lighter-agent
A TypeScript client and an MCP server for Lighter, the zero-knowledge perpetuals exchange, written for agents that read markets and place bounded orders.
Built by Prism. Not affiliated with, endorsed by, or operated by Lighter or elliottech.
Install
npm install lighter-agent-sdk
The MCP server runs straight from npm:
npx -y lighter-mcp
Node 20 or newer. Reading markets needs no credentials.
Hedge an H100 bill
Lighter lists market 182, H100, a perpetual on the rental cost of an NVIDIA H100. A GPU renter
who is short that market gains when compute gets more expensive, which offsets the larger bill.
import { LighterRestClient, h100Snapshot, hedgeH100 } from 'lighter-agent-sdk';
const rest = new LighterRestClient({ network: 'mainnet' });
const h100 = await h100Snapshot(rest);
console.log(h100.markPrice, 'per GPU hour, funding paid by', h100.funding.paidBy);
const plan = await hedgeH100(rest, {
gpuHours: 500,
side: 'short',
maxNotionalUsd: 2_000,
});
console.log(plan.hedgedGpuHours, 'hours covered, worst case', plan.worstCaseNotionalUsd, 'USD');
hedgeH100 sizes the position from GPU hours and prices it against the live book. Anything above
maxNotionalUsd is refused, and dryRun defaults to true, so a mistyped call returns a plan and
not a position.
Run it: node examples/hedge-h100.mjs 500.
Use it from an MCP client
{
"mcpServers": {
"lighter": {
"command": "npx",
"args": ["-y", "lighter-mcp"],
"env": {
"LIGHTER_NETWORK": "mainnet"
}
}
}
}
That configuration is read-only. To let the agent trade, add LIGHTER_ACCOUNT_INDEX,
LIGHTER_API_KEY_INDEX, LIGHTER_API_KEY_PRIVATE_KEY, and LIGHTER_MAX_NOTIONAL_USD. The last
one is a per-order ceiling with no default, so orders stay refused until you choose a number.
Nine tools:
| Tool | What it does |
|---|---|
lighter_markets | List or search every market Lighter publishes details for |
lighter_market | Mark, index, funding, and top of book for one market |
lighter_h100 | Compute price, funding, and depth for market 182 |
lighter_funding | Funding rates, with the period stated on every number |
lighter_account | Collateral, positions, and resting orders |
lighter_place_order | One limit or market order under a required notional cap |
lighter_cancel | Cancel one resting order |
lighter_cancel_all | Cancel every resting order on the sub-account |
lighter_hedge_h100 | Size an H100 hedge. Dry run unless execute is true |
There is no transfer tool and no change-pubkey tool. Neither the SDK nor the server exposes a path to move balance off the account.
Why this exists
Lighter has no official TypeScript SDK and no registered MCP server, so an agent that wants to trade there starts by reimplementing Schnorr signatures over ECgFp5 and the transaction encoding behind them. It also lists an H100 perpetual, which makes the price of GPU time a tradable instrument rather than a quote in a rental agreement. Prism rents H100s, so hedging that price was the first thing we wanted an agent to do without a human in the loop.
Limitations
- The H100 book is thin. Measured on 2026-08-26, it traded about $7,100 over 24 hours, held open interest near $10,000, and showed 4.00 of size at the top of book on each side, with a minimum order of 2.00. Treat it as an early instrument and size to the book.
- A Lighter API key is full write authority over the account it is bound to, with no spend cap of its own. Run the agent on a dedicated sub-account funded with only what it may lose.
- Lighter's WebSocket stream is blocked from some hosts, Render among them. REST polling is a first-class path in the SDK for that reason.
- The Standard rate tier allows 60 requests per minute. The MCP server caches the market list for 30 seconds so repeat lookups do not spend that budget.
Packages
| Package | Description |
|---|---|
lighter-agent-sdk | REST and WebSocket client, units, signer, H100 hedge |
lighter-mcp | MCP stdio server, nine tools |
Development
npm install
npm run build
npm test
node scripts/live-check.mjs # read-only, hits mainnet
Tests run against fixtures and never open a socket. The live check is the only script that talks to the exchange.
License
Apache-2.0. See LICENSE and NOTICE. The signer is the official WebAssembly build from elliottech/lighter-go, vendored unmodified with its provenance recorded in vendor/wasm/PROVENANCE.md.
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Fetch
Freeby Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
Git
Freeby Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
mcp-creator-python
Freeby mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
MarkItDown
Freeby Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
