Skip to content
MCP server

dbt-plan

Predicts the DDL a dbt change will run before you run it, from compiled SQL files

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
0.18.6
Listing updated
3 days ago

About dbt-plan

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

Like terraform plan for dbt: it compares a baseline of compiled SQL with your current compile and reports what the warehouse will be asked to do, before dbt run touches anything. Findings are graded, with a model marked DESTRUCTIVE when columns are dropped and SAFE when it is a plain CREATE OR REPLACE TABLE.

The output goes beyond a label. A sample report lists added and dropped columns per model, names downstream models that read a dropped column, and prints causal explanations pointing to the compiled SQL file as evidence. Because it reads files and never connects to a warehouse, it works with Snowflake, BigQuery, Redshift, Postgres and DuckDB through one code path, though SQL dialect support varies.

Its stated design rule is that a false safe verdict never happens: if safety cannot be determined it warns, and ignore_models suppresses known noise. Settings live in .dbt-plan.yml or DBT_PLAN_* environment variables, and a ci-setup command writes a GitHub Actions workflow for pull requests.

Install

Run in a terminal

claude mcp add dbt-plan -- uvx dbt-plan

Add to claude_desktop_config.json

{
  "mcpServers": {
    "dbt-plan": {
      "command": "uvx",
      "args": [
        "dbt-plan"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "dbt-plan": {
      "command": "uvx",
      "args": [
        "dbt-plan"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "dbt-plan": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "dbt-plan"
      ]
    }
  }
}

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

{
  "mcpServers": {
    "dbt-plan": {
      "command": "uvx",
      "args": [
        "dbt-plan"
      ]
    }
  }
}

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

{
  "mcpServers": {
    "dbt-plan": {
      "command": "uvx",
      "args": [
        "dbt-plan"
      ]
    }
  }
}

What it does

Pre-run DDL prediction
Shows which columns will be added or dropped before dbt run executes.
Downstream breakage check
Flags models that read a column being dropped upstream.
No warehouse connection
Reads compiled SQL and manifest files only.
Several output formats
check supports text, GitHub and JSON formats and a --select filter.
CI workflow generator
ci-setup writes a GitHub Actions workflow that runs on every PR.
Project stats
stats reports materialization mix and which models it cannot read columns for.

Good for

  • Review a dbt pull request for dropped columns
  • Catch broken downstream refs before a production run
  • Gate dbt CI on a risk exit code
  • Audit which materializations the tool has no rule for

Pricing

Open source

Open-source Python package

Prices change. Check presentjay.github.io before you buy.

dbt-plan FAQ

Does it connect to my warehouse?

No. It reads compiled SQL and manifest files locally and never connects.

Which dialects work?

Snowflake is the default; BigQuery, Redshift, Postgres and DuckDB are covered, with support varying by dialect.

How do I silence known-safe models?

List them under ignore_models in .dbt-plan.yml or set DBT_PLAN_IGNORE_MODELS.

How is it installed?

With pip install dbt-plan; the registry lists a PyPI package that runs over stdio.

Is dbt-plan free?

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

How do I add dbt-plan to Claude Code?

Run this command in your terminal: claude mcp add dbt-plan -- uvx dbt-plan

What are the best alternatives to dbt-plan?

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

Alternatives to dbt-plan

  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