# dryrun

Hands your AI assistant the shape of a PostgreSQL database from a committed snapshot. No connection string, no credentials.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 36
- Author: boringSQL
- License: BSD-2-Clause · policy=link-only · description only; the file stays with the author
- Source: https://github.com/boringSQL/dryrun
- Updated: 2026-10-11
- HTML: https://affpapa.org/en/nevibecode/mcp/dryrun

## What it does

dryrun ships as a CLI plus an MCP server. The CLI connects to PostgreSQL once, walks the catalog — tables, indexes, constraints, partitions, functions, enums, RLS policies, triggers, extensions — and writes a snapshot to `.dryrun/history.db`. Everything after that runs offline: linting against naming and type conventions, duplicate index and circular FK detection, and migration analysis that reports which locks a DDL statement will take.

The MCP server reads the same snapshot and exposes 9 tools over stdio or SSE: schema search, query validation, plan analysis, migration checks, linting, vacuum health, and top queries captured from `pg_stat_statements`. Connect a live database and three more appear — `explain_query`, `check_drift`, `columnar_report`. Commit the snapshot to the repo and one person with database access can hand the whole team full schema context.

PostgreSQL 14 or newer is required. Older servers aren't rejected outright, but dryrun warns and skips what it can't read — planner stats in particular. Install via Homebrew, npm, or build from source with Go 1.26+; prebuilt binaries cover macOS, Linux and Windows x64.

## Requirements
- Needs: Node.js (commands run via npx)
- Works with: PostgreSQL

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add dryrun -- npx -y @boringsql/dryrun
```

### Codex

**Platform CLI**
```bash
codex mcp add dryrun -- npx -y @boringsql/dryrun
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "dryrun": {
            "command": "npx",
            "args": [
                "-y",
                "@boringsql/dryrun"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "dryrun": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@boringsql/dryrun"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add dryrun npx -y @boringsql/dryrun
```

## When to use it
- check whether a migration will lock your busiest table
- spot foreign keys missing an index
- verify column references in SQL against the real schema
- give an AI agent schema context without production credentials
- diff schema and planner stats between two snapshots

## Example prompts
- Check the snapshot and tell me if this migration is safe on PostgreSQL 16
- Lint the schema and list tables without a primary key
- Find duplicate indexes in the schema

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49845

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
