What is dbt MCP Server?
The dbt MCP Server is a bridge between dbt and AI-powered interfaces, exposing dbt’s core functionality, metadata, and analytical semantics as standardized tools that can be called by LLMs and applications via the MCP. This enables users to automate, query, and manage their dbt workflows and data metrics from natural language interfaces and LLM-driven agents with fine-grained access control and consistent protocol-based integration.
How to Configure dbt MCP Server
- Install the server via the provided script:
This installs or updates dbt MCP Server in your home directory under/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/dbt-labs/dbt-mcp/refs/heads/main/install.sh)"
~/.dbt-mcp/
. - Set environment variables for required settings such as
DBT_HOST
,DBT_TOKEN
, and project-specific paths (DBT_PROJECT_DIR
, etc.). You can customize which tool groups (CLI, Semantic Layer, Discovery API) are enabled via flags likeDISABLE_DBT_CLI=false
, or configure semantic/remote features as needed. - Configure the MCP client (e.g., Claude Desktop, Cursor, VS Code) by specifying the server's command, arguments, and environment configuration. Add the server details to the respective MCP config files (
claude_desktop_config.json
,mcp.json
,settings.json
), updating the executable path for your OS.
How to Use dbt MCP Server
- Connect your MCP Client (such as Claude Desktop, Cursor, or VS Code) to the dbt MCP Server by adding its configuration in your client settings.
- Start the MCP server using the installed command with the correct arguments. The server now exposes dbt tools to your connected clients.
- From the client, invoke dbt features using natural language requests or through UI commands; the client will translate these to MCP tool calls, which are then executed by the server against your dbt project.
- Manage, monitor, or stop the server from your client's MCP interface or via the command line.
- For CLI-based usage, ensure correct environments and dependencies are set, and always review which tool groups are active.
Key Features
- Seamless, protocol-based access to dbt’s core, semantic, and discovery APIs directly from AI interfaces
- Secure execution of dbt CLI commands, semantic metric retrieval, and project metadata queries
- Fine-grained configuration and enablement of tool groups (CLI, Semantic Layer, Discovery)
- Integration-ready with modern LLM clients (Claude Desktop, Cursor, VS Code, and more)
- Lower friction for LLM agents to perform both read-only and state-altering dbt operations
- Easy installation, unified configuration, and automatic update support
Use Cases
- Enable LLM-based copilots in code editors (like VS Code or Cursor) to automate dbt workflows, such as building or testing models
- Let natural language agents fetch dbt project documentation or metadata for developer assistance or onboarding
- Power AI dashboards or chatbots with access to semantic metrics via dbt’s Semantic Layer, enabling conversational analytics
- Integrate dbt operational checkpoints (build/test/run) into automated pipelines orchestrated by LLM-driven agents
- Facilitate ad-hoc querying, model exploration, or root cause analysis from conversational UIs using dbt discovery APIs
FAQ
Q: Do I need to deploy dbt MCP Server on the same machine as my dbt project?
A: The server can be run locally or remotely, but it will require access to the relevant project files and environment. You can specify paths and environment variables to ensure it locates your dbt project correctly.
Q: Is it safe to allow LLMs to access all dbt tools via MCP?
A: Use caution; some dbt tools (like build
, run
, and test
) can alter your warehouse or models. Only enable tools you fully trust your clients to use, and prefer read-only modes (e.g., Discovery and Semantic Layer) where appropriate.
Q: How do I update the server if new versions are released?
A: Simply rerun the installation script; it will detect and update your existing dbt-mcp installation safely.
Q: Which dbt versions are supported?
A: dbt MCP Server is compatible with both dbt Core and dbt Cloud environments. Make sure your CLI path and dbt version match what is specified in your configuration.
Q: Can I selectively enable or disable certain tool groups?
A: Yes; use environment variables like DISABLE_DBT_CLI
or DISABLE_DISCOVERY
to turn features on or off at server startup.