
Monitor
Connects Claude to a running Valkey or Redis instance and surfaces real time observability data through MCP tools. You get memory stats, client connections, keyspace metrics, slow queries, and cluster health without leaving your editor. Built on top of BetterDB's monitoring stack, which they also ship as a standalone web dashboard and CLI. Useful when you're debugging cache behavior, investigating performance issues, or need to check database state while writing code that hits Redis. The same company ships semantic caching libraries for LLMs, so the MCP integration feels like a natural extension of that tooling.
- GitHub stars
- 1.3K
- tools
- 41
- auth
- Secret needed
- transport
- STDIO
- env vars
- 6
- last updated
- Nov 11, 2026
Install
From registry metadata$ npx add-mcp @betterdb/mcp --name monitor --env 'BETTERDB_TOKEN=${BETTERDB_TOKEN}' --env 'BETTERDB_LOCAL_TOKEN=${BETTERDB_LOCAL_TOKEN}'Run in your terminal. add-mcp asks which agents to add it to, then asks for each value it needs. Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add monitor --env BETTERDB_URL=YOUR_BETTERDB_URL --env BETTERDB_TOKEN=YOUR_BETTERDB_TOKEN --env BETTERDB_INSTANCE_ID=YOUR_BETTERDB_INSTANCE_ID --env BETTERDB_LOCAL_TOKEN=YOUR_BETTERDB_LOCAL_TOKEN --env BETTERDB_MCP_TELEMETRY=YOUR_BETTERDB_MCP_TELEMETRY --env BETTERDB_TELEMETRY=YOUR_BETTERDB_TELEMETRY -- npx -y @betterdb/mcpRun in your terminal. Replace YOUR_* placeholders with real values; add --scope user to install for every project.
Tools
Verified live · 41 toolsVerified live against the running server on Jun 10, 2026.
list_instancesList all Valkey/Redis instances registered in BetterDB. Shows connection status and capabilities.
List all Valkey/Redis instances registered in BetterDB. Shows connection status and capabilities.
No parameters. Call it with no arguments.
select_instanceSelect which instance subsequent tool calls operate on.1 params
Select which instance subsequent tool calls operate on.
instanceId*stringadd_connectionAdd a new Valkey/Redis connection to BetterDB. Optionally set it as the active default.6 params
Add a new Valkey/Redis connection to BetterDB. Optionally set it as the active default.
host*stringname*stringpasswordstringportintegersetAsDefaultbooleanusernamestringtest_connectionTest a Valkey/Redis connection without persisting it. Use before add_connection to validate credentials.5 params
Test a Valkey/Redis connection without persisting it. Use before add_connection to validate credentials.
host*stringname*stringpasswordstringportintegerusernamestringremove_connectionRemove a connection from BetterDB.1 params
Remove a connection from BetterDB.
instanceId*stringset_default_connectionSet a connection as the active default for BetterDB.1 params
Set a connection as the active default for BetterDB.
instanceId*stringget_infoGet 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.2 params
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.
instanceIdstringsectionstringget_slowlogGet the most recent slow commands from the slowlog.2 params
Get the most recent slow commands from the slowlog.
countnumberinstanceIdstringget_commandlogGet the most recent entries from COMMANDLOG (Valkey 8+ only, superset of slowlog).2 params
Get the most recent entries from COMMANDLOG (Valkey 8+ only, superset of slowlog).
countnumberinstanceIdstringget_latencyGet latency event history for the active instance.1 params
Get latency event history for the active instance.
instanceIdstringget_memoryGet memory diagnostics: MEMORY DOCTOR assessment and MEMORY STATS breakdown.1 params
Get memory diagnostics: MEMORY DOCTOR assessment and MEMORY STATS breakdown.
instanceIdstringget_clientsGet the active client list with connection details.1 params
Get the active client list with connection details.
instanceIdstringget_healthGet 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 wit...1 params
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 wit...
instanceIdstringget_slowlog_patternsGet 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.2 params
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.
instanceIdstringlimitnumberget_commandlog_historyGet 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.6 params
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.
commandstringendTimenumberinstanceIdstringlimitnumberminDurationnumberstartTimenumberget_commandlog_patternsGet 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.4 params
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.
endTimenumberinstanceIdstringlimitnumberstartTimenumberget_anomaliesGet 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.4 params
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.
instanceIdstringlimitnumbermetricTypestringstartTimenumberget_client_activityGet 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.4 params
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.
bucketSizeMinutesnumberendTimenumberinstanceIdstringstartTimenumberget_hot_keysGet 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 t...4 params
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 t...
endTimenumberinstanceIdstringlimitnumberstartTimenumberget_cluster_nodesDiscover 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.1 params
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.
instanceIdstringget_cluster_node_statsGet 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.1 params
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.
instanceIdstringget_cluster_slowlogGet 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.2 params
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.
instanceIdstringlimitnumberget_slot_statsGet 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.3 params
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.
instanceIdstringlimitnumberorderBystringkey-count · cpu-usecget_latency_historyGet 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.2 params
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.
eventName*stringinstanceIdstringget_acl_auditGet 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.6 params
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.
endTimenumberinstanceIdstringlimitnumberreasonstringstartTimenumberusernamestringstart_monitorStart the BetterDB monitor as a persistent background process. If already running, returns the existing URL. The monitor persists across MCP sessions and must be stopped explicitly with stop_monitor.2 params
Start the BetterDB monitor as a persistent background process. If already running, returns the existing URL. The monitor persists across MCP sessions and must be stopped explicitly with stop_monitor.
portintegerstoragestringsqlite · memorydefault: sqlitecache_listList all caches (semantic_cache and agent_cache) registered for the active instance, with hit rate and total ops.1 params
List all caches (semantic_cache and agent_cache) registered for the active instance, with hit rate and total ops.
instanceIdstringcache_healthDetailed health for a single cache. Response branches by type: semantic_cache reports category_breakdown + uncertain_hit_rate; agent_cache reports tool_breakdown.2 params
Detailed health for a single cache. Response branches by type: semantic_cache reports category_breakdown + uncertain_hit_rate; agent_cache reports tool_breakdown.
cache_name*stringinstanceIdstringcache_threshold_recommendationThreshold-tuning recommendation for a semantic_cache, based on the rolling similarity-score window. Errors with INVALID_CACHE_TYPE on agent_cache.4 params
Threshold-tuning recommendation for a semantic_cache, based on the rolling similarity-score window. Errors with INVALID_CACHE_TYPE on agent_cache.
cache_name*stringcategorystringinstanceIdstringminSamplesintegercache_tool_effectivenessPer-tool hit rate, cost saved, and TTL recommendation for an agent_cache. Errors with INVALID_CACHE_TYPE on semantic_cache.2 params
Per-tool hit rate, cost saved, and TTL recommendation for an agent_cache. Errors with INVALID_CACHE_TYPE on semantic_cache.
cache_name*stringinstanceIdstringcache_similarity_distributionHistogram of recent similarity scores (20 buckets, width 0.1) for a semantic_cache. Errors on agent_cache.4 params
Histogram of recent similarity scores (20 buckets, width 0.1) for a semantic_cache. Errors on agent_cache.
cache_name*stringcategorystringinstanceIdstringwindow_hoursintegercache_recent_changesRecent proposals for a single cache (any status), so agents can avoid re-proposing pending or recently-applied changes. Newest first.3 params
Recent proposals for a single cache (any status), so agents can avoid re-proposing pending or recently-applied changes. Newest first.
cache_name*stringinstanceIdstringlimitintegercache_propose_threshold_adjustPropose a semantic-cache similarity-threshold change for review. Creates a pending proposal that requires human approval before any change is applied. Reasoning must be at least 20 characters.5 params
Propose a semantic-cache similarity-threshold change for review. Creates a pending proposal that requires human approval before any change is applied. Reasoning must be at least 20 characters.
cache_name*stringcategoryvalueinstanceIdstringnew_threshold*numberreasoning*stringcache_propose_tool_ttl_adjustPropose an agent-cache per-tool TTL change for review. Creates a pending proposal that requires human approval. Reasoning must be at least 20 characters.5 params
Propose an agent-cache per-tool TTL change for review. Creates a pending proposal that requires human approval. Reasoning must be at least 20 characters.
cache_name*stringinstanceIdstringnew_ttl_seconds*integerreasoning*stringtool_name*stringcache_propose_invalidatePropose a cache invalidation for review. Filter shape depends on cache type: semantic_cache requires filter_kind=valkey_search + filter_expression; agent_cache requires filter_kind in (tool|key_prefix|session) + filter_value. Warns when estimated_affected exceeds 10000.7 params
Propose a cache invalidation for review. Filter shape depends on cache type: semantic_cache requires filter_kind=valkey_search + filter_expression; agent_cache requires filter_kind in (tool|key_prefix|session) + filter_value. Warns when estimated_affected exceeds 10000.
cache_name*stringestimated_affected*integerfilter_expressionstringfilter_kind*stringvalkey_search · tool · key_prefix · sessionfilter_valuestringinstanceIdstringreasoning*stringcache_list_pending_proposalsList pending cache proposals for the active instance, newest first. Optionally filter by cache_name.3 params
List pending cache proposals for the active instance, newest first. Optionally filter by cache_name.
cache_namestringinstanceIdstringlimitintegercache_get_proposalFetch a single cache proposal by id, including its audit trail.1 params
Fetch a single cache proposal by id, including its audit trail.
proposal_id*stringcache_approve_proposalApprove a pending proposal. Synchronously applies the change to Valkey and returns the terminal status (applied|failed). Idempotent: a second call on an already-applied proposal returns the cached result.2 params
Approve a pending proposal. Synchronously applies the change to Valkey and returns the terminal status (applied|failed). Idempotent: a second call on an already-applied proposal returns the cached result.
actorstringproposal_id*stringcache_reject_proposalReject a pending proposal. Optionally records a reason in the audit trail.3 params
Reject a pending proposal. Optionally records a reason in the audit trail.
actorstringproposal_id*stringreasonstringcache_edit_and_approve_proposalEdit an existing pending proposal and approve it in one step. Provide exactly one edit field matching the proposal type: new_threshold for threshold_adjust, new_ttl_seconds for tool_ttl_adjust. Invalidate proposals are not editable.4 params
Edit an existing pending proposal and approve it in one step. Provide exactly one edit field matching the proposal type: new_threshold for threshold_adjust, new_ttl_seconds for tool_ttl_adjust. Invalidate proposals are not editable.
actorstringnew_thresholdnumbernew_ttl_secondsintegerproposal_id*stringstop_monitorStop a persistent BetterDB monitor process that was previously started with start_monitor or --autostart --persist.
Stop a persistent BetterDB monitor process that was previously started with start_monitor or --autostart --persist.
No parameters. Call it with no arguments.
Sponsors
Configuration
BETTERDB_URLURL of the BetterDB monitor instance
BETTERDB_TOKENsecretMCP authentication token generated from the BetterDB Settings page
BETTERDB_INSTANCE_IDInstance ID to target when using multi-instance cloud deployments
BETTERDB_LOCAL_TOKENsecretToken for a monitor started with --autostart or start_monitor when BETTERDB_URL is set to a different monitor; without it that monitor gets no token. BETTERDB_TOKEN is used when BETTERDB_URL is unset or points at the started monitor
BETTERDB_MCP_TELEMETRYSet to false, 0, no or off to stop posting tool usage events to the monitor. Usage events are off if this or BETTERDB_TELEMETRY is off
BETTERDB_TELEMETRYSet to false, 0, no or off to turn off telemetry for both the MCP server and a monitor it starts
Readme
Details
- Repository
- github.com/betterdb-inc/monitor
- Categories
- Databases, Monitoring & Observability
- Package
@betterdb/mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active
- Tools verified
- Jun 10, 2026