PlugWiki
BetterDB MCP logo

BetterDB MCP Server: Ask Your Assistant About Your Valkey and Redis Databases

OfficialLocal
Getnpm@betterdb/mcpbetterdb-inc/monitor

Lets Claude, Cursor and other assistants check the health, slow commands and hot keys of your Valkey and Redis databases through BetterDB.

This is the MCP server of BetterDB, a monitoring tool for Valkey and Redis, and it only works with a BetterDB instance. That can be BetterDB Cloud, a self-hosted monitor, or one the MCP server starts for you on your computer.

Most tools only read monitoring data. A few can add or remove connections, apply cache changes and delete stored memories, and they act with the sign-in of the token you give. Leave the token out on a self-hosted monitor to stay on read tools.

Good for

  • Engineers who run Valkey or Redis and want answers about slow commands and memory in chat
  • On-call teams investigating an incident from stored history
  • Teams with AI semantic caches or agent memory on Valkey who tune them with BetterDB

Works in

12 should work

Tap an app to see how to set it up and any known problems.

Install BetterDB MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the BetterDB MCP server to Claude Code. Run this command:
    
    claude mcp add betterdb -e BETTERDB_URL=<BETTERDB_URL> -- npx -y @betterdb/mcp
    
    Ask me for BETTERDB_URL and only put the values in that config, nowhere else.
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

Built from the package data we hold. Not yet tested by us.

Tools

  • Lists the Valkey/Redis servers BetterDB watches

    Shows every database registered in BetterDB with its connection status and capabilities. It is how the assistant finds the instance to look at.

    Try: “Which Valkey instances does BetterDB monitor, and are they connected?”

    Read · list_instances

  • Chooses which instance later calls use

    Sets the active instance for the session so the other tools do not need an instance id each time. It changes only the assistant's own selection.

    Try: “Switch to my production Valkey instance.”

    Read · select_instance

  • Registers a new database in BetterDB

    Sends a host, port, username and password for a Valkey or Redis server to BetterDB so it starts monitoring it, and can make it the default. The password passes through the chat.

    Try: “Add my staging Valkey at cache.internal:6379 and make it the default.”

    Write · add_connection

  • Checks database credentials without saving them

    Tries to connect to a Valkey or Redis server with the details you give and reports whether it worked. Nothing is stored.

    Try: “Test whether I can connect to cache.internal on port 6379.”

    Network · test_connection

  • Removes a database from BetterDB

    Deletes a registered connection from BetterDB so it is no longer monitored. It does not delete data on the database itself.

    Try: “Remove the old staging connection from BetterDB.”

    Delete · remove_connection

  • Sets the default database

    Marks one registered connection as the default that BetterDB uses when no instance is named.

    Try: “Make the production connection the default.”

    Write · set_default_connection

  • Reads the full INFO stats

    Returns the INFO output for the active instance: memory, clients, replication, keyspace, hit rate and ops per second. You can limit it to one section such as memory or stats.

    Try: “Show me the memory section of INFO for my cache.”

    Read · get_info

  • Lists the latest slow commands

    Reads the most recent entries from the live slowlog, the commands that took longer than the server's slow threshold.

    Try: “What were the last 20 slow commands?”

    Read · get_slowlog

  • Lists recent COMMANDLOG entries

    Reads the newest COMMANDLOG entries, which also cover large requests and replies. Works on Valkey 8 and later only.

    Try: “Show recent COMMANDLOG entries for large replies.”

    Read · get_commandlog

  • Reads latency event history

    Returns the server's recorded latency events so you can see which kinds of delay happened and when.

    Try: “Has my server logged any latency events?”

    Read · get_latency

  • Runs a memory diagnosis

    Returns the MEMORY DOCTOR verdict and the MEMORY STATS breakdown for the active instance.

    Try: “Is there a memory problem on this instance?”

    Read · get_memory

  • Lists connected clients

    Returns the active client list with connection details such as address, age and last command.

    Try: “Which clients are connected right now?”

    Read · get_clients

