npm.io
0.1.0 • Published 4d agoCLI

nocktrade-mcp

Licence
MIT
Version
0.1.0
Deps
2
Size
740 kB
Vulns
0
Weekly
0

@nock/mcp

Read-only MCP server for Lighter, by NockTrade. Point Claude (or any MCP client) at it and ask about markets, order books, candles, funding, and any Lighter account.

What it can and cannot do

It has no keys and no write path. Every endpoint it touches is public, so an agent can research and read — it cannot place an order, cancel one, or move funds. That is a property of the code, not a policy: there is nothing here to sign with.

estimate_order_cost prices a hypothetical order (margin, fees, liquidation) and places nothing.

Tools

Tool What it answers
list_markets What can I trade? Sorted by volume, filterable by symbol.
get_market Mark/index price, 24h range, open interest, leverage cap, tick size, minimum order.
get_orderbook Depth, mid, spread in bps.
get_candles OHLCV on 1m–1d.
get_account Collateral, positions with live PnL and return on margin, balances.
get_funding Funding history, hourly or daily.
estimate_order_cost Full cost of a hypothetical order before anyone commits.

Run it

pnpm --filter @nock/mcp build
node packages/mcp/dist/index.js   # speaks MCP over stdio

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "nocktrade": {
      "command": "node",
      "args": ["/absolute/path/to/packages/mcp/dist/index.js"]
    }
  }
}

Point it at another Lighter deployment with NEXT_PUBLIC_LIGHTER_API.

If trading tools are ever added

Not in this server. A trading server must run on the user's own machine with a key they generated themselves, and needs hard limits an agent cannot talk its way past: per-order and daily notional caps, a market allowlist, reduce-only by default, and explicit human confirmation per order. Orders must never originate from text a tool happened to read — only from the user.

Keywords