# dbt-lineage

> dbt-lineage is an MCP server for analytics and data. Parse a dbt project to show model and column lineage, downstream impact and test ideas. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, VS Code, Linux, macOS, Windows
- **Repository:** https://github.com/sipemu/dbt-lineage-viewer
- **MCP Registry name:** io.github.sipemu/dbt-lineage
- **Categories:** [analytics and data](https://ai-powered.com/categories/analytics-and-data), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

No warehouse connection, Python or `dbt compile` is needed: it reads your SQL with a Jinja-aware lexer, optionally using manifest.json for column metadata and materializations. Column lineage comes from an AST-based analyzer built on sqlparser, with a regex fallback for dialect-specific syntax. The README also warns that dependencies that only appear after Jinja renders can be missed, and offers a `verify` command to measure that against dbt's own manifest.

The MCP server is one front end to a larger CLI. The same engine posts pull-request comments with lineage diffs and rebuild selectors, runs in VS Code and a terminal UI, and exports dashboards from BI tools as dbt exposures. Over MCP it exposes 10 tools, resources such as model SQL and lineage diagrams, and six prompts including review-impact and propose-tests.

It is a Rust program installed with cargo, pip or brew, and `dbt-lineage mcp` starts the stdio server.

## Features

- **Impact scoring:** Ranks downstream impact as Critical, High, Medium or Low.
- **Column lineage:** Traces columns through aliases, joins, aggregations and CTEs.
- **Test proposals:** propose_test suggests tests for models and columns.
- **Git diffing:** Compares lineage between refs and emits a minimal dbt selector.
- **Prompts and resources:** Ships prompts like review-impact and resources for SQL and diagrams.
- **No dbt run required:** Parses SQL directly, with a verify command to check accuracy.

## Good for

- Check what a dbt change breaks before merging
- Trace where a column comes from and where it flows
- Find the minimal set of models to rebuild
- Get an agent to propose tests for a model
- Onboard to an unfamiliar dbt project

## Tools

From the tool list in its README, going by the names, 3 of 10 tools read data; 7 names don't say. From the server's own tool labels and tool names; not verified by us.

- `summary`: Project overview with counts and top fan-out.
- `search_models` (name suggests: reads): Searches models.
- `lineage`: Returns model lineage.
- `impact`: Shows downstream impact with severity.
- `get_model_details` (name suggests: reads): Returns details for a model.
- `read_model_sql` (name suggests: reads): Reads a model's SQL.
- `column_upstream`: Traces a column upstream.
- `column_downstream`: Traces a column downstream.
- `lineage_bundle`: Returns a bundled lineage view.
- `propose_test`: Proposes tests for a model or column.

## FAQ

### Does dbt-lineage need a warehouse connection?

No. The registry entry and README say it needs no warehouse, no Python and no dbt compile.

### How accurate is the dependency detection?

It reads SQL without rendering Jinja, so some dependencies can be missed. The verify command compares results against a manifest.json from dbt parse.

### How many MCP tools are there?

Ten: summary, search_models, lineage, impact, get_model_details, read_model_sql, column_upstream, column_downstream, lineage_bundle and propose_test.

### How do I install dbt-lineage?

Via pip install dbt-lineage-cli, brew install sipemu/tap/dbt-lineage or cargo binstall dbt-lineage; then run dbt-lineage mcp.

### What are the best alternatives to dbt-lineage?

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

## Where this comes from

- Description: written from the project's README.

## 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.
- [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.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.

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