Dbt Cli MCP Server

A Model Context Protocol (MCP) server that wraps the dbt CLI tool, enabling AI coding agents to interact with dbt projects through standardized MCP

Local serverstdioPython

What is the Dbt Cli MCP MCP server?

Dbt cli mcp mcp server connects Dbt Cli MCP to AI assistants that speak the Model Context Protocol. A Model Context Protocol (MCP) server that wraps the dbt CLI tool, enabling AI coding agents to interact with dbt projects through standardized MCP tools.

What Dbt Cli MCP does

A Model Context Protocol (MCP) server that wraps the dbt CLI tool, enabling AI coding agents to interact with dbt projects through standardized MCP tools.

Key capabilities

  • Execute dbt commands through MCP tools
  • Support for all major dbt operations (run, test, compile, etc.)
  • Command-line interface for direct interaction
  • Environment variable management for dbt projects
  • Configurable dbt executable path
  • Flexible profiles.yml location configuration

Tools it exposes

Once connected, the assistant can call these 10 tools directly:

  • dbt_run — Run dbt models (requires absolute project_dir)
  • dbt_test — Run dbt tests (requires absolute project_dir)
  • dbt_ls — List dbt resources (requires absolute project_dir)
  • dbt_compile — Compile dbt models (requires absolute project_dir)
  • dbt_debug — Debug dbt project setup (requires absolute project_dir)
  • dbt_deps — Install dbt package dependencies (requires absolute project_dir)
  • dbt_seed — Load CSV files as seed data (requires absolute project_dir)
  • dbt_show — Preview model results (requires absolute project_dir)
  • Prerequisites — The Prerequisites tool exposed by this server
  • Setup — The Setup tool exposed by this server

Installing the dbt cli mcp mcp server

Setup follows the standard MCP pattern: clone or install the server, then register it in your client's configuration file and restart the client. The configuration snippets on this page cover Claude Desktop, Claude Code and Cursor.

Configuration

The server reads 2 environment variables: DBT_PATH, ENV_FILE. Keep credentials in your client's env block or a secrets manager rather than committing them.

Requirements

  • Python 3.10 or higher - uv tool for Python environment management - dbt CLI installed

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Dbt Cli MCP sits in that group, and the shape of its toolset — dbt_run, dbt_test, dbt_ls among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • With 10 tools exposed, expect a noticeable bump in prompt size — disable it in projects that never use Dbt Cli MCP.
  • Maintained by MammothGrowth, written in Python.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the dbt cli mcp mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
dbt_runRun dbt models (requires absolute project_dir)
dbt_testRun dbt tests (requires absolute project_dir)
dbt_lsList dbt resources (requires absolute project_dir)
dbt_compileCompile dbt models (requires absolute project_dir)
dbt_debugDebug dbt project setup (requires absolute project_dir)
dbt_depsInstall dbt package dependencies (requires absolute project_dir)
dbt_seedLoad CSV files as seed data (requires absolute project_dir)
dbt_showPreview model results (requires absolute project_dir)
PrerequisitesThe Prerequisites tool exposed by this server.
SetupThe Setup tool exposed by this server.

How to install the Dbt Cli MCP MCP server

{
  "mcpServers": {
    "dbt": {
      "command": "uv",
      "args": ["--directory", "/path/to/dbt-cli-mcp", "run", "src/server.py"],
      "env": {
        "DBT_PATH": "/absolute/path/to/dbt",
        "ENV_FILE": ".env"
        // You can also set DBT_PROFILES_DIR here for a server-wide default
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Python 3.10 or higher - uv tool for Python environment management - dbt CLI installed
VariableDescriptionRequired
DBT_PATHFilesystem location the server is allowed to use.Optional
ENV_FILEConfiguration value read at startup.Optional

Example prompts to try

  • Use Dbt Cli MCP to dbt run.
  • Use Dbt Cli MCP to dbt test.
  • Use Dbt Cli MCP to dbt ls.

Frequently asked questions

It connects Dbt Cli MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 10 tools (dbt_run, dbt_test, dbt_ls, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Dbt Cli MCP directly.