How to set up the dbt MCP Server in Claude
- Install uv and verify your dbt executable can open your local project.
- Replace the project and executable paths in the configuration, then add it under mcpServers in Claude Desktop and restart the app.
- Start with a project metadata request before running commands against any warehouse.
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": [
"dbt-mcp"
],
"env": {
"DBT_PROJECT_DIR": "/absolute/path/to/dbt-project",
"DBT_PATH": "/absolute/path/to/dbt"
}
}
}
}Choose the setup by what you need
Use local dbt MCP to work inside a project or run dbt commands against a development target. The hosted option focuses on platform data and metadata. Its available tools depend on your account and settings, so choose the setup that exposes the work you need.
Find the source of a stale model
Ask Claude to trace a model such as reporting.orders_daily to its upstream source and explain where the source freshness threshold is defined. Review the project YAML and compare the reported upstream model names with the lineage graph. For a live check, run freshness against the development target before relying on its result.
Check paths and target first
The self-hosted server starts through uvx. Enter absolute project and dbt executable paths and check the active adapter and profile before running dbt commands. If Claude cannot find uvx, use the full executable path documented by dbt.