# Monitor

> Monitor is an open-source MCP server for databases. BetterDB MCP server for Valkey and Redis health, slow commands and hot keys. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/betterdb-inc/monitor/tree/HEAD/packages/mcp
- **MCP Registry name:** io.github.BetterDB-inc/monitor
- **Categories:** [databases](https://ai-powered.com/categories/databases), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-14

## About

Unlike a live-only viewer, this server talks to a BetterDB monitor that keeps historical metrics, slowlogs and audit trails, so an assistant can look back at what happened yesterday. The npm package @betterdb/mcp runs over stdio and needs the monitor's URL and, for cloud, a token created under Settings, MCP Tokens.

The README lists health checks for memory fragmentation, hit rate and replication lag, slowlog and COMMANDLOG analysis, hot key detection, per-node cluster views, client activity, an ACL audit log and latency history. Anomaly detection by Z-score is marked Pro. An --autostart option can spawn a local monitor, and usage telemetry can be turned off with environment variables.

## Features

- **Health summary:** Synthetic health check covering memory fragmentation, hit rate and replication lag.
- **Slow command analysis:** Reads slowlog and Valkey 8 COMMANDLOG with pattern aggregation.
- **Hot key detection:** Finds hot keys using LFU frequency or idle time.
- **Cluster visibility:** Per-node stats, aggregated slowlogs and slot-level metrics.
- **Anomaly detection:** Z-score analysis on memory, CPU and hit rate; marked Pro.
- **ACL audit log:** Investigate auth failures and access patterns.
- **Local autostart:** Can spawn and manage a local monitor process.

## Good for

- Diagnose slow Valkey commands from the editor
- Find hot keys causing uneven load
- Check memory and replication health
- Investigate cache hit rate of AI caches
- Review ACL failures after an incident

## Install

### Claude Code (Terminal)

```sh
claude mcp add monitor --env BETTERDB_TOKEN='<BETTERDB_TOKEN>' --env BETTERDB_LOCAL_TOKEN='<BETTERDB_LOCAL_TOKEN>' -- npx -y @betterdb/mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "monitor": {
      "command": "npx",
      "args": [
        "-y",
        "@betterdb/mcp"
      ],
      "env": {
        "BETTERDB_TOKEN": "<BETTERDB_TOKEN>",
        "BETTERDB_LOCAL_TOKEN": "<BETTERDB_LOCAL_TOKEN>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "monitor": {
      "command": "npx",
      "args": [
        "-y",
        "@betterdb/mcp"
      ],
      "env": {
        "BETTERDB_TOKEN": "<BETTERDB_TOKEN>",
        "BETTERDB_LOCAL_TOKEN": "<BETTERDB_LOCAL_TOKEN>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "monitor": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@betterdb/mcp"
      ],
      "env": {
        "BETTERDB_TOKEN": "<BETTERDB_TOKEN>",
        "BETTERDB_LOCAL_TOKEN": "<BETTERDB_LOCAL_TOKEN>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "monitor": {
      "command": "npx",
      "args": [
        "-y",
        "@betterdb/mcp"
      ],
      "env": {
        "BETTERDB_TOKEN": "<BETTERDB_TOKEN>",
        "BETTERDB_LOCAL_TOKEN": "<BETTERDB_LOCAL_TOKEN>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "monitor": {
      "command": "npx",
      "args": [
        "-y",
        "@betterdb/mcp"
      ],
      "env": {
        "BETTERDB_TOKEN": "<BETTERDB_TOKEN>",
        "BETTERDB_LOCAL_TOKEN": "<BETTERDB_LOCAL_TOKEN>"
      }
    }
  }
}
```

## Tools

- `list_instances`: List registered Valkey/Redis instances with connection status
- `select_instance`: Select which instance later calls operate on
- `get_health`: Synthetic health summary of an instance

## FAQ

### How do I connect it?

Add an npx @betterdb/mcp entry with BETTERDB_URL and a token from Settings, MCP Tokens.

### Is a token required?

Required for cloud; optional for self-hosted, where read tools work anonymously.

### Can I run the monitor locally?

Yes, with --autostart, or by docker run of betterdb/monitor.

### Can I turn telemetry off?

Yes, set BETTERDB_TELEMETRY to false, 0, no or off.

### Is Monitor free?

Yes. Monitor is open source, so you can use and self-host it for free.

### How do I add Monitor to Claude Code?

Run this command in your terminal: claude mcp add monitor --env BETTERDB_TOKEN='<BETTERDB_TOKEN>' --env BETTERDB_LOCAL_TOKEN='<BETTERDB_LOCAL_TOKEN>' -- npx -y @betterdb/mcp

### What are the best alternatives to Monitor?

The closest alternatives to Monitor are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/monitor
