Dbt MCP logo

Dbt MCP

by dbt-labs

Connects AI clients to dbt projects, Semantic Layer metrics, Discovery metadata, dbt Cloud APIs, CLI workflows, and product docs.

Install Dbt MCP

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "dbt-labs-dbt-mcp": {
      "command": "uvx",
      "args": [
        "dbt-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 39 tools correctly (Today).

Overview

dbt-labs/dbt-mcp connects AI clients with dbt Core, dbt Fusion, and dbt Platform through tools for project metadata, Semantic Layer queries, SQL, and dbt CLI operations. It can inspect models, sources, lineage, health, performance, macros, exposures, and semantic resources, while also exposing dbt Platform project and job workflows. Semantic Layer tools discover metrics, dimensions, entities, saved queries, and valid dimension values before running grouped or filtered metric queries or compiling their SQL. Reach for it when an agent needs grounded access to a dbt environment, controlled dbt operations, or current dbt product documentation.

Use cases

  • Query Semantic Layer metrics by time, entity, or dimension
  • Inspect model lineage and assess downstream impact
  • Review model health, test status, and source freshness
  • Run trusted dbt CLI commands from an AI client
  • Search dbt documentation and fetch relevant page sections

Key features

  • Semantic Layer metric discovery and querying
  • dbt resource metadata and lineage inspection
  • dbt CLI execution and project validation
  • dbt Platform project and job administration
  • SQL compilation and execution
  • Code generation for dbt project files

Tools39

What Dbt MCP lets your agent do. Expand a tool for its parameters.

Verified live~21.0k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

21/21 checks healthy over the last 91d

What it can do

From the 39 tools this server returned when we ran it; 39 declare their own safety hints.

Runs commands · 3Handles credentials · 2Makes network requests · 39Read-only tools · 36
Unusual tool instructions. 7 tool descriptions contain text aimed at the AI model rather than at you (hidden instruction block). Read the tool descriptions before connecting.
Tool definitions changed on 2026-11-10. Review them if you approved this server earlier.
Network at startup2 connections
Files written at startupNone

Observed 2026-11-10 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 2Low 6

Scanned 7d ago via OSV.dev · dbt-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars618Stargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed39Callable tools this server registers over MCP.
Directory activity12 viewsConfig copies, upvotes, and views on AllMCPs.

How Dbt MCP works

What dbt-labs/dbt-mcp does

dbt-labs/dbt-mcp gives MCP-compatible AI clients access to dbt project context and operational tools across dbt Core, dbt Fusion, and dbt Platform. Its capabilities span several areas:

  • Semantic Layer discovery and querying
  • dbt project metadata and lineage
  • dbt CLI commands
  • dbt Platform Admin API operations
  • SQL generation and execution
  • dbt code generation
  • Product documentation search and retrieval

The server can expose details for models, sources, exposures, tests, seeds, snapshots, macros, and semantic models. It also reports source freshness, model health, execution history, and connected lineage graphs. Resource lookup is generally most precise when a dbt unique ID is available.

How it works

MCP tools provide structured access to the selected dbt environment. For Semantic Layer questions, an agent can first list metrics, inspect their dimensions and entities, discover valid dimension values, and then call query_metrics with grouping, ordering, and filters. get_metrics_compiled_sql produces the SQL without executing the query, which is useful for inspection or reuse elsewhere.

Discovery tools return project resources through paginated responses. Lineage can be limited by depth, direction, resource type, and node count. Upstream traversal supports dependency analysis, while downstream traversal supports impact analysis. The CLI tools operate against a local dbt project and include commands such as parsing, compiling, building, running, testing, showing SQL results, and generating documentation.

Documentation tools search and fetch Markdown pages from docs.getdbt.com. Search returns page metadata; fetching a page retrieves its content and can be limited to relevant sections with a query.

Setup and configuration

An experimental dbt-mcp.mcpb bundle is published with releases. MCPB-aware clients can import the bundle, and the repository points users to the MCPB CLI documentation for installation or inspection. The server is also intended for connection to agent products such as Claude and Cursor. Custom agents can use the repository’s examples as a starting point.

Tools and capabilities

The server includes tools for:

  • Listing and querying Semantic Layer metrics, saved queries, dimensions, entities, and dimension values
  • Inspecting models, sources, mart models, macros, exposures, tests, seeds, snapshots, and semantic models
  • Retrieving lineage, model health, model performance, source freshness, and compiled metric SQL
  • Running dbt CLI tasks and generating model, source, and staging-model code
  • Listing projects, jobs, job runs, and artifacts through the dbt Platform Admin API, including job control actions
  • Searching dbt product documentation and retrieving page content

Several older resource-specific detail tools are deprecated in favor of get_node_details, and separate model parent or child tools are deprecated in favor of get_lineage.

Limitations and notes

CLI operations can modify data models, sources, and warehouse objects, so they should be enabled only for clients and workflows that are trusted. Semantic Layer queries require valid metric, dimension, and entity names; the discovery tools should be used to establish those names first. Large result sets are paginated or may omit lower-priority fields to stay within response limits. Lineage results are bounded, and an omitted-node count indicates when the requested limit excluded matching nodes. The documentation search tool returns metadata rather than full page content; use the page-fetching tool for the actual documentation.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Dbt MCP

dbt-labs/dbt-mcp is an MCP server that connects AI clients to dbt Core, dbt Fusion, and dbt Platform. Its main tools cover dbt CLI operations, Semantic Layer metric discovery and queries, Discovery metadata and lineage, Admin API workflows, code generation, SQL, and product documentation.

Install it by importing the experimental `dbt-mcp.mcpb` bundle into an MCPB-aware client. The bundle is published with releases, and the MCPB CLI documentation covers installation and inspection. The repository also includes examples for building a custom agent connection.

Yes, dbt-labs/dbt-mcp is intended for use with Cursor. The server’s MCP tools can provide Cursor with access to dbt project metadata, Semantic Layer queries, CLI workflows, Discovery information, and other supported dbt capabilities.

Yes, it can discover and query Semantic Layer metrics. Use `list_metrics`, `get_dimensions`, and `get_entities` to identify valid query fields, then use `query_metrics` for grouped or filtered results. `get_metrics_compiled_sql` shows the generated SQL without executing it.

Yes, it provides lineage and health inspection. `get_lineage` returns bounded upstream and downstream graphs, while `get_model_health` reports model runs, tests, and upstream freshness. `get_model_performance` provides historical execution data and can include test execution history.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDbt MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/dbt-labs-dbt-mcp?style=directory)](https://allmcps.com/mcp/dbt-labs-dbt-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/dbt-labs-dbt-mcp"><img src="https://allmcps.com/api/badge/dbt-labs-dbt-mcp?style=directory" alt="Dbt MCP on AllMCPs" /></a>