Give coding agents access to dbt lineage and metrics
Connect the dbt MCP server so agents can look up models, lineage and metric definitions before writing SQL or changes.
DifficultyIntermediate
Setup time1-2 hours
CategoryData & analytics
The use case
Agents writing SQL against a warehouse do not know which model is the trusted one or how a metric is defined. The dbt MCP server exposes project metadata, lineage, the semantic layer and dbt commands to agents such as Claude or Cursor. An analyst can ask which models feed a dashboard, or have the agent pull a governed metric instead of writing raw SQL. Engineers can have it check downstream impact before changing a model. Keep command execution limited; let people run builds against production.
Example workflow
- Install the dbt MCP server and connect your project
- Allow metadata and semantic layer tools
- Ask about lineage, models or metrics
- Use governed metrics instead of hand-written SQL
- Run builds yourself after reviewing changes
Tools
- dbt MCP server
- dbt
- Claude
- Cursor
Risks and guardrails
- Disable or gate tools that run dbt commands on production
- Metadata can expose sensitive table names; scope access
- Agents may still write raw SQL; ask for semantic layer queries
Sources
Written by Agents Lookup. Credits and official pages for the tools this use case names:
- dbt Labs on GitHub: dbt MCP server: github.com/dbt-labs/dbt-mcp
- dbt MCP server (official page): github.com/dbt-labs/dbt-mcp (checked 2026-11-09)
- Claude (official page): claude.ai (checked 2026-11-09)
- Cursor (official page): cursor.com (checked 2026-11-09)