dbt-labs/dbt-mcp

A MCP (Model Context Protocol) server for interacting with dbt.

What it solves

It bridges the gap between AI agents and dbt (data build tool) projects. By providing a standardized interface, it allows AI agents to understand the context of a dbt project, interact with the data warehouse, and manage dbt workflows without requiring the agent to have native, deep integration with dbt's internal APIs.

How it works

The project implements a Model Context Protocol (MCP) server. This server acts as a middleware that exposes a wide array of dbt-specific tools to an MCP-aware AI client (such as Claude or Cursor). These tools allow the agent to perform actions across several categories:

  • SQL & Semantic Layer: Generating and executing SQL, and querying defined metrics and dimensions.
  • Discovery: Retrieving project metadata, lineage graphs, and model health signals.
  • dbt CLI: Executing core dbt commands like run, test, and build directly.
  • Admin API: Managing job runs, triggering jobs, and inspecting project configurations.
  • Codegen: Automating the creation of boilerplate YAML and SQL for models and sources.
  • LSP: Performing advanced SQL compilation and column-level lineage analysis.
  • Product Docs: Searching and fetching content from official dbt documentation.

Who it’s for

  • AI Agent Developers: Those building custom agents that need to interact with data transformation pipelines.
  • Data Engineers: Who want to use AI-powered IDEs or agents to help them write SQL, manage dbt projects, and automate documentation.

Highlights

  • Comprehensive Toolset: Covers everything from low-level CLI commands to high-level semantic layer queries.
  • Lineage Awareness: Provides tools to fetch full lineage graphs and trace column-level dependencies.
  • Natural Language to SQL: Includes a text_to_sql tool to generate queries based on project context.
  • Seamless Integration: Supports MCP Bundles for easier installation in compatible clients.

Related

  • Project
  • Project
  • Project
  • Project
  • Project