Plumbline: DeepBook Market Data

io.github.SajanMelcherv0.2.0更新於 Oct 9, 2026

Read-only Sui DeepBook v3 market data: pools, mid, depth, volume, fees, trades, OHLCV. No keys.

已驗證STDIO僅桌面Data & AnalyticsFinance

概覽

AI 產生的概覽

唯讀的 Sui DeepBook v3 市場資料伺服器,為 AI 助理提供資金池、中間價與價差、訂單簿深度、成交量、費率、成交紀錄和 OHLCV K 線。

功能
Plumbline 透過 list_pools、get_mid_price、get_order_book、get_volume、get_pool_params、get_recent_trades、get_ohlcv 和 get_indexer_status 等工具提供 DeepBook v3 市場資料。回傳精簡的 JSON,序列資料以欄/列陣列表示,並有短時間快取。另外附帶提示詞(market_snapshot、compare_pools、liquidity_check)與資源(plumbline://guide、plumbline://disclaimer)。
適用情境
當助理需要回答 Sui DeepBook 流動性與價格相關問題時適用,例如目前價差、距中間價一定百分比內的深度、近期成交、資金池費率或 OHLCV K 線。適合唯讀的市場分析,而非交易。
執行需求
需要 Node.js 18.17 或更新版本,透過 npx plumbline-mcp 以 stdio 方式執行。不需要 API 金鑰或錢包。選用環境變數:PLUMBLINE_INDEXER_URL、PLUMBLINE_TIMEOUT_MS;自架 HTTP 模式下還有 PLUMBLINE_GRAPHQL_URL、PORT 和 HOST。需要連線至公開的 DeepBook 索引器與 Sui GraphQL 的網路。
安裝前請注意
唯讀:所有工具都標註 readOnlyHint 為 true,不涉及金鑰、簽章或交易。資料來自公開第三方來源,可能延遲、不完整或有誤,依原樣提供,不構成財務建議。每側超過約 100 檔的深度區間會標記為 truncated,其數值為下限。自架 HTTP 營運方可透過 PLUMBLINE_PAYMENTS 選擇啟用按次計費,預設關閉。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Plumbline: DeepBook Market Data,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Plumbline: read-only DeepBook v3 market data for AI agents

[npm] [Smithery] [MCP] [License: MIT]

Plumbline is a free, read-only Model Context Protocol server for Sui DeepBook v3 market data. It gives agents pools, mid price and spread, order book depth, volume, live on-chain fees, recent trades and OHLCV candles.

  • No API keys, no wallet, no signing, no trading. Every tool is annotated readOnlyHint: true.
  • Small outputs. Compact JSON with column/row arrays for series and sensible rounding.
  • Fast and polite. An in-memory TTL cache (2 s for books, up to 10 min for metadata), de-duplicated requests and 8 s timeouts.

Disclaimer: for education and information only. This is not financial, investment, legal or tax advice. Data comes from public third-party sources (the Mysten Labs DeepBook indexer and Sui GraphQL). It may be delayed, incomplete or wrong, and is provided "as is" without warranty. Nothing here recommends buying, selling or holding any asset.

Quickstart

bash
npx -y plumbline-mcp

The server runs over stdio and needs Node.js 18.17 or later. It needs no configuration.

Claude Code

bash
claude mcp add plumbline -- npx -y plumbline-mcp

Claude Desktop, Cursor, Windsurf, VS Code or any stdio client

Add this to your client's MCP config (claude_desktop_config.json, ~/.cursor/mcp.json, and so on):

json
{  "mcpServers": {    "plumbline": {      "command": "npx",      "args": ["-y", "plumbline-mcp"]    }  }}

[Add to Cursor]

Smithery

bash
npx -y @smithery/cli@latest mcp add nazarenechalice/plumbline --client claude   # or cursor, claude-code, vscode, windsurf, ...

You can also open the Smithery listing. For one-click Claude Desktop install, download the .mcpb bundle there.

Streamable HTTP (self-hosted)

bash
npx -y plumbline-mcp --http --port 8081        # POST http://127.0.0.1:8081/mcp, GET /healthHOST=0.0.0.0 PORT=8081 npx -y plumbline-mcp --http

HTTP mode is stateless and returns JSON. It also serves a static server card at /.well-known/mcp/server-card.json and rate-limits each client to 120 requests per minute. Put it behind TLS before you expose it. Hosting notes are in deploy/DEPLOY.md.

Ask your agent

  • "What's the spread on DeepBook SUI_USDC right now?"
  • "How much liquidity is within 1% of mid on SUI_USDC?"
  • "Show 1h candles for DEEP_USDC for the last day."
  • "Which DeepBook pools had the most volume in the last 24 hours?"
  • "What are the current taker and maker fees on SUI_USDC?"

The server also ships prompts (market_snapshot, compare_pools, liquidity_check) and resources (plumbline://guide, plumbline://disclaimer).

Tools

ToolWhat it returnsKey inputs
list_poolsAll DeepBook pools: base/quote, tick, lot, min size, active flagasset? (e.g. SUI), include_ids?
get_mid_priceBest bid/ask, mid, spread (abs and bps), last pricepool
get_order_bookTop N levels per side, plus base qty and quote notional within ±X% of midpool, levels (1-100), within_pct (e.g. [0.5,1,2])
get_volume24h base/quote volume, high/low, % change, VWAP; or top pools by volume; or a custom trailing windowpool?, window_hours (1-720), top
get_pool_paramsTaker/maker fee (pct and bps), DEEP stake required, tick/lot/min, whitelist/stable flags, vault balances (live on-chain)pool
get_recent_tradesLatest fills: time, taker side, price, base and quote qty, buy/sell statspool, limit (1-200), start_time?, end_time? (unix seconds), include_tx?
get_ohlcvCandles, oldest first; volume in the base assetpool, interval (1m,5m,15m,30m,1h,4h,1d,1w), limit (1-500), start_time?, end_time?
get_indexer_statusData-source health and freshnessnone

Pool names use BASE_QUOTE (for example SUI_USDC). Input is case-insensitive, and sui/usdc or SUI-USDC also work. An unknown pool returns a clear error with suggestions; USDC_SUI, for example, suggests SUI_USDC.

Example output (live, Oct 9 2026)

get_mid_price with {"pool":"SUI_USDC"}:

json
{"pool":"SUI_USDC","quote":"USDC","best_bid":1.0708,"best_ask":1.07106,"mid":1.07093,"spread":0.00026,"spread_bps":2.428,"last_price":1.0708,"as_of":"2026-10-09T08:38:03.997Z"}

One depth band from get_order_book (an earlier snapshot the same day):

json
{"pct":1,"bid_base":204536.4,"bid_quote":216152.61,"ask_base":105721.5,"ask_quote":113063.72,"bid_levels":26,"ask_levels":27}

get_pool_params with {"pool":"SUI_USDC"} (read live from the on-chain Pool object; trimmed):

json
{"pool":"SUI_USDC","source":"sui-onchain","taker_fee":{"pct":0.02,"bps":2},"maker_fee":{"pct":0,"bps":0},"stake_required_deep":100000,"tick":0.00001,"lot":0.1,"min_size":1}

get_ohlcv with {"pool":"SUI_USDC","interval":"1h","limit":2}:

json
{"pool":"SUI_USDC","interval":"1h","count":2,"cols":["open_time","open","high","low","close","volume_SUI"],"candles":[["2026-10-09T07:00:00Z",1.0658,1.07579,1.06268,1.07543,66001],["2026-10-09T08:00:00Z",1.07529,1.07817,1.06721,1.0708,26347.5]]}

Configuration (all optional)

Env varDefault
PLUMBLINE_INDEXER_URLhttps://deepbook-indexer.mainnet.mystenlabs.com
PLUMBLINE_GRAPHQL_URLhttps://graphql.mainnet.sui.io/graphql
PLUMBLINE_TIMEOUT_MS8000
PORT / HOST (HTTP mode)8081 / 127.0.0.1

How it compares

Plumbline only reads data. Trading MCPs for DeepBook build transactions and may hold keys. Broad Sui analytics MCPs cover many protocols. Plumbline goes deep on DeepBook market data: depth bands around mid, live on-chain fees, OHLCV and pool-name suggestions. You can give it to any agent without risk to funds.

Data sources: books, trades, volume and candles come from the public DeepBook indexer. Fees and pool parameters come from the live Pool object via Sui GraphQL.

Optional: pay-per-call (off by default)

Plumbline is free, and the stdio package is always free. A self-hosted HTTP operator can choose to meter calls, for example 100 free calls per day and then 0.002 USDC per call, paid in USDC on Sui. Metering is disabled unless PLUMBLINE_PAYMENTS=1 is set. The server is receive-only and never holds keys. The full design and security model are in docs/PAYMENTS.md.

Build from source

bash
git clone https://github.com/SajanMelcher/plumbline-mcp.gitcd plumbline-mcpnpm install && npm run buildnode dist/index.js            # stdio; add --http for HTTP

Development

bash
npm test            # live tests against the public indexer (SUI_USDC); needs networknpm run smoke       # spawns the server over stdio and calls every tool via the MCP clientnpm run smoke:http  # same over streamable HTTPnpm run inspector   # MCP Inspector UInpm run payments:testnet  # Sui testnet end-to-end with a throwaway payer (needs testnet SUI + USDC)npm run pack:mcpb   # MCPB bundle at build/plumbline.mcpb, validated with mcpb + a Smithery payload check (publishes nothing)

Notes and limits

  • The public indexer serves at most about 100 price levels per side. When a depth band reaches past that, the response marks it truncated: true, and the value is a lower bound.
  • list_pools parameters come from indexer metadata. get_pool_params reads the live on-chain Pool object, so it is authoritative when tick sizes or fees change through governance.
  • Fees are DeepBook fixed-point values (1e9 scale), converted to pct and bps.
  • No margin, balance-manager or wallet-specific endpoints are exposed.

Independence and name

Plumbline is named after a plumb line, the weighted cord used to measure depth and true vertical. Other candidates were Sounding and Tidemark. Plumbline is an independent community project. It is not affiliated with Mysten Labs, the Sui Foundation or DeepBook.

License

MIT. See LICENSE.

來源:README.md,提交 9822319

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.2.0最新Oct 9, 2026