AIエージェントがリアルタイムのキュー待ち分布と状況を照会し、LLMジョブを同期的に実行するか、バッチキュー経由で実行するかを判断できるようにします。
別名 batchwatch/client
- スター
- 0
- ツール
- 6
- ダウンロード数(30日間)
- —
- 最新バージョン
- 0.1.1
- 最終コミット
- 2026年8月31日
- ライセンス
- —
batchwatch MCPとは
batchwatchはMCPサーバーです。 AIエージェントがリアルタイムのキュー待ち分布と状況を照会し、LLMジョブを同期的に実行するか、バッチキュー経由で実行するかを判断できるようにします。. 6個のツールを提供しており、should_i_batch, estimate_batchtime, conditionsなどがあります。
プロジェクトのREADMEから生成された概要
batchwatch MCP server について
batchwatch-mcpは、Claude、Cursor、ClineなどのAIエージェントを使用する開発者が、LLMジョブを同期的に実行するか、バッチキュー経由で実行するかを判断できるようにします。推測する代わりに、エージェントはリアルタイムのキュー待ち分布と現在の状況を照会し、情報に基づいたルーティングの決定を行うことができます。このサーバーは、信頼できるプロキシとして機能し、信頼度、根拠、鮮度などのメトリクスを含むbatchwatch APIからの生のJSONデータを、数値を捏造したりETAを偽造したりすることなく透過的に渡します。
ユーザーは、stdioを介してサーバーをMCP対応クライアントに接続します。ライブデータを使用するにはBATCHWATCH_TOKENが必要ですが、トークンが提供されない場合でも、15分遅延した公開データを利用できます。サーバーには、キューが最大待ち時間を遵守しているかを確認するshould_i_batch、待ち分布を表示するestimate_batchtime、現在の状態を最近の標準と比較するconditionsなどの特定のツールが含まれています。API通信の管理には、BATCHWATCH_URLとBATCHWATCH_TIMEOUT_MSの設定を使用します。
できること
- 1最適なジョブルーティングの決定特定のモデルジョブをバッチキューに送るべきか、同期的に実行すべきかをエージェントに判断させます。
- 2潜在的な待ち時間の推定特定のジョブがキュー内で待機する可能性が高い時間の分布をリクエストします。
- 3キューの健全性モニタリング現在のキューの状況が最近の標準から逸脱していないかを確認します。
- 4プロバイダーの可用性の確認現在、どのプロバイダーとモデルの組み合わせで利用可能なデータがあるかを特定します。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
batchwatch MCPのインストール方法
フォーマット検証日 2026年11月10日Cursor に追加Gooseに追加Claude Codeにbatchwatch MCPをインストール
$ claude mcp add batchwatch-mcp -- npx -y batchwatch-mcpCursorにbatchwatch MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"batchwatch-mcp": {
"command": "npx",
"args": [
"-y",
"batchwatch-mcp"
]
}
}
}VS Codeにbatchwatch MCPをインストール
.vscode/mcp.json
{
"servers": {
"batchwatch-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"batchwatch-mcp"
]
}
}
}VS Code CLIにbatchwatch MCPをインストール
$ code --add-mcp '{"name":"batchwatch-mcp","type":"stdio","command":"npx","args":["-y","batchwatch-mcp"]}'Claude Desktopにbatchwatch MCPをインストール
claude_desktop_config.json
{
"mcpServers": {
"batchwatch-mcp": {
"command": "npx",
"args": [
"-y",
"batchwatch-mcp"
]
}
}
}Codexにbatchwatch MCPをインストール
$ codex mcp add batchwatch-mcp -- npx -y batchwatch-mcpCodex config.tomlにbatchwatch MCPをインストール
~/.codex/config.toml
[mcp_servers.batchwatch-mcp] command = "npx" args = ["-y", "batchwatch-mcp"]
Gemini CLIにbatchwatch MCPをインストール
$ gemini mcp add -s user batchwatch-mcp npx -- -y batchwatch-mcpGemini settings.jsonにbatchwatch MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"batchwatch-mcp": {
"command": "npx",
"args": [
"-y",
"batchwatch-mcp"
]
}
}
}batchwatch MCPツール 6
READMEから検出should_i_batchestimate_batchtimeconditionsdistributioncoveragewait
| should_i_batch | — | |
| estimate_batchtime | — | |
| conditions | — | |
| distribution | — | |
| coverage | — | |
| wait | — |
設定
BATCHWATCH_LIVEBATCHWATCH_TOKEN
| 名前 | 説明 | 種類 |
|---|---|---|
| BATCHWATCH_LIVE | — | |
| BATCHWATCH_TOKEN | — |
自動チェック
実行日 2026年11月14日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。コードを読み、サーバーに必要最小限のアクセス権を与えてください。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能batchwatch/client is public and reachablegithub.com/batchwatch/client ↗合格
- パッケージがこのリポジトリをソースとして指定batchwatch-mcp names batchwatch/client as sourcenpmjs.com/package/batchwatch-mcp ↗合格
- ビルドの来歴 (Sigstore 証明)No build attestation published for this release未チェック
- オープンソースライセンス (OSI)No license検出事項
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-08-31github.com/batchwatch/client ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していないNo popular package one edit away from batchwatch-mcp合格
- パッケージおよびその依存関係に重大な勧告なし99 resolved dependencies checked; no critical advisoryosv.dev ↗合格
- モデルへの隠れた指示がない6 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされているNo tool named like delete, drop or exec合格
- リモートエンドポイントが MCP ハンドシェイクに応答未チェック
README
GitHubで見る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
livebehaviour. 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).
| Tool | Route | What it answers |
|---|---|---|
should_i_batch |
GET /v1/should-i-batch |
Given a model and your own max_wait, does the batch queue currently honour it? The verdict. |
estimate_batchtime |
GET /v1/estimate-batchtime |
How long is my job likely to wait? A distribution, never a single ETA. |
conditions |
GET /v1/conditions |
Current conditions vs the recent norm — "is it me or them?" |
distribution |
GET /v1/distribution |
The full measured wait distribution (the raw evidence). |
coverage |
GET /v1/coverage |
Which provider+model combos have data, and how answerable each is. |
wait |
GET /v1/wait |
The 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
cd mcp
npm install
node index.js # speaks MCP over stdio
Requires Node ≥ 18 (uses the built-in fetch).
Configuration (environment)
| Var | Default | Meaning |
|---|---|---|
BATCHWATCH_URL |
https://batchwatch.dev |
API base. |
BATCHWATCH_TOKEN |
(unset) | Optional API key. Without it the data is delayed, not absent — you still get answers, just older ones. |
BATCHWATCH_TIMEOUT_MS |
8000 |
Per-call timeout. On timeout the tool errors; it never guesses. |
Wiring into a client
Claude Desktop / Cursor / Cline mcpServers entry:
{
"mcpServers": {
"batchwatch": {
"command": "node",
"args": ["/absolute/path/to/batchwatch/mcp/index.js"],
"env": { "BATCHWATCH_TOKEN": "tk_your_key_optional" }
}
}
}
Tests
npm test # offline unit tests (mocked fetch) — deterministic
BATCHWATCH_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.
batchwatch MCPのよくある質問
batchwatch MCPをClaude Codeに追加するには
ターミナルでclaude mcp add batchwatch-mcp -- npx -y batchwatch-mcpを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
batchwatch MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
batchwatch MCPが提供するツールは
6個のツールを提供しており、should_i_batch, estimate_batchtime, conditions, distribution, coverageなどがあります。
batchwatchを使用するためにAPIキーは必要ですか?
いいえ、公開データを読み取るだけであればトークンなしで使用できます。ただし、データは15分遅延します。
このサーバーはジョブ完了の具体的なETA(到着予定時刻)を提供しますか?
いいえ。正確性を期すため、単一のETAではなく、測定された待ち分布と現在の状況を報告します。
batchwatch APIが利用できない場合はどうなりますか?
ツールは、捏造された数値や推測値を提供するのではなく、エラーを返します。