
Betterdb MCP Server
by betterdb-incio.github.BetterDB-inc/monitorv0.1.4
Valkey and Redis observability: query real-time metrics, analyze slow commands, detect hot keys and investigate performance issues.
context tax
~2,457 tok/turn21 tools
security
92/100
cold start
348 ms
freshness
Active25d ago
Our reading of Betterdb, from the data
Betterdb is a database MCP server from betterdb-inc, listed in the official MCP Registry.
Its 21 tools add about 2,457 tokens to every model turn, in line with the database median of 1,925 tokens across 101 measured servers (measured 2026-10-23).
Maintenance is active: the last public signal was 25 days ago (2026-10-16). For comparison, 63% of database servers are active or maintained.
With 1,309 GitHub stars it ranks #20 of 1,397 database servers we index.
It runs locally on your machine over stdio and needs one secret (BETTERDB_TOKEN); use a scoped, least-privilege key.
Install Betterdb MCP server
Install in Claude Code
claude mcp add betterdb-inc -e BETTERDB_TOKEN='<betterdb-token>' -- npx -y @betterdb/mcpInstall in Cursor
{
"mcpServers": {
"betterdb-inc": {
"command": "npx",
"args": [
"-y",
"@betterdb/mcp"
],
"env": {
"BETTERDB_TOKEN": "<betterdb-token>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"betterdb-inc": {
"command": "npx",
"args": [
"-y",
"@betterdb/mcp"
],
"env": {
"BETTERDB_TOKEN": "<betterdb-token>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"betterdb-inc": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@betterdb/mcp"
],
"env": {
"BETTERDB_TOKEN": "<betterdb-token>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"betterdb-inc": {
"command": "npx",
"args": [
"-y",
"@betterdb/mcp"
],
"env": {
"BETTERDB_TOKEN": "<betterdb-token>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Try it in a sandbox first: this installs it with scripts off and starts it with no network, then lists its tools and token cost. How it works
npx mcpskillhub test @betterdb/mcp
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| BETTERDB_URL | — | — | URL of the BetterDB monitor instance |
| BETTERDB_TOKEN | — | yes | MCP authentication token generated from the BetterDB Settings page |
| BETTERDB_INSTANCE_ID | — | — | Instance ID to target when using multi-instance cloud deployments |
Context tax
Connecting this server adds ~2,457 tokens of tool definitions to every model turn (moderate, 21 tools). Measured 2026-10-23 via a sandboxed run; o200k tokenizer, worst case for clients that load all tools up front. How we measure
| Model | Per 1,000 turns | With prompt caching |
|---|---|---|
| Claude Opus 5.5 | $9.83 | $0.491 |
| Claude Sonnet 5.5 | $4.91 | $0.491 |
| Claude Haiku 5.5 | $0.246 | — |
Input prices as of 2026-10-06. Excludes your own prompt and output.
Tools (21)
get_hot_keys205 tokGet hot key tracking data from persisted storage. BetterDB periodically scans keys using LFU frequency scores (when maxmemory-policy is an LFU variant) or OBJECT IDLETIME / COMMANDLOG-derived frequency. Each snapshot captures the top keys ranked by access frequency. Use this to find cache-busting keys, uneven access patterns, or keys that dominate throughput. The signalType field in each entry indicates which detection mode was active (lfu or idletime).
get_acl_audit180 tokGet persisted ACL audit log entries from storage. Filter by username, reason (auth, command, key, channel), or time range. Use this to investigate why a connection is failing or audit access patterns.
get_commandlog_history173 tokGet persisted COMMANDLOG entries from storage (Valkey 8+ only). Supports time range filtering to investigate specific incidents. Returns empty with a note if COMMANDLOG is not supported on this instance.
get_slot_stats163 tokGet per-slot key counts and CPU usage (Valkey 8.0+ only). Use orderBy='cpu-usec' to find hot slots, or 'key-count' to find the most populated slots. Returns an error message if not supported.
get_anomalies147 tokGet anomaly detection events from persisted storage. BetterDB continuously runs Z-score analysis on memory, hit rate, CPU, and other metrics — this returns the detected anomalies. Use to investigate what triggered an alert or correlate with an incident.
get_client_activity147 tokGet time-bucketed client activity from persisted snapshots. Shows connection counts, command distribution, and buffer usage over time. Use startTime/endTime to focus on a specific incident window.
get_commandlog_patterns141 tokGet analyzed COMMANDLOG patterns from persisted storage (Valkey 8+ only). Like get_slowlog_patterns but includes large-request and large-reply patterns in addition to slow commands.
get_info135 tokGet INFO stats for the active instance. Contains all health data: memory, clients, replication, keyspace, stats (hit rate, ops/sec), and server info. Optionally filter to a section: server|clients|memory|stats|replication|keyspace.
get_latency_history135 tokGet the full latency history for a named event (e.g. 'command', 'fast-command'). Call get_latency first to see which event names are available, then use this to investigate a specific event's trend over time.
get_cluster_slowlog116 tokGet the aggregated slowlog across ALL nodes in the cluster. This is the primary tool for finding slow commands in cluster mode — per-node slowlogs are incomplete. Returns an error message if not in cluster mode.
get_slowlog_patterns115 tokGet analyzed slowlog patterns from persisted storage. Groups slow commands by normalized pattern, showing frequency, average duration, and example commands. Survives slowlog buffer rotation — data goes back as far as BetterDB has been running.
get_health112 tokGet a synthetic health summary for the active instance: keyspace hit rate, memory fragmentation ratio, connected clients, replication lag (replicas only), and keyspace size. Use this as the first call when investigating an instance — it surfaces the most actionable signals without requiring you to parse raw INFO output.
get_commandlog96 tokGet the most recent entries from COMMANDLOG (Valkey 8+ only, superset of slowlog).
get_cluster_nodes92 tokDiscover all nodes in the Valkey cluster — role (master/replica), address, health status, and slot ranges. Returns an error message if this instance is not running in cluster mode.
get_cluster_node_stats91 tokGet per-node performance stats: memory usage, ops/sec, connected clients, replication offset, and CPU. Use this to identify hot nodes, lagging replicas, or uneven load distribution.
get_slowlog85 tokGet the most recent slow commands from the slowlog.
select_instance82 tokSelect which instance subsequent tool calls operate on.
get_memory66 tokGet memory diagnostics: MEMORY DOCTOR assessment and MEMORY STATS breakdown.
get_latency61 tokGet latency event history for the active instance.
get_clients61 tokGet the active client list with connection details.
list_instances52 tokList all Valkey/Redis instances registered in BetterDB. Shows connection status and capabilities.
Security signals
92/100 — no known issues found as of 2026-10-23, from the checks below. This is not a guarantee of safety; review what a server can do before connecting it.
Deductions
- No license detected-5
- No security policy (SECURITY.md)-3
Checks
- ✓Repository hygiene (archived, activity, license, security policy)
- ✓Tool descriptions (prompt-injection and hidden-text heuristics)
- ○Package metadata (install scripts, provenance) — pending
- ○Source scan (secrets, CVEs, risky code) by vectra-guard — pending
Scan it yourself before installing with vectra-guard, the open-source agent security CLI (made by NavyaAI, which also runs MCPSkillHub). Scoring rules
Freshness
Active — last maintenance signal 25d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-16 · 25d ago · GitHub
Latest release
2026-10-16 · 25d ago · GitHub · semantic-cache-py-v0.13.0
Package published
no data · npm/PyPI
Registry entry updated
2026-03-14 · 8mo ago · official registry · v0.1.4
How it compares in Database
Against the most-starred database servers we index. Token cost is per model turn, measured from each server's live tool list.
| Server | Stars | Tools | Tokens / turn | Freshness | Runs |
|---|---|---|---|---|---|
| Betterdb (this) | 1,309 | 21 | 2,457 | Active | local |
| Screenpipe | 21,982 | — | not measured | Active | — |
| Genai Toolbox | 16,679 | — | not measured | Active | hosted |
| Convex Backend | 12,716 | — | not measured | Active | — |
| Kubeshark | 12,100 | — | not measured | Active | local |
| Baserow | 6,174 | — | not measured | Active | — |
FAQ
›How do I install the Betterdb MCP server in Claude Code?
Run: claude mcp add betterdb-inc -e BETTERDB_TOKEN='<betterdb-token>' -- npx -y @betterdb/mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Betterdb require an API key?
Yes. It expects BETTERDB_TOKEN, of which 1 is a secret.
›Can I use Betterdb as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Betterdb in the official MCP registry?
Yes, as io.github.BetterDB-inc/monitor.
›How many tokens does Betterdb add to my context?
Its tool definitions total about 2,457 tokens, resent on every turn.
Sources and method
- Official MCP Registry entry
- updated 2026-03-14
- GitHub repository
- fetched 2026-10-19
- Package registry (npm / PyPI)
- listed
- Tool list (tools/list), measured by us
- 2026-10-23
- Security signals, computed by us
- 2026-10-23
- Last checked against all sources
- 2026-10-19
The description, packages and links come from the maintainer's own published metadata. Token cost, security signals, freshness and the reading above are MCPSkillHub's own measurements; see the methodology. Editorial standards are owned by Ramachandra Vikas Chamarthi, Founder & AI HPC Architect. Spot an error? Request a correction or claim the listing.
Alternatives to Betterdb
Other database MCP servers.