What it does
The dbt MCP server, maintained by dbt Labs, provides AI agents with programmatic access to dbt projects across dbt Core, Fusion, and dbt Platform. It exposes tools organized into five areas: SQL execution and generation (including Semantic Layer queries for metrics and dimensions), project discovery (lineage, models, sources, exposures), local dbt CLI commands (run, test, build, parse), dbt Cloud job management (trigger runs, cancel, retry), and dbt Codegen utilities. Agents can generate SQL from natural language, inspect data lineage, retrieve model details and freshness status, and orchestrate dbt workflows.
Who it's for
Analytics engineers and data engineers using dbt who want to embed AI agents—like Claude—directly into their data stack. Useful for teams where agents need to author SQL, inspect project metadata, or automate routine dbt operations without human intervention.
Common use cases
- Generate SQL from plain-English descriptions using compiled project context.
- Query the dbt Semantic Layer for metrics, dimensions, and pre-defined saved queries.
- Explore lineage, upstream sources, and downstream exposures.
- Automate dbt runs, test executions, and model materialization.
- Trigger dbt Cloud jobs, monitor run status, and retrieve execution artifacts.
Setup pitfalls
- Credential exposure: Stores dbt API keys and authentication tokens; protect these in restricted environments.
- Warehouse mutations:
dbtCLI tools can modify data models and warehouse tables—only enable if you trust the AI instructions and have audit logging in place. - Embedded credentials detected: The codebase contains detected secrets; review the code and configuration before production deployment to ensure no API keys or tokens are hardcoded.
- Broad access requirements: Requires filesystem read/write access and network connectivity to dbt Cloud, increasing the attack surface if credentials are compromised.