drio
Open app

DBT CLI MCP Server

Source

DBT CLI MCP Server

Catalog onlyCatalog onlySTDIO

Overview

DBT CLI MCP Server is 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.

To use the DBT CLI MCP Server, clone the repository, set up a Python virtual environment, install dependencies, and run dbt commands through the command-line interface or directly using Python.

  • 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
  1. Running dbt models in a standardized way.
  2. Testing dbt projects efficiently.
  3. Managing dbt project configurations through environment variables.

Add to your AI client

Use these steps to connect DBT CLI MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "dbt-cli-mcp-mammothgrowth": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dbt-cli-mcp-mammothgrowth"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "dbt-cli-mcp-mammothgrowth": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dbt-cli-mcp-mammothgrowth"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "dbt-cli-mcp-mammothgrowth": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dbt-cli-mcp-mammothgrowth"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "dbt-cli-mcp-mammothgrowth": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dbt-cli-mcp-mammothgrowth"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "dbt-cli-mcp-mammothgrowth": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dbt-cli-mcp-mammothgrowth"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "dbt-cli-mcp-mammothgrowth": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dbt-cli-mcp-mammothgrowth"
      ]
    }
  }
}

FAQ

What are the prerequisites for using DBT CLI MCP Server?

You need Python 3.10 or higher, the `uv` tool for Python environment management, and dbt CLI installed.

How do I run dbt commands?

Use the command-line interface provided by the server, e.g., `dbt-mcp run --models customers --project-dir /path/to/project`.

Can I configure the dbt executable path?

Yes, you can set the `--dbt-path` option to specify the path to the dbt executable.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3021,"uuid":"e8ca67b3-af7c-4381-adcd-cb3cd2509045","name":"dbt-cli-mcp","title":"DBT CLI MCP Server","description":"DBT CLI MCP Server","avatar_url":"https://avatars.githubusercontent.com/u/34587167?v=4","created_at":"2025-03-17T02:30:11.433Z","updated_at":"2025-03-19T22:12:48.609Z","status":"created","author_name":"MammothGrowth","author_avatar_url":"https://avatars.githubusercontent.com/u/34587167?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/MammothGrowth/dbt-cli-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"6\",\"license\":\"MIT license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-04-10 12:49:43\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]