Using BetterDB from an LLM (MCP)
BetterDB ships an MCP server — 60 tools that let Claude Code, Cursor, or any MCP client query your database’s health, slow queries, memory, and analytics in plain language.
Add to Claude Code
claude mcp add betterdb -- \
npx @betterdb/mcp betterdb-mcp \
--autostart --persist
This adds BetterDB as an MCP server and starts monitoring automatically. Then ask Claude about your database health, slow queries, or memory usage.
Any MCP client (stdio)
npx @betterdb/mcp
Create a token under Settings → MCP Tokens in the dashboard and pass it as BETTERDB_TOKEN. Cloud requires it. On self-hosted it is optional: read tools work without it. With it, every call acts as you, and changes it makes are recorded under your name in the activity log.
See Packages for the full tool list and the @betterdb/mcp package.