dbt MCP Server

Databasestdiov0.5.0
代码仓库

Official dbt Labs MCP server for analytics engineering workflows. Lets AI agents run dbt commands (build, run, test), inspect models and lineage via the dbt project, and query the Semantic Layer and Discovery API in dbt Cloud. Useful for transforming data, validating models, and answering metric questions grounded in governed definitions.

连接

将此配置添加到 .claude/mcp.json

{
  "mcpServers": {
    "dbt": {
      "command": "uvx",
      "args": [
        "dbt-mcp"
      ],
      "env": {
        "DBT_HOST": "<YOUR_DBT_HOST>",
        "DBT_TOKEN": "<YOUR_DBT_TOKEN>",
        "DBT_PROJECT_DIR": "<YOUR_DBT_PROJECT_DIR>"
      }
    }
  }
}

工具 (2)

run_models

Run dbt models with optional selectors and return execution results.

{
  "type": "object",
  "properties": {
    "select": {
      "type": "string",
      "description": "dbt node selection syntax (e.g., a model or tag)"
    }
  }
}

query_metrics

Query the dbt Semantic Layer for governed metrics and dimensions.

{
  "type": "object",
  "required": [
    "metrics"
  ],
  "properties": {
    "metrics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Metric names to query"
    },
    "group_by": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dimensions to group by"
    }
  }
}

资源

此服务器未提供任何资源。

提示词

此服务器未提供任何提示词。

服务器信息

作者
dbt Labs (@dbt-labs)
代码仓库
https://github.com/dbt-labs/dbt-mcp
许可证
Apache-2.0
版本
0.5.0
星标
640
最后更新
2026年7月9日