# dbt-plan

> dbt-plan is an open-source MCP server for databases. Predicts the DDL a dbt change will run before you run it, from compiled SQL files. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://presentjay.github.io/dbt-plan/
- **Repository:** https://github.com/presentjay/dbt-plan
- **MCP Registry name:** io.github.PresentJay/dbt-plan
- **Categories:** databases, developer tools
- **Listing updated:** 2026-11-14

## About

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.

## Features

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

## Install

### Claude Code (Terminal)

```sh
claude mcp add dbt-plan -- uvx dbt-plan
```

### Claude Desktop (claude_desktop_config.json)

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

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

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

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

```json
{
  "mcpServers": {
    "dbt-plan": {
      "command": "uvx",
      "args": [
        "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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/dbt-plan
