# io.github.BetterDB-inc/monitor (npm · @betterdb/mcp)

BetterDB MCP server - Valkey observability for Claude Code and other MCP clients

- Trust score: 78/100 (medium)
- Change this week: +32
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `@betterdb/mcp`: 78/100 (this document), [markdown](https://verifymcp.io/servers/betterdb-inc-monitor/betterdb-mcp.md), [page](https://verifymcp.io/servers/betterdb-inc-monitor/betterdb-mcp)

## Channel facts

- Registry: `npm`
- Package: `@betterdb/mcp`
- Version: `0.1.3`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 87/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (95 of 99), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (95 of 99), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 84/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to BetterDB-inc/monitor).
  - License check failed: no license is declared.
  - Actively maintained (last published 5 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 80/100
  - AI-judged instruction clarity (excellent).
  - Tool/resource definitions use about 1627 tokens (~77/item across 21 items; 21 tools + 0 resources), lean.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 27/100
  - Stability observed for 8 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add betterdb-inc-monitor -- npx -y @betterdb/mcp
```

### Codex

```bash
codex mcp add betterdb-inc-monitor -- npx -y @betterdb/mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "betterdb-inc-monitor": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@betterdb/mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add betterdb-inc-monitor --command npx --arg -y --arg @betterdb/mcp
```

### Hermes

```yaml
mcp_servers:
  betterdb-inc-monitor:
    command: "npx"
    args: ["-y", "@betterdb/mcp"]
```

### Other

```json
{
  "mcpServers": {
    "betterdb-inc-monitor": {
      "command": "npx",
      "args": [
        "-y",
        "@betterdb/mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 78, +4)

- [functional improvement] Stability: unverified → 0.27

### 2026-08-02 (score 74, +38)

- [security improvement] Install scripts: unverified → pass
- [security improvement] Provenance: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [security] The attested source repository moved: BetterDB-inc/monitor
- [functional regression] License: unverified → fail
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Schema quality: unverified → excellent

### 2026-08-01 (score 36, +8)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-31 (score 28, −18)

- [security regression] Malware scan: pass → unverified

### 2026-07-27 (score 46)

First indexed and scored.

## MCP tools (21)

### `list_instances` (~26 tokens)

List all Valkey/Redis instances registered in BetterDB. Shows connection status and capabilities.

### `select_instance` (~30 tokens)

Select which instance subsequent tool calls operate on.

Input parameters:

- `instanceId` (string, required): The instance ID to select

### `get_info` (~99 tokens)

Get 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.

Input parameters:

- `instanceId` (string): Optional instance ID override
- `section` (string): INFO section to filter (server, clients, memory, stats, replication, keyspace)

### `get_slowlog` (~49 tokens)

Get the most recent slow commands from the slowlog.

Input parameters:

- `count` (number): Number of entries to return (default 25)
- `instanceId` (string): Optional instance ID override

### `get_commandlog` (~59 tokens)

Get the most recent entries from COMMANDLOG (Valkey 8+ only, superset of slowlog).

Input parameters:

- `count` (number): Number of entries to return (default 25)
- `instanceId` (string): Optional instance ID override

### `get_latency` (~29 tokens)

Get latency event history for the active instance.

Input parameters:

- `instanceId` (string): Optional instance ID override

### `get_memory` (~34 tokens)

Get memory diagnostics: MEMORY DOCTOR assessment and MEMORY STATS breakdown.

Input parameters:

- `instanceId` (string): Optional instance ID override

### `get_clients` (~29 tokens)

Get the active client list with connection details.

Input parameters:

- `instanceId` (string): Optional instance ID override

### `get_health` (~80 tokens)

Get 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.

Input parameters:

- `instanceId` (string): Optional instance ID override

### `get_slowlog_patterns` (~80 tokens)

Get 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.

Input parameters:

- `instanceId` (string): Optional instance ID override
- `limit` (number): Max entries to analyze

### `get_commandlog_history` (~124 tokens)

Get 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.

Input parameters:

- `command` (string): Filter by command name
- `endTime` (number): End time (Unix timestamp ms)
- `instanceId` (string): Optional instance ID override
- `limit` (number): Max entries to return
- `minDuration` (number): Min duration in microseconds
- `startTime` (number): Start time (Unix timestamp ms)

### `get_commandlog_patterns` (~98 tokens)

Get 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.

Input parameters:

- `endTime` (number): End time (Unix timestamp ms)
- `instanceId` (string): Optional instance ID override
- `limit` (number): Max entries to analyze
- `startTime` (number): Start time (Unix timestamp ms)

### `get_anomalies` (~105 tokens)

Get 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.

Input parameters:

- `instanceId` (string): Optional instance ID override
- `limit` (number): Max events to return
- `metricType` (string): Filter by metric type
- `startTime` (number): Start time (Unix timestamp ms)

### `get_client_activity` (~103 tokens)

Get 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.

Input parameters:

- `bucketSizeMinutes` (number): Bucket size in minutes (default 5)
- `endTime` (number): End time (Unix timestamp ms)
- `instanceId` (string): Optional instance ID override
- `startTime` (number): Start time (Unix timestamp ms)

### `get_hot_keys` (~160 tokens)

Get 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).

Input parameters:

- `endTime` (number): End time (Unix timestamp ms)
- `instanceId` (string): Optional instance ID override
- `limit` (number): Max entries to return (default 50, max 200)
- `startTime` (number): Start time (Unix timestamp ms)

### `get_cluster_nodes` (~60 tokens)

Discover 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.

Input parameters:

- `instanceId` (string): Optional instance ID override

### `get_cluster_node_stats` (~59 tokens)

Get 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.

Input parameters:

- `instanceId` (string): Optional instance ID override

### `get_cluster_slowlog` (~80 tokens)

Get 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.

Input parameters:

- `instanceId` (string): Optional instance ID override
- `limit` (number): Max entries to return (default 100)

### `get_slot_stats` (~113 tokens)

Get 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.

Input parameters:

- `instanceId` (string): Optional instance ID override
- `limit` (number): Max slots to return (default 20)
- `orderBy` (string): Sort order: 'key-count' or 'cpu-usec' (default 'key-count')

### `get_latency_history` (~80 tokens)

Get 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.

Input parameters:

- `eventName` (string, required): Latency event name to query
- `instanceId` (string): Optional instance ID override

### `get_acl_audit` (~130 tokens)

Get 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.

Input parameters:

- `endTime` (number): End time (Unix timestamp ms)
- `instanceId` (string): Optional instance ID override
- `limit` (number): Max entries to return
- `reason` (string): Filter by reason (auth, command, key, channel)
- `startTime` (number): Start time (Unix timestamp ms)
- `username` (string): Filter by username

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/betterdb-inc-monitor/betterdb-mcp#diagnostics

## Score history

- 2026-08-03: 78
- 2026-08-02: 74
- 2026-08-01: 36
- 2026-07-31: 28
- 2026-07-30: 46
- 2026-07-28: 46
- 2026-07-27: 46

## Links

- npm package: https://www.npmjs.com/package/@betterdb/mcp
- Socket report: https://socket.dev/npm/package/@betterdb/mcp
- Repository: https://github.com/BetterDB-inc/monitor
- Changelog RSS feed: https://verifymcp.io/servers/betterdb-inc-monitor/betterdb-mcp/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/betterdb-inc-monitor/betterdb-mcp/changelog.json
- HTML version of this page: https://verifymcp.io/servers/betterdb-inc-monitor/betterdb-mcp
