
Monitor
io.github.BetterDB-incPublished by GitHub account BetterDB-incv0.1.4Updated Oct 24, 2026
BetterDB MCP server - Valkey observability for Claude Code and other MCP clients
Overview
Connects an AI assistant to the BetterDB monitoring platform so it can inspect Valkey and Redis health, slow commands, hot keys, clusters and AI cache metrics.
- What you can do
- List and select monitored Valkey/Redis instances, then pull health summaries, INFO stats, memory diagnostics and client lists
- Inspect slowlog and COMMANDLOG entries, aggregated patterns, latency event history, hot keys and ACL audit logs
- Review cluster node roles, per-node stats, cluster-wide slowlogs and per-slot metrics
- Forecast capacity and latency regressions, and check vector index health and search latency
- Explore AI observability data: AI component instances, OpenTelemetry traces and trace-to-Valkey correlation
- Manage caches and connections: cache health and threshold recommendations, propose/approve/reject cache changes, add or remove connections, start or stop a monitor
- When to use it
- Useful when you run Valkey or Redis and want an assistant to diagnose performance problems, investigate incidents, or tune semantic and agent caches from inside the editor instead of switching to dashboards.
- Requirements
- Node.js 20 or newer, run locally via npx. A running BetterDB instance (cloud or self-hosted) set through BETTERDB_URL, or the --autostart flag to let the server manage one. BETTERDB_TOKEN is required for cloud and optional for self-hosted; BETTERDB_INSTANCE_ID optionally pre-selects an instance.
Installation
In SourceWeft
- Open Monitor in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: packages/mcp/README.md at commit b8ac28a
Tools
0Version history
1- v0.1.4LatestSep 16, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.