Skip to content
MCP server

dryrun

Offline PostgreSQL schema, query-stat and migration-safety server for AI assistants

Runs locallyStatus and history
Pricing
Open source
Platforms
CLI
Runs
Locally
Version
0.23.0
Listing updated
3 days ago

About dryrun

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

Where many Postgres MCP servers want a live connection, dryrun reads a committed snapshot instead. Someone with database access runs dryrun init once, which captures the catalogue and pg_stat_statements into a local history database. After that, agents, IDEs and CI runners work offline without a connection string or credentials.

The site says it works with RDS, Aurora, Cloud SQL, AlloyDB, Azure Database for PostgreSQL, Neon and Supabase, installs nothing server-side, and needs only a login role with pg_read_all_data and pg_read_all_stats. It refuses to read through a superuser role unless you insist. Parameter values in captured queries are never stored.

Tools return actions rather than commentary: a corrected query, the safe form of a migration as runnable SQL, join paths and delete order, or a table's CREATE TABLE. Migration checks report lock type, duration and rewrite risk. Linting has 20+ convention rules and 13 structural audits. The site counts 14 offline tools, with three more (live EXPLAIN, drift check, columnar report) when a connection is supplied. dryrun setup writes the config for Claude Code, Cursor, Codex and Zed.

Install

Run in a terminal

claude mcp add dryrun -- npx -y @boringsql/dryrun

Add to claude_desktop_config.json

{
  "mcpServers": {
    "dryrun": {
      "command": "npx",
      "args": [
        "-y",
        "@boringsql/dryrun"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "dryrun": {
      "command": "npx",
      "args": [
        "-y",
        "@boringsql/dryrun"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "dryrun": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@boringsql/dryrun"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "dryrun": {
      "command": "npx",
      "args": [
        "-y",
        "@boringsql/dryrun"
      ]
    }
  }
}

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

{
  "mcpServers": {
    "dryrun": {
      "command": "npx",
      "args": [
        "-y",
        "@boringsql/dryrun"
      ]
    }
  }
}

Tools this server provides (7)

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

validate_query
Returns a corrected query after checking it against the schema.
check_migration
Returns the safe form of a migration as runnable SQL.
find_related
Returns the JOIN and the delete order for related tables.
describe_table
Returns a table's CREATE TABLE.
explain_query
Live EXPLAIN, available when a database is connected.
check_drift
Compares the snapshot against the live database.
columnar_report
AlloyDB columnar report, available with a connection.

What it does

Offline schema snapshots
Captures the catalogue once so agents never need production credentials.
Migration guardrail
Reports lock type, duration and rewrite risk, with a safer SQL form.
Query validation
Parses SQL and checks columns against the real schema.
Linting and audits
20+ convention rules and 13 structural checks such as duplicate indexes.
Query stats diffing
Collapses ORM variants into shapes and diffs captures to find slowed queries.
One-step agent setup
dryrun setup writes MCP config for Claude Code, Cursor, Codex and Zed.

Good for

  • Catch an ALTER TABLE that rewrites a busy table during review
  • Give a coding agent accurate table, index and constraint context
  • Spot unused or duplicate indexes from captured counters
  • Compare schema and query workload between two snapshots in CI

Pricing

Open source

Prices change. Check boringsql.com before you buy.

dryrun FAQ

Does it need a database connection?

Not for the offline tools. Three extra tools, live EXPLAIN, drift check and columnar report, register when a connection is given.

What permissions does the capture need?

A login role with pg_read_all_data and pg_read_all_stats; no superuser.

Which hosts work?

The site lists RDS, Aurora, Cloud SQL, AlloyDB, Azure, Neon and Supabase.

Is it open source?

The site describes it as open source.

Is dryrun free?

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

How do I add dryrun to Claude Code?

Run this command in your terminal: claude mcp add dryrun -- npx -y @boringsql/dryrun

What are the best alternatives to dryrun?

The closest alternatives to dryrun are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to dryrun

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools