# dbt-mcp — dbt Context MCP Server for Agents > Give AI agents structured access to dbt project context and tools (SQL, semantic layer, docs search). Ships an experimental MCP bundle in releases. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use 1. Install / run: ```bash gh release download -R dbt-labs/dbt-mcp -p dbt-mcp.mcpb ``` 2. Start / smoke test: ```bash Import the `dbt-mcp.mcpb` bundle into an MCPB-aware client, then connect it to your dbt environment. ``` 3. Verify: - Call a read-only tool first (e.g., list/search) and confirm it returns your project resources before enabling CLI tools. ## Intro Give AI agents structured access to dbt project context and tools (SQL, semantic layer, docs search). Ships an experimental MCP bundle in releases. - **Best for:** Analytics engineering teams who want an agent to answer dbt questions with real project context, not guesswork - **Works with:** dbt Core/Fusion/Platform workflows + MCP clients (per dbt docs) - **Setup time:** 15 minutes ## How to Use It Well - Setup time ~15 minutes (download bundle + wire credentials + connect) - GitHub stars + forks (verified): see Source & Thanks - Tools span SQL, semantic layer queries, and docs search (see README tool list) When agents answer data questions, the failure mode is hallucinating models, columns, or semantics. dbt-mcp is a way to ground answers in your dbt project artifacts and (optionally) your dbt platform APIs—so the agent can cite real entities. ### FAQ **Q: Is it read-only?** A: It includes both read-only context tools and CLI-like operations. Start with read-only and expand intentionally. **Q: Do I need dbt Cloud/Platform?** A: The README mentions supporting multiple dbt environments; confirm which mode you run and configure accordingly. **Q: How do I keep it safe?** A: Use least-privilege credentials, separate dev/prod targets, and require human confirmation for any write-like operation. ## Source & Thanks > Source: https://github.com/dbt-labs/dbt-mcp > License: Apache-2.0 > GitHub stars: 559 · forks: 117 --- ## 快速使用 1. 安装 / 运行: ```bash gh release download -R dbt-labs/dbt-mcp -p dbt-mcp.mcpb ``` 2. 启动 / 冒烟测试: ```bash Import the `dbt-mcp.mcpb` bundle into an MCPB-aware client, then connect it to your dbt environment. ``` 3. 验证: - Call a read-only tool first (e.g., list/search) and confirm it returns your project resources before enabling CLI tools. ## 简介 为 AI agent 提供结构化的 dbt 项目上下文与工具能力(SQL、语义层、文档搜索等),并在 release 中提供 `dbt-mcp.mcpb` bundle 便于导入,减少手工配置。 - **适合谁:** 希望 agent 基于真实 dbt 项目上下文回答问题、而不是瞎猜的分析工程团队 - **可搭配:** dbt Core/Fusion/Platform 工作流 + MCP 客户端(以 dbt 文档为准) - **准备时间:** 15 分钟 ## 实战建议 - 接入约 15 分钟(下载 bundle + 配凭据 + 连接) - GitHub stars + forks(已核验):见「来源与感谢」 - 工具覆盖 SQL、语义层查询、文档搜索(见 README 工具列表) Agent 做数据相关问答时,最常见的失败模式是“编模型/编字段/编语义”。dbt-mcp 的价值在于把回答锚定在真实的 dbt 项目产物上,并(可选地)连接到平台 API,让 agent 以真实实体为依据进行检索与解释。 ### FAQ **它是只读的吗?** A: 既有只读上下文工具,也可能包含偏“CLI 操作”的能力。建议先只开只读,再按需逐步放开。 **必须用 dbt Cloud/Platform 吗?** A: README 描述支持多种 dbt 环境;请按你实际运行方式配置并核对权限。 **怎么保证安全?** A: 用最小权限凭据、区分 dev/prod 目标,并对任何可能改动资源的操作加人工确认。 ## 来源与感谢 > Source: https://github.com/dbt-labs/dbt-mcp > License: Apache-2.0 > GitHub stars: 559 · forks: 117 --- Source: https://tokrepo.com/en/workflows/dbt-mcp-dbt-context-mcp-server-for-agents Author: MCP Hub