How to Connect dbt Projects to AI Workflows with the MCP Server

Unlock governed analytics and automation by connecting your dbt project to AI workflows using the dbt MCP server. Learn installation steps, integration tips, and how Apidog fits into seamless API development for data-driven teams.

Ashley Goolam

Ashley Goolam

16 January 2026

How to Connect dbt Projects to AI Workflows with the MCP Server

Are you looking to empower your AI tools with governed, production-ready data? Discover how the dbt MCP server bridges dbt projects and AI systems, enabling API and backend teams to automate, explore, and query data—securely and efficiently.

💡 Need an API testing platform that generates beautiful API Documentation? Want your team to collaborate in an integrated, all-in-one workspace for maximum productivity? Try Apidog—a more affordable Postman alternative that centralizes your API lifecycle.

button

What Is dbt and Why Do Developers Use It?

dbt (data build tool) is a powerful, open-source framework for data transformation. It enables engineering teams to:

Think of dbt as the foundation for modern data engineering, making your analytical datasets clean, well-documented, and reliable.


Introducing the dbt MCP Server

The dbt MCP server is an open-source, experimental server that connects your dbt project to AI-powered tools and workflows. MCP (Model Context Protocol) lets AI systems—like Claude Desktop and Cursor—access your dbt project’s metadata, documentation, and semantic layer.

With this server, AI agents and business users can:

This seamless bridge gives your AI tools secure, real-time visibility into your data warehouse.

model context protocal


Key Benefits of the dbt MCP Server

Why should engineering and data teams consider the dbt MCP server?


How the dbt MCP Server Supercharges AI Workflows

For API developers and backend engineers, connecting dbt to AI tools unlocks several powerful capabilities:

dbt mcp server architecture


Step-by-Step Guide: Installing the dbt MCP Server

Ready to integrate dbt and AI? Follow these steps:

Prerequisites

Before you begin, ensure you have:

1. Clone the dbt MCP Repository

git clone https://github.com/dbt-labs/dbt-mcp.git
cd dbt-mcp

This will fetch the code and place you in the project directory.

2. Install Python Dependencies

With uv and Task ready, run:

task install

This command sets up a virtual environment and installs all required packages.

3. Configure Environment Variables

Copy the sample configuration and edit as needed:

cp .env.example .env

Open .env and set these variables:

You can also enable/disable tool groups (e.g., Semantic Layer, Discovery) by setting corresponding variables.

4. Launch the dbt MCP Server

From the dbt-mcp directory, start the server:

task start

The server is now ready for connections from MCP-compatible clients.

5. Connect MCP-Enabled Clients

For Claude Desktop

Add the following to claude_desktop_config.json (replace <path-to-.env-file>):

{
  "mcpServers": {
    "dbt-mcp": {
      "command": "uvx",
      "args": ["--env-file", "<path-to-.env-file>", "dbt-mcp"]
    }
  }
}

Check logs at ~/Library/Logs/Claude (Mac) or %APPDATA%\Claude\logs (Windows) for troubleshooting.

using the dbt mcp server in claude

For Cursor

Follow Cursor’s MCP documentation and input the config as above.

For VS Code

  1. Open Settings (Cmd + ,) and select Workspace or User tab.
  2. For WSL: Use the Remote tab via Command Palette (F1) or Settings editor.
  3. Enable “Mcp” under Features → Chat.
  4. Click “Edit in settings.json” under “Mcp > Discovery” and add:
{
  "mcp": {
    "inputs": [],
    "servers": {
      "dbt": {
        "command": "uvx",
        "args": ["--env-file", "<path-to-.env-file>", "dbt-mcp"]
      }
    }
  }
}

Manage servers via the Command Palette (Ctrl + Cmd + P) with the “MCP: List Servers” command.

enable mcp in vs code

Troubleshooting


What Tools Does the dbt MCP Server Support?

The dbt MCP server enables:

Caution: Commands such as run and build can modify production data—use with care and proper permissions.


Conclusion: Empower Your AI Workflows with Secure, Governed Data

The dbt MCP server opens the door for API and backend teams to connect AI tools directly to trusted, documented data. You get automated data discovery, querying, and pipeline management—all governed by your dbt project's standards.

Looking to further streamline your API development and testing? Apidog offers a comprehensive solution for API documentation, team productivity, and is a robust alternative to Postman at a better value.

button

Explore more

Awesome Claude Code Skills for Coding & Development

Awesome Claude Code Skills for Coding & Development

This guide explores Claude Code Skills for coding and development, showing how to install, use, and integrate them into real workflows—from code reviews to API testing—while boosting productivity with tools like Apidog.

16 January 2026

Awesome Claude Code Skills for Document Processing

Awesome Claude Code Skills for Document Processing

A technical guide to Claude Code Skills for document processing, covering Word, PDF, PowerPoint, and Excel automation with practical integration examples across Claude.ai, CLI, and API.

16 January 2026

Awesome Claude Code Skills for Design

Awesome Claude Code Skills for Design

Discover key Claude Code Skills for design, how they empower visual workflows, asset generation, theme application, and integration via Claude.ai, Claude Code CLI, or API.

16 January 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs