Batchwatch Mcp

io.github.batchwatch由 GitHub 帳號 batchwatch 發布v0.1.1更新於 Oct 25, 2026

Ask batchwatch whether to batch a job and get the real measured queue evidence, not a guess.

已驗證STDIO僅桌面開發者工具資料與分析

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理在決定是否批次處理工作前,向 batchwatch 查詢實測的 LLM 批次佇列等待證據。

可以做什麼
依模型與自訂的最長等待時間,詢問工作是否應進入批次佇列,並取得判定、信心程度與資料新鮮度。以分布而非單一預估完成時間的形式,估算工作可能的等待時間。比較目前佇列狀況與近期常態。取得完整的實測等待分布,並查看哪些供應商與模型組合有資料。讀取公開的佇列流動讀數,沒有金鑰時該資料會延遲。
適用情境
當助理即將在 LLM 供應商的非同步批次佇列與同步呼叫之間做選擇,且希望依實測佇列證據而非習慣或猜測來決定時使用。
執行需求
以 npm 套件形式透過 stdio 在本機執行,需要 Node.js 18 或更新版本。選用環境變數:BATCHWATCH_URL 指定 API 位址,BATCHWATCH_TOKEN 提供 API 金鑰,BATCHWATCH_TIMEOUT_MS 設定單次呼叫逾時。需要能連線至 batchwatch API 的網路。
安裝前請注意
未設定 BATCHWATCH_TOKEN 時資料延遲 15 分鐘;更新的即時資料需要該金鑰對應的付費方案。伺服器是唯讀代理,不做任何決策,API 失敗或逾時時回傳錯誤而非數字。查詢內容與金鑰會傳送至 batchwatch API。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

batchwatch MCP server

Let an AI agent ask batchwatch "should I batch this job?" instead of guessing.

When a developer asks Claude, Cursor, Cline or any MCP-speaking agent "should I send this to the batch queue or run it synchronously?", this server lets the agent call batchwatch and get the real queue evidence — the measured wait distribution, the current conditions, a graded confidence, and how fresh the data is.

It wraps batchwatch's existing read routes as MCP tools. It is a thin, faithful proxy: it makes no decision and invents no numbers. Every answer is the provider's own JSON, passed through verbatim, carrying the n, confidence, why, basis and freshness the API already returns. If the API is down or slow, the tool returns an error — never a fabricated figure.

Access & tiers — the same gate as the rest of batchwatch

Because it is a faithful proxy, the server runs on the same tiers as the batchwatch API — there is no separate MCP plan and no MCP fast lane. Each tool carries your BATCHWATCH_TOKEN and earns exactly the tier that key earns anywhere else:

  • No token → you read the public data, delayed 15 minutes. You still get every answer — the distribution, the conditions, the verdict — as fresh as the open API serves them.
  • A token → the agent earns that key's tier and its freshness, volume and live behaviour. Live figures are what let an agent route real traffic on the answer, and they are bought here the same way they are bought at the API.

One access model, gated in one place — the batchwatch tier system (see the Tiers, delay, quota and the free trial reference in the batchwatch API docs).

Tools

Each tool maps to a real route in src/index.js (there is deliberately no tradeoff tool — /v1/tradeoff is named in the KRAVSPEC but not built yet, and a tool for a route that does not answer would be exactly the fabricated capability this project refuses to ship).

ToolRouteWhat it answers
should_i_batchGET /v1/should-i-batchGiven a model and your own max_wait, does the batch queue currently honour it? The verdict.
estimate_batchtimeGET /v1/estimate-batchtimeHow long is my job likely to wait? A distribution, never a single ETA.
conditionsGET /v1/conditionsCurrent conditions vs the recent norm — "is it me or them?"
distributionGET /v1/distributionThe full measured wait distribution (the raw evidence).
coverageGET /v1/coverageWhich provider+model combos have data, and how answerable each is.
waitGET /v1/waitThe public "is the queue moving now?" reading (delayed without a key).

batchwatch reports distributions and current conditions, not point ETAs. A personal history of 3-minute medians once produced a 480-minute job; "your job finishes at 14:32" is a lie the one time it matters. The tools' descriptions say so, so the calling model uses the answer correctly.

Install & run

bash
cd mcpnpm installnode index.js       # speaks MCP over stdio

Requires Node ≥ 18 (uses the built-in fetch).

Configuration (environment)

VarDefaultMeaning
BATCHWATCH_URLhttps://batchwatch.devAPI base.
BATCHWATCH_TOKEN(unset)Optional API key. Without it the data is delayed, not absent — you still get answers, just older ones.
BATCHWATCH_TIMEOUT_MS8000Per-call timeout. On timeout the tool errors; it never guesses.

Wiring into a client

Claude Desktop / Cursor / Cline mcpServers entry:

json
{  "mcpServers": {    "batchwatch": {      "command": "node",      "args": ["/absolute/path/to/batchwatch/mcp/index.js"],      "env": { "BATCHWATCH_TOKEN": "tk_your_key_optional" }    }  }}

Tests

bash
npm test                      # offline unit tests (mocked fetch) — deterministicBATCHWATCH_LIVE=1 npm test    # also runs the live smoke against BATCHWATCH_URL

The unit tests assert the load-bearing properties: omitted numeric fields are never sent as 0; the provider JSON is passed through unchanged; only the real routes are exposed (no tradeoff); and an API error yields an error, never a number.

Publishing (registry reach — the point of #57)

The highest-leverage distribution channel for a 2026 dev tool is being the answer an agent reaches for by default. Once this is published so agents can install it, batchwatch wins the call instead of merely being mentioned. Targets: the Anthropic MCP registry, Smithery, and mcp.so. The package is publish-ready (bin: batchwatch-mcp, zero build step); registry submission is tracked on Vikunja task #57.

Why this exists

batchwatch measures how long jobs actually wait in LLM providers' async batch queues. Batch is half price, but "done within 24 hours" cannot be planned around, so most callers pay full price out of habit. This server puts the queue evidence one tool-call away from the agent that is about to make that choice.

來源:mcp/README.md,提交 41f69c2

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。