Skip to content
MCP server

DBA Checkup

Read-only PostgreSQL and Oracle health checks for AI assistants, with no free-form SQL

Runs locally

DBA Checkup is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted
Runs
Locally
Access
Needs a secret key or token
Version
0.2.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add dba-checkup-mcp --env DBA_CHECKUP_DATABASE_URL='<DBA_CHECKUP_DATABASE_URL>' -- npx -y dba-checkup-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "dba-checkup-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dba-checkup-mcp"
      ],
      "env": {
        "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "dba-checkup-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dba-checkup-mcp"
      ],
      "env": {
        "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "dba-checkup-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dba-checkup-mcp"
      ],
      "env": {
        "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "dba-checkup-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "dba-checkup-mcp"
      ],
      "env": {
        "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add dba-checkup-mcp --env DBA_CHECKUP_DATABASE_URL='<DBA_CHECKUP_DATABASE_URL>' -- npx -y dba-checkup-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.dba-checkup-mcp]
command = "npx"
args = ["-y", "dba-checkup-mcp"]
env = { DBA_CHECKUP_DATABASE_URL = "<DBA_CHECKUP_DATABASE_URL>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "dba-checkup-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dba-checkup-mcp"
      ],
      "env": {
        "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "dba-checkup-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dba-checkup-mcp"
          ],
          "env": {
            "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e DBA_CHECKUP_DATABASE_URL='<DBA_CHECKUP_DATABASE_URL>' dba-checkup-mcp npx -- -y dba-checkup-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "dba-checkup-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dba-checkup-mcp"
          ],
          "env": {
            "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "dba-checkup-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dba-checkup-mcp"
          ],
          "env": {
            "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "dba-checkup-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dba-checkup-mcp"
          ],
          "env": {
            "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "dba-checkup-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dba-checkup-mcp"
          ],
          "env": {
            "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "dba-checkup-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dba-checkup-mcp"
          ],
          "env": {
            "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "dba-checkup-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dba-checkup-mcp"
          ],
          "env": {
            "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "dba-checkup-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dba-checkup-mcp"
          ],
          "env": {
            "DBA_CHECKUP_DATABASE_URL": "<DBA_CHECKUP_DATABASE_URL>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • DBA_CHECKUP_DATABASE_URLRead-only monitoring login: postgres://user:pass@host:5432/db or oracle://user:pass@host:1521/SERVICERequired
  • DBA_CHECKUP_QUERY_TEXTmasked (default), full or off: how much statement text to show
  • DBA_CHECKUP_ALLOW_EXPLAIN1 to enable explain_query (PostgreSQL, plans only)

About DBA Checkup

Instead of letting an assistant write SQL against a production database, this server offers a fixed set of checks a DBA would normally run by hand. Covered areas include blocking locks, long-running statements, sessions left idle in a transaction, heavy statements, broken or unused indexes, vacuum and statistics problems, tablespace or storage pressure, and archiving or replication lag. Results are returned in plain language, with the most serious findings first.

Every check runs inside a read-only transaction with a timeout, using a login that cannot write. Statement text is masked by default so literal values such as email addresses do not reach the chat. Each tool call is appended to a local audit log with its timing and outcome.

The Oracle checks rely only on v$ and dba_ views available in every license and avoid AWR, ASH and SQL Monitor, so they show the current state rather than history. The package is aimed at database administrators and developers who want an assistant to triage a PostgreSQL or Oracle instance, and it can also run as a command-line report for cron or Nagios.

Tools this server provides (10)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 1 of 10 tools reads data; 9 names don't say.

From the server's own tool labels and tool names; not verified by us.

health_report
Runs every check and lists what needs attention, most serious first.
overview
Shows version, uptime, connection usage, cache hit ratio, database sizes and login safety.
active_sessions
Lists work running now, long statements and sessions idle inside a transaction.
blocking_locks
Shows which sessions block others and identifies root blockers.
top_queries
Lists statements using the most time.
storage
Shows largest tables and materialized views, or tablespace fullness on Oracle.
index_health
Finds invalid, unused or unusable indexes and large tables read by full scans.
maintenance
Covers autovacuum, dead rows, statistics freshness and invalid objects.
replication_backup
Covers WAL archiving, replica lag, replication slots, archive logs and backups.
explain_queryName suggests: reads
Returns the plan for one SELECT without running it (PostgreSQL, off by default).

What it does

Fixed diagnostic checks
The assistant chooses from predefined health checks and never writes its own SQL against the database.
Read-only enforcement
Queries run in read-only transactions under a monitoring login, and write attempts are refused.
Masked statement text
Literal strings and numbers in query text are replaced with placeholders by default.
Oracle without extra packs
Oracle checks use only views included with the base license, avoiding AWR, ASH and SQL Monitor.
Local audit log
Each call is recorded in a JSONL file with timing and outcome.
Command-line report mode
The same checks can run without an AI client and return Nagios-style exit codes.

Good for

  • Asking an assistant what is wrong with a database and what to fix first
  • Finding sessions that block others or sit idle inside open transactions
  • Spotting invalid or unused indexes and tables read by full scans
  • Checking vacuum, statistics and transaction ID wraparound risk
  • Reviewing tablespace fullness and WAL archiving or replica lag
  • Running scheduled health checks from cron or Nagios

Pricing

Open source

Free and MIT-licensed; self-hosted via npm.

DBA Checkup FAQ

Can the assistant change data or run arbitrary SQL?

No. Each statement runs in a read-only transaction through a login that cannot write, and the model selects only from fixed checks. The optional explain_query tool, available for PostgreSQL only, plans a single SELECT without running it and is off unless enabled.

Which databases are supported?

PostgreSQL and Oracle Database. The Oracle checks are tested on Oracle AI Database 26ai Free and written for 19c and later. SQL Server is listed on the roadmap.

Are credentials sent to the AI model?

The connection string is read from environment variables and is not passed through the assistant.

Which database privileges are needed?

PostgreSQL uses the built-in pg_monitor role. Oracle uses CREATE SESSION and SELECT_CATALOG_ROLE. Neither grants read access to application tables.

Is DBA Checkup free?

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

How do I add DBA Checkup to Claude Code?

Run this command in your terminal: claude mcp add dba-checkup-mcp --env DBA_CHECKUP_DATABASE_URL='<DBA_CHECKUP_DATABASE_URL>' -- npx -y dba-checkup-mcp

What are the best alternatives to DBA Checkup?

The closest alternatives to DBA Checkup are Pg Checkup, SQL Server DBA (read-only), PostgreSQL Performance (read-only), DBA Brain and Oracle.

Where this comes from

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

How AIPoweredBot checks servers