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.
概览
只读的 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 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Plumbline: DeepBook Market Data,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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
The server runs over stdio and needs Node.js 18.17 or later. It needs no configuration.
Claude Code
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):
Smithery
You can also open the Smithery listing. For one-click Claude Desktop install, download the .mcpb bundle there.
Streamable HTTP (self-hosted)
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
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"}:
One depth band from get_order_book (an earlier snapshot the same day):
get_pool_params with {"pool":"SUI_USDC"} (read live from the on-chain Pool object; trimmed):
get_ohlcv with {"pool":"SUI_USDC","interval":"1h","limit":2}:
Configuration (all optional)
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
Development
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_poolsparameters come from indexer metadata.get_pool_paramsreads 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- v0.2.0最新Oct 9, 2026


