MCP.so
ログイン

DBT CLI MCP Server

@MammothGrowth

基本情報

カテゴリ

データと分析

最終更新

ライセンス

MIT

トランスポート

stdio

作者

MammothGrowth

DBT CLI MCP Server について

DBT CLI MCP Server

DBT CLI MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "dbt-cli-mcp": {
      "command": "uv",
      "args": [
        "venv"
      ]
    }
  }
}

DBT CLI MCP Server のツール

8

Run dbt models (requires absolute `project_dir`)

Run dbt tests (requires absolute `project_dir`)

List dbt resources (requires absolute `project_dir`)

Compile dbt models (requires absolute `project_dir`)

Debug dbt project setup (requires absolute `project_dir`)

Install dbt package dependencies (requires absolute `project_dir`)

Load CSV files as seed data (requires absolute `project_dir`)

Preview model results (requires absolute `project_dir`)

概要

What is DBT CLI MCP Server?

The 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.

How to use DBT CLI MCP Server?

Install with Python 3.10+, uv, and dbt CLI. Clone the repository, create a virtual environment, and install dependencies. Use the command-line interface directly or configure the server in an MCP client (e.g., Claude for Desktop) using the provided JSON configuration. All tools require the absolute path to the dbt project directory.

Key features of DBT CLI MCP Server

  • Execute dbt commands through MCP tools
  • Supports run, test, compile, ls, debug, deps, seed, show
  • Configurable dbt executable path and profiles directory
  • Environment variable management for dbt projects
  • Command-line interface for direct interaction
  • Integration tests against a real dbt project

Use cases of DBT CLI MCP Server

  • AI agents running dbt models automatically
  • Debugging dbt project setup via MCP client
  • Previewing model results with dbt_show
  • Installing dbt package dependencies

よくある質問

1

What is the most critical requirement when using the DBT CLI MCP tools?

You **must** specify the full absolute path to your dbt project directory with the `project_dir` parameter. Relative paths will not work.

2

How are dbt profiles handled?

The server automatically sets `DBT_PROFILES_DIR` to the absolute path specified in `project_dir`. The project directory must contain a valid `dbt_project.yml` and a `profiles.yml` file that matches the profile referenced in the project.

3

What are the prerequisites for installation?

Python 3.10 or higher, the `uv` tool for Python environment management, and the dbt CLI installed on your system.

4

How do I configure the server for an MCP client like Claude for Desktop?

Add an entry to the client's configuration with the `uv` command, pointing to the server script, and optionally set environment variables like `DBT_PATH` or `ENV_FILE`.

5

Can I override the default dbt executable path?

Yes, via the `--dbt-path` command-line option or the `DBT_PATH` environment variable. The default is `dbt`.

コメント

「データと分析」の他のコンテンツ