AgentHubAgentHub

dbt

MCP ServerMCP Registry官方收录

io.github.us-all/dbt · v1.0.3

dbt MCP — manifest/run_results/sources/catalog parsing + DQ result tables (BigQuery/Postgres)

概览

dbt 是一个MCP Server,收录自 官方 MCP Registry。支持 stdio 传输。本页提供 Cursor、Claude Code 等客户端的安装配置片段。

安装

选择你的平台查看安装方式

{
  "mcpServers": {
    "dbt": {
      "command": "npx",
      "args": [
        "-y",
        "@us-all/dbt-mcp"
      ],
      "env": {
        "DBT_PROJECT_DIR": "<DBT_PROJECT_DIR>"
      }
    }
  }
}

环境变量

DBT_PROJECT_DIR必填

Path to dbt project root (where dbt_project.yml lives).

DBT_TARGET_DIR可选

dbt target dir for manifest.json/run_results.json (default: $DBT_PROJECT_DIR/target).

DBT_RUN_HISTORY_DIR可选

Optional dir for archived run_results.json history (glob-scanned).

DQ_BACKEND可选

DQ result table backend: 'bigquery' (default) or 'postgres'.

DQ_RESULTS_TABLE可选

Fully qualified DQ checks table, e.g. 'project.data_ops.quality_checks'.

DQ_SCORE_TABLE可选

Fully qualified DQ score-daily table, e.g. 'project.data_ops.quality_score_daily'.

GOOGLE_APPLICATION_CREDENTIALS可选

Service account key path for BigQuery (ADC fallback supported).

BQ_PROJECT_ID可选

Explicit BigQuery project ID for DQ queries.

PG_CONNECTION_STRING可选secret

Postgres connection string when DQ_BACKEND=postgres.

DBT_ALLOW_WRITE可选

Reserved for future write tools. Default read-only.

DQ_SCHEMA可选

DQ result-table schema preset: 'generic' (default) or 'us-all'. Use DQ_COL_* env vars to override individual columns on top of the preset.

DQ_COL_RUN_AT可选

Override for the timestamp/date column on the DQ checks table. Default depends on DQ_SCHEMA preset.

DQ_COL_CHECK_TYPE可选

Override for the check-type column on the DQ checks table. Default 'check_type'.

DQ_COL_STATUS可选

Override for the status column on the DQ checks table. Default 'status'.

DQ_COL_DATASET可选

Override for the dataset/source column on the DQ checks table. Default depends on preset.

DQ_COL_TABLE_NAME可选

Override for the table/target-name column on the DQ checks table. Default depends on preset.

DQ_COL_SEVERITY可选

Override for the severity/dimension column on the DQ checks table. Default depends on preset.

DQ_COL_FAILURE_COUNT可选

Override for the numeric failure-count column on the DQ checks table. Default depends on preset.

DQ_COL_MESSAGE可选

Override for the message column on the DQ checks table. Default depends on preset.

DQ_COL_CHECK_NAME可选

Override for the check_name column on the DQ checks table. Set to 'none'/'null'/'-' to synthesize check_name from check_type and table_name.

DQ_COL_SCORE_DATE可选

Override for the date column on the DQ score-daily table. Default depends on preset.

DQ_COL_SCOPE可选

Override for the scope column on the DQ score-daily table. Set to 'none'/'null'/'-' if the table has no per-scope rollup.

DQ_COL_TIER可选

Override for the tier column on the DQ score-daily table. Set to 'none'/'null'/'-' if the table has no tier dimension.

DQ_TIER1_TARGET_PCT可选

When no tier column is configured (us-all preset or DQ_COL_TIER=none), the overall_score threshold dq-tier-status compares against (default 99.5). Superseded by DBT_SLA_CONFIG_PATH tier_sla.1 if both are set.

DBT_SLA_CONFIG_PATH可选

Optional path to a YAML file that defines tier_sla (per-tier overall_score targets) and dbt_sla (test/freshness pass rates). When set, dq-tier-status and dq-tier-by-source read tier targets from this file, and dbt-sla-status compares run_results / sources pass rates against dbt_sla.test_pass_pct / freshness_pass_pct. Mtime cached.

DBT_TOOLS可选

Comma-separated category allowlist (dbt,quality,meta).

DBT_DISABLE可选

Comma-separated category disablelist.

相关资源

统一 Manifest

