
Monitor
io.github.BetterDB-inc由 GitHub 帳號 BetterDB-inc 發布v0.1.4更新於 Oct 24, 2026
BetterDB MCP server - Valkey observability for Claude Code and other MCP clients
概覽
把 AI 助理接上 BetterDB 監控平台,用來檢視 Valkey 與 Redis 的健康狀態、慢指令、熱鍵、叢集狀況和 AI 快取指標。
- 可以做什麼
- 列出並選取受監控的 Valkey/Redis 執行個體,取得健康摘要、INFO 統計、記憶體診斷和用戶端清單
- 檢視 slowlog 與 COMMANDLOG 記錄、彙總模式、延遲事件歷史、熱鍵和 ACL 稽核日誌
- 檢視叢集節點角色、單一節點統計、跨叢集慢日誌和依槽位指標
- 預測容量與延遲回歸,檢查向量索引健康度和搜尋延遲
- 瀏覽 AI 可觀測性資料:AI 元件執行個體、OpenTelemetry 追蹤,以及追蹤與 Valkey 狀態的關聯
- 管理快取與連線:快取健康與門檻建議、提出/核准/拒絕快取變更、新增或移除連線、啟動或停止監控程序
- 適用情境
- 適合執行 Valkey 或 Redis 的團隊,希望助理在編輯器內診斷效能問題、排查事故,或調整語意快取與代理快取,而不必切換到監控儀表板。
- 執行需求
- 需要 Node.js 20 以上版本,透過 npx 在本機執行。需要一個執行中的 BetterDB 執行個體(雲端或自架)並以 BETTERDB_URL 指定,或使用 --autostart 讓伺服器自行管理執行個體。雲端必須提供 BETTERDB_TOKEN,自架則為選用;BETTERDB_INSTANCE_ID 可預先選取執行個體。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Monitor,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@betterdb/mcp
[npm version] [total downloads] [license: MIT] [types] [GitHub stars]
Give your AI assistant deep visibility into your Valkey and Redis databases. The BetterDB MCP server connects Claude Code, Cursor, Windsurf, and other MCP-compatible clients to the BetterDB monitoring platform — letting your AI query real-time metrics, diagnose slow commands, detect anomalies, and investigate incidents without leaving your editor.
See it live in BetterDB Monitor
BetterDB Monitor gives you live dashboards for the AI workloads running on your Valkey:
- AI Cache & Memory - hit rate, cost saved, evictions, and index size across all your caches and memory stores, with history.
- AI Traces - OpenTelemetry waterfalls for each request, correlated with live Valkey state to explain every cache hit and miss.
[AI Cache & Memory tab in BetterDB Monitor]
[AI Traces waterfall in BetterDB Monitor]
Run it self-hosted (docker run -p 3001:3001 betterdb/monitor), or use BetterDB Cloud - which can also provision a managed, TLS-enabled Valkey instance (Search module included) in one click.
Why BetterDB?
BetterDB is a monitoring and observability platform built for Valkey and Redis providing real-time dashboards, anomaly detection, and operational intelligence for your Valkey and Redis deployments. Unlike tools that only show a live snapshot, BetterDB persists historical metrics, slowlogs, and audit trails — so you can investigate what happened yesterday, not just what's happening now.
Key capabilities exposed through MCP:
- Real-time health checks — memory fragmentation, hit rate, replication lag, connected clients
- Slow command analysis — slowlog and COMMANDLOG (Valkey 8+) with pattern aggregation
- Hot key detection — find cache-busting keys via LFU frequency scores or idle time analysis
- Cluster-wide visibility — per-node stats, aggregated slowlogs, and slot-level metrics across all nodes
- Anomaly detection — Z-score analysis on memory, CPU, hit rate, and other metrics (Pro)
- Client activity tracking — connection counts, command distribution, and buffer usage over time
- ACL audit log — investigate auth failures and access patterns
- Latency event history — track latency trends for specific event types
Quick Start
1. Get a token
In BetterDB, go to Settings → MCP Tokens and generate a new token.
2. Configure your MCP client
Add to your MCP client config (e.g. Claude Code or OpenAI Codex):
For local development with an existing monitor (token not required):
For zero-config local development (auto-starts and manages a monitor process):
3. Start asking questions
Once connected, your AI assistant can query your databases directly:
- "What's the health of my production Valkey instance?"
- "Show me the slowest commands from the last hour"
- "Are there any hot keys causing uneven load?"
- "Which cluster node has the highest memory usage?"
- "Have there been any anomalies in the last 24 hours?"
- "Tune the threshold on my faq-cache — propose a change for me to review"
- "Why is the weather_lookup tool's hit rate so low?"
Configuration
Environment Variables
CLI Arguments
Available Tools
Instance Tools
Analytics Tools
Vector Search Tools
For deployments running the Search module (valkey-search / RediSearch).
AI Observability Tools
For AI components (semantic caches, agent caches, agent-memory stores, retrieval pipelines) and traces ingested via OpenTelemetry.
Connection Management Tools
Monitor Lifecycle Tools
Cache Intelligence Tools
For deployments running @betterdb/semantic-cache or @betterdb/agent-cache. Caches register themselves in a Valkey-side discovery hash; Monitor exposes them through the tools below.
Read-only:
Propose changes (advisory — no Valkey writes until approved):
Approve / reject / list:
Requirements
- Node.js 20+
- A running BetterDB instance (cloud or self-hosted), or use
--autostartto have the MCP server manage one automatically
Documentation
Full docs: docs.betterdb.com
License
See LICENSE for details.
來源:packages/mcp/README.md,提交 b8ac28a
工具
0版本歷史
1- v0.1.4最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。