Dbt Plan logo

Dbt Plan

Analyzes compiled dbt SQL diffs to predict schema changes, assess risk, and trace downstream breakage before warehouse execution.

Install Dbt Plan

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "dbt-plan": {
      "command": "uvx",
      "args": [
        "dbt-plan"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The dbt-plan MCP server examines compiled dbt SQL files and compares revisions to identify schema changes before `dbt run` executes them. It evaluates column additions and removals, materialization and `on_schema_change` policies, contracts, explicit cast types, and downstream references. Analysis covers Snowflake, BigQuery, Redshift, Postgres, and DuckDB through a shared path, with dialect-specific limits. Reach for dbt-plan when a change needs review without querying the target warehouse.

Use cases

  • Review compiled dbt changes before running the project
  • Find downstream models affected by dropped columns
  • Check whether materialization policies make a schema change risky
  • Inspect contract and explicit cast-type changes in a pull request

Key features

  • Compiled SQL diff analysis
  • Column-level DDL risk assessment
  • Downstream broken-reference detection
  • Contract and configuration change checks
  • SELECT * and ref() dependency resolution
  • Human-readable and JSON findings

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

7/7 checks healthy over the last 50d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · dbt-plan (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
Last commit5d agoMost recent push to the default branch.

How Dbt Plan works

What dbt-plan MCP server does

dbt-plan reviews compiled dbt SQL changes before they alter warehouse objects. It is designed for a pre-execution workflow similar to a Terraform plan: inspect the predicted effects, resolve risky findings, and only then run dbt.

The analysis focuses on schema and dependency impact. It identifies added and removed columns, evaluates whether those changes are safe for a model's materialization and on_schema_change setting, and reports configuration changes that alter those policies. It can also flag changes that an enforced contract would reject and compare explicit CAST types between revisions.

How it works

The server reads files and compares compiled SQL from different revisions rather than connecting to, or inspecting, the live warehouse. The primary workflow is dbt-plan check, which reports the number of changed models, the detected dialect, baseline information, findings, and an overall review status.

For downstream analysis, dbt-plan resolves references against the project's own compiled schema. It can identify models that directly name a removed column, downstream models whose SELECT * output changes even when their own file was untouched, and tests whose fixtures depend on the removed field. SELECT * handling includes columns from CTEs in the same statement and follows ref() into the referenced model's compiled SQL.

Findings include evidence and affected files where available. The output can distinguish safe, warning, and destructive results, explain the source and affected models, show relevant materialization settings, and identify broken-reference cascades. Full findings and graph information are available in JSON output.

Tools and capabilities

  • Detect column additions and removals from compiled SQL differences.
  • Assess schema-change risk using materialization and on_schema_change behavior.
  • Trace downstream breakage caused by dropped columns.
  • Inspect SELECT * dependencies and follow compiled ref() relationships.
  • Report enforced-contract violations in either direction.
  • Detect materialization and on_schema_change configuration changes.
  • Compare explicit CAST types across revisions.
  • Produce human-readable findings with supporting evidence and machine-readable JSON.

Limitations and notes

The analysis is file-based, so it does not verify the live warehouse state or query warehouse metadata. SQL dialect support varies across Snowflake, BigQuery, Redshift, Postgres, and DuckDB; dialect-specific analysis limits apply.

Unreadable or unresolved compiled SQL can produce warnings and reduce the certainty of downstream analysis. External consumer coverage is unknown, while declared exposures are treated as consumers. The tool reports risks before policy separately from the exit policy, so a destructive finding may require review even when a separate command policy determines the process exit status.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Dbt Plan

dbt-plan is an MCP server that connects AI clients to dbt projects' compiled SQL files and exposes the dbt-plan check analysis for column changes, risk assessment, cascade analysis, contracts, configuration changes, type changes, and SELECT * resolution. It compares revisions without querying the warehouse.

dbt-plan compares compiled SQL revisions and evaluates detected schema changes against model materialization and `on_schema_change` settings. It reports additions, removals, configuration changes, and downstream breakage with safe, warning, or destructive classifications.

No. dbt-plan reads compiled SQL files and compares revisions instead of querying the warehouse. Its conclusions depend on the compiled inputs available in the project, so unresolved or unreadable SQL can limit downstream analysis.

dbt-plan analyzes compiled SQL for Snowflake, BigQuery, Redshift, Postgres, and DuckDB. Support uses a common analysis path, but the depth of SQL dialect handling varies by warehouse.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDbt Plan AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/dbt-plan?style=directory)](https://allmcps.com/mcp/dbt-plan)
HTML Embed
<a href="https://allmcps.com/mcp/dbt-plan"><img src="https://allmcps.com/api/badge/dbt-plan?style=directory" alt="Dbt Plan on AllMCPs" /></a>