Betterdb Mcp
@BetterDB-inc
MCP server for Valkey and Redis observability. Query real-time health, slow commands, hot keys, anomaly detection, and cluster analytics directly from your AI assistant.
概要
What is Betterdb Mcp?
Betterdb Mcp connects AI assistants like Claude Code, Cursor, and Windsurf to the BetterDB monitoring platform for Valkey and Redis databases. It lets your AI query real-time metrics, diagnose slow commands, detect anomalies, and investigate incidents without leaving your editor.
How to use Betterdb Mcp?
Generate an MCP token in BetterDB (Settings → MCP Tokens), then add the server to your MCP client config using npx @betterdb/mcp with the BETTERDB_URL and BETTERDB_TOKEN environment variables. Once connected, ask natural-language questions about your database health, slow commands, hot keys, and anomalies.
Key features of Betterdb Mcp
- Real-time health checks for memory, hit rate, and replication lag
- Slow command analysis with pattern aggregation
- Hot key detection via LFU or idle time analysis
- Cluster-wide visibility across all nodes
- Anomaly detection using Z-score analysis (Pro)
- Latency event history and ACL audit logs
Use cases of Betterdb Mcp
- Check production Valkey or Redis instance health from your editor
- Investigate the slowest commands from the last hour
- Find hot keys causing uneven cluster load
- Review anomaly detection events over the past 24 hours
- Audit ACL failures and access patterns
FAQ from Betterdb Mcp
How is Betterdb Mcp different from live-snapshot tools?
BetterDB persists historical metrics, slowlogs, and audit trails, so you can investigate what happened yesterday — not just what's happening now.
What are the runtime requirements?
Node.js 20+ and a running BetterDB instance (cloud or self-hosted).
How do I configure the server?
Set BETTERDB_URL (default http://localhost:3001) and optionally BETTERDB_TOKEN and BETTERDB_INSTANCE_ID as environment variables.
What instances can I query?
Any Valkey or Redis instances registered in your BetterDB workspace. Use list_instances and select_instance tools to choose one.
What transport does the server use?
It uses stdio transport via the npx @betterdb/mcp command.