{
  "id": "io.github.us-all/dbt",
  "type": "mcp-server",
  "version": "1.0.3",
  "displayName": "dbt",
  "description": "dbt MCP — manifest/run_results/sources/catalog parsing + DQ result tables (BigQuery/Postgres)",
  "repository": {
    "url": "https://github.com/us-all/dbt-mcp-server",
    "source": "github"
  },
  "distribution": {
    "packages": [
      {
        "registryType": "npm",
        "identifier": "@us-all/dbt-mcp",
        "version": "1.0.3",
        "transport": "stdio",
        "environmentVariables": [
          {
            "name": "DBT_PROJECT_DIR",
            "description": "Path to dbt project root (where dbt_project.yml lives).",
            "isRequired": true
          },
          {
            "name": "DBT_TARGET_DIR",
            "description": "dbt target dir for manifest.json/run_results.json (default: $DBT_PROJECT_DIR/target)."
          },
          {
            "name": "DBT_RUN_HISTORY_DIR",
            "description": "Optional dir for archived run_results.json history (glob-scanned)."
          },
          {
            "name": "DQ_BACKEND",
            "description": "DQ result table backend: 'bigquery' (default) or 'postgres'."
          },
          {
            "name": "DQ_RESULTS_TABLE",
            "description": "Fully qualified DQ checks table, e.g. 'project.data_ops.quality_checks'."
          },
          {
            "name": "DQ_SCORE_TABLE",
            "description": "Fully qualified DQ score-daily table, e.g. 'project.data_ops.quality_score_daily'."
          },
          {
            "name": "GOOGLE_APPLICATION_CREDENTIALS",
            "description": "Service account key path for BigQuery (ADC fallback supported)."
          },
          {
            "name": "BQ_PROJECT_ID",
            "description": "Explicit BigQuery project ID for DQ queries."
          },
          {
            "name": "PG_CONNECTION_STRING",
            "description": "Postgres connection string when DQ_BACKEND=postgres.",
            "isSecret": true
          },
          {
            "name": "DBT_ALLOW_WRITE",
            "description": "Reserved for future write tools. Default read-only."
          },
          {
            "name": "DQ_SCHEMA",
            "description": "DQ result-table schema preset: 'generic' (default) or 'us-all'. Use DQ_COL_* env vars to override individual columns on top of the preset."
          },
          {
            "name": "DQ_COL_RUN_AT",
            "description": "Override for the timestamp/date column on the DQ checks table. Default depends on DQ_SCHEMA preset."
          },
          {
            "name": "DQ_COL_CHECK_TYPE",
            "description": "Override for the check-type column on the DQ checks table. Default 'check_type'."
          },
          {
            "name": "DQ_COL_STATUS",
            "description": "Override for the status column on the DQ checks table. Default 'status'."
          },
          {
            "name": "DQ_COL_DATASET",
            "description": "Override for the dataset/source column on the DQ checks table. Default depends on preset."
          },
          {
            "name": "DQ_COL_TABLE_NAME",
            "description": "Override for the table/target-name column on the DQ checks table. Default depends on preset."
          },
          {
            "name": "DQ_COL_SEVERITY",
            "description": "Override for the severity/dimension column on the DQ checks table. Default depends on preset."
          },
          {
            "name": "DQ_COL_FAILURE_COUNT",
            "description": "Override for the numeric failure-count column on the DQ checks table. Default depends on preset."
          },
          {
            "name": "DQ_COL_MESSAGE",
            "description": "Override for the message column on the DQ checks table. Default depends on preset."
          },
          {
            "name": "DQ_COL_CHECK_NAME",
            "description": "Override for the check_name column on the DQ checks table. Set to 'none'/'null'/'-' to synthesize check_name from check_type and table_name."
          },
          {
            "name": "DQ_COL_SCORE_DATE",
            "description": "Override for the date column on the DQ score-daily table. Default depends on preset."
          },
          {
            "name": "DQ_COL_SCOPE",
            "description": "Override for the scope column on the DQ score-daily table. Set to 'none'/'null'/'-' if the table has no per-scope rollup."
          },
          {
            "name": "DQ_COL_TIER",
            "description": "Override for the tier column on the DQ score-daily table. Set to 'none'/'null'/'-' if the table has no tier dimension."
          },
          {
            "name": "DQ_TIER1_TARGET_PCT",
            "description": "When no tier column is configured (us-all preset or DQ_COL_TIER=none), the overall_score threshold dq-tier-status compares against (default 99.5). Superseded by DBT_SLA_CONFIG_PATH tier_sla.1 if both are set."
          },
          {
            "name": "DBT_SLA_CONFIG_PATH",
            "description": "Optional path to a YAML file that defines tier_sla (per-tier overall_score targets) and dbt_sla (test/freshness pass rates). When set, dq-tier-status and dq-tier-by-source read tier targets from this file, and dbt-sla-status compares run_results / sources pass rates against dbt_sla.test_pass_pct / freshness_pass_pct. Mtime cached."
          },
          {
            "name": "DBT_TOOLS",
            "description": "Comma-separated category allowlist (dbt,quality,meta)."
          },
          {
            "name": "DBT_DISABLE",
            "description": "Comma-separated category disablelist."
          }
        ]
      }
    ],
    "remotes": []
  },
  "dependencies": [],
  "installTargets": [
    "claude-code",
    "claude-desktop",
    "cursor",
    "vscode"
  ],
  "keywords": [],
  "provenance": {
    "origin": "official-mcp-registry",
    "originalId": "io.github.us-all/dbt",
    "originalUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.us-all%2Fdbt/versions/latest",
    "isOfficial": true,
    "status": "active"
  }
}
dbt — MCP Server 安装与配置 · AgentHub