Read from the source code

Permissions

high risk · 5 things to watch · 3 advisories

High risk

The server can remove connections, apply cache changes and delete stored memories, and nothing stops the assistant from approving its own proposals. Use a non-admin token, or leave the token out on a self-hosted monitor so only read tools work.

What it can do

Watch out for

  • The assistant can approve its own changes

    The propose tools say a human must approve, but the approve tools are part of the same server. An assistant that can call them can apply cache changes and delete memories itself. Use a token without admin rights, or tell the assistant never to approve. npmjs.com

  • It can delete memories and cache entries

    Approving a forget proposal deletes memories from the live store. Approving an invalidate proposal removes cache entries in Valkey. remove_connection also removes a monitored database from BetterDB. npmjs.com

  • Autostart runs a second package on your machine

    The --autostart option and start_monitor run npx --yes @betterdb/monitor in the background, with your environment variables passed on. Skip autostart if you do not want that, and point BETTERDB_URL at a monitor you already trust. npmjs.com

  • Database passwords pass through the chat

    add_connection and test_connection take a database host and password as tool inputs, so the password appears in your conversation. Add connections in the BetterDB settings instead. npmjs.com

  • Tool usage is reported to your BetterDB instance

    The server sends each tool name, success, duration and error to your BetterDB instance. Set BETTERDB_TELEMETRY=false to turn this off. npmjs.com

Security advisories

Technical details
Turning on read-onlyOn a self-hosted monitor, leave BETTERDB_TOKEN unset. The README says read tools work anonymously and write tools need an admin token. BetterDB Cloud always needs a token.
Talks toThe BetterDB instance at BETTERDB_URL (BetterDB Cloud or your own monitor)
Sign-in and keysThe token goes in the env block of your MCP client config. It acts as the token owner, and changes are recorded under that owner's name in the BetterDB activity log.
Scopes
  • BETTERDB_TOKEN: acts as the token owner; write tools need an admin token

Questions

Is the BetterDB MCP server official?

Yes. It is published by BetterDB-inc, the company behind BetterDB, from the same repository as the BetterDB Monitor app.

Do I need BetterDB to use it?

Yes. The server only talks to a BetterDB instance, which can be BetterDB Cloud, a self-hosted monitor (the README shows a Docker image), or one the MCP server starts on your computer with the autostart option.

Do I need a token?

For BetterDB Cloud, yes: create one in Settings, then MCP Tokens. For a self-hosted monitor it is optional. The README says read tools work without it, and write tools need an admin token.

Can it run read-only?

Partly. On a self-hosted monitor, leave the token out and the README says only read tools work. There is no read-only switch in the MCP server itself, so with a token the write and delete tools are available.

Can it change or delete things?

Yes. It can add and remove connections, apply cache threshold, TTL and invalidation changes, and delete agent memories once a proposal is approved. The assistant can approve proposals itself.

Are all tools free?

No. Some tools, such as anomalies, latency regressions and largest keys, need a BetterDB Pro or Enterprise license. Without it they return a message that names the required tier.

Which databases does it support?

Valkey and Redis, with a few tools limited to Valkey 8 and later, such as the COMMANDLOG and slot tools, or to databases with the Search module.

Does the tool list match the README?

Not exactly. The published package registers 60 tools. The README table lists fewer and names a few tools that this release does not register.

Information

updated Nov 2, 2026

Publisher
Official
Package
@betterdb/mcp
Registry
npm
Transport
stdio
Auth
token in env
Version
0.1.4
License
MIT
Last commit
Oct 31, 2026
Open issues
11
Listed in
Official MCP registry

WebsiteGitHubnpmOfficial MCP RegistryChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 2
  1. @betterdb/mcp README · github.com
  2. @betterdb/mcp 1.5.0 published package (dist/index.js, autostart.js, telemetry.js) · npmjs.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.