# DBA Checkup

> DBA Checkup is an open-source MCP server for databases. Read-only PostgreSQL and Oracle health checks for AI assistants, with no free-form SQL. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/vickm26/dba-checkup-mcp
- **MCP Registry name:** io.github.vickm26/dba-checkup-mcp
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-03

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
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.

### Claude Code: Or share it with your project (.mcp.json)

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

### Claude Desktop (claude_desktop_config.json)

```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.

### Cursor (~/.cursor/mcp.json)

```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.

### VS Code (~/.copilot/mcp-config.json)

```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.

### Codex: Add with the CLI (Terminal)

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

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.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 (~/.gemini/settings.json)

```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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```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.

### Devin Desktop (~/.config/devin/mcp_config.json)

```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.

### Cline (cline_mcp_settings.json)

```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.

### Zed (Zed settings.json)

```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.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "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.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```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.

### Kiro (~/.kiro/settings/mcp.json)

```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.

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

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_query` (name suggests: reads): Returns the plan for one SELECT without running it (PostgreSQL, off by default).

## 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.

## Alternatives

- [Pg Checkup](https://ai-powered.com/mcp/pg-checkup): Pg Checkup is an open-source MCP server for databases.
- [SQL Server DBA (read-only)](https://ai-powered.com/mcp/sql-server-dba-read-only): SQL Server DBA (read-only) is an open-source MCP server for databases.
- [PostgreSQL Performance (read-only)](https://ai-powered.com/mcp/postgresql-performance-read-only): PostgreSQL Performance (read-only) is an open-source MCP server for databases.
- [DBA Brain](https://ai-powered.com/mcp/dba-brain): DBA Brain is an open-source MCP server for databases.
- [Oracle](https://ai-powered.com/mcp/oracle-3): Oracle is an open-source MCP server for databases.
- [Pg Doctor](https://ai-powered.com/mcp/pg-doctor): Pg Doctor is an open-source MCP server for databases.
- [codeDB Lens](https://ai-powered.com/mcp/codedb-lens): codeDB Lens is a free MCP server for databases.
- [Postgres](https://ai-powered.com/mcp/postgres): Postgres is an open-source MCP server for databases.

---
Source: https://ai-powered.com/mcp/dba-checkup
