The dbt MCP Server exposes a dbt project to AI agents over the Model Context Protocol (MCP). It covers dbt Core, dbt Fusion, and dbt Platform, and groups its tools by the surface they reach: the Semantic Layer, the Discovery API, the dbt command line, the Administrative API, code generation, the Fusion language server, and the product documentation site.
Semantic Layer tools query metrics rather than raw tables: an agent can list metrics and saved queries, fetch the dimensions, entities, and dimension values available for a set of metrics, compile a metric query to SQL without running it, or execute one with filters and grouping. Two SQL tools run on dbt Platform infrastructure, one executing SQL with Semantic Layer support and one generating SQL from a natural-language question using project context.
Discovery tools read project metadata: all models, sources with freshness status, macros, exposures, full lineage graphs with type and depth filters, node details for any resource type, model health signals from run status, tests and source freshness, execution history, and semantic search for related models. The command-line tools run build, run, test, compile, parse, list, show, clone, and docs, and the server notes that granting these lets a client modify data models, sources, and warehouse objects.
Administrative tools cover dbt Platform jobs — listing projects, jobs, and runs, reading job configuration, run details, artifacts, and errors, then triggering, retrying, or cancelling a run. Codegen tools generate source YAML by introspecting database schemas, model YAML with columns, and staging model SQL from a source table. An experimental MCP Bundle is published with each release so bundle-aware clients can import the server without extra setup.
Features
- SQL execution: executesql on dbt Platform infrastructure with Semantic Layer support, and textto_sql from a natural-language question
- Semantic Layer: list metrics and saved queries, fetch dimensions, entities, and dimension values, compile or run metric queries
- Discovery: models, sources, macros, exposures, and node details, plus semantic search for related models
- Lineage: full ancestor and descendant graphs with type and depth filtering, from the platform or a local manifest.json
- Model health and performance: run status, test results, upstream source freshness, and execution history per model
- dbt commands: build, run, test, compile, parse, list, show, clone, and docs through the MCP tool surface
- Administrative API: list projects, jobs, runs, and artifacts, read run errors, and trigger, retry, or cancel a run
- Codegen: generated source YAML, model YAML with columns, and staging model SQL
- Column-level lineage: Fusion-engine tools that compile SQL in project context and trace column lineage locally or on the platform
- Product docs: search docs.getdbt.com and fetch full Markdown page content by path or URL
- MCP Bundle: an experimental dbt-mcp.mcpb published per release for bundle-aware clients
