MCP server · Data and analytics
dbt MCP server
Lets an assistant run dbt commands on your project and, with a dbt platform account, explore lineage, metrics and job runs.
- Maintainer
- dbt Labs (official)
- Licence
- Apache-2.0
- Runs
- Locally (uvx)
- Sign-in
- None
- Last activity
- 2026-10-13
Overview
What it does
The dbt MCP server from dbt Labs runs locally with uvx dbt-mcp. Point DBT_PROJECT_DIR at the folder that holds dbt_project.yml and DBT_PATH at your dbt executable, and the assistant can run, build, test, compile and list models in that project. It works with dbt Core and dbt Fusion, with or without a dbt platform account.
Connecting a dbt platform account adds tools for the Semantic Layer, the Discovery API and the Admin API. The assistant can then query metrics, trace model lineage, check model health and source freshness, and list, trigger or retry jobs. SQL execution and code generation tools exist but are off by default. Environment variables such as DISABLE_DBT_CLI turn whole toolsets on or off. dbt Labs also runs a remote server for data consumption only, without CLI commands.
Tools
What the assistant can do
- dbt CLI: run, build, test, compile, parse, list, show
- Local lineage and node details from manifest.json
- Semantic Layer metrics, dimensions and metric queries
- Discovery API: models, sources, lineage and model health
- Admin API: jobs and job runs, including trigger and retry
- Codegen and SQL tools (off by default)
- dbt documentation search
Install
Install dbt MCP server in your app
You need:
- uv (provides uvx)
- A local dbt project and dbt installed
- A dbt platform account only for Semantic Layer, Discovery and Admin API tools
Run in your project. --scope local keeps the servers private to you in this project; use user for every project.
claude mcp add --env DBT_PROJECT_DIR="${DBT_PROJECT_DIR}" --env DBT_PATH="${DBT_PATH}" --scope local dbt -- uvx dbt-mcp
claude mcp add --env DBT_PROJECT_DIR="$env:DBT_PROJECT_DIR" --env DBT_PATH="$env:DBT_PATH" --scope local dbt -- uvx dbt-mcp
- Set DBT_PROJECT_DIR, DBT_PATH first, e.g. export DBT_PROJECT_DIR=… in your shell. The command saves the value, not the variable.
Project root. Commit it to share the servers with your team; each person sets the variables in their own shell.
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": [
"dbt-mcp"
],
"env": {
"DBT_PROJECT_DIR": "${DBT_PROJECT_DIR}",
"DBT_PATH": "${DBT_PATH}"
}
}
}
}
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json (Settings → Developer → Edit Config). Restart Claude after saving.
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": [
"dbt-mcp"
],
"env": {
"DBT_PROJECT_DIR": "<DBT_PROJECT_DIR>",
"DBT_PATH": "<DBT_PATH>"
}
}
}
}
- Claude Desktop doesn’t read variables in this file: replace <DBT_PROJECT_DIR>, <DBT_PATH> with the real values.
- This file contains your keys once filled in. It lives in your user folder; never commit or share it.
In your project, or ~/.cursor/mcp.json for every project.
{
"mcpServers": {
"dbt": {
"type": "stdio",
"command": "uvx",
"args": [
"dbt-mcp"
],
"env": {
"DBT_PROJECT_DIR": "${env:DBT_PROJECT_DIR}",
"DBT_PATH": "${env:DBT_PATH}"
}
}
}
}
In your workspace. VS Code asks for each secret the first time a server starts and stores it securely.
{
"inputs": [
{
"type": "promptString",
"id": "dbt-project-dir",
"description": "DBT_PROJECT_DIR",
"password": true
},
{
"type": "promptString",
"id": "dbt-path",
"description": "DBT_PATH",
"password": true
}
],
"servers": {
"dbt": {
"type": "stdio",
"command": "uvx",
"args": [
"dbt-mcp"
],
"env": {
"DBT_PROJECT_DIR": "${input:dbt-project-dir}",
"DBT_PATH": "${input:dbt-path}"
}
}
}
}
macOS/Linux: ~/.config/devin/mcp_config.json · Windows: %APPDATA%\devin\mcp_config.json. Read by the default Devin Local agent and by the legacy Cascade agent.
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": [
"dbt-mcp"
],
"env": {
"DBT_PROJECT_DIR": "${env:DBT_PROJECT_DIR}",
"DBT_PATH": "${env:DBT_PATH}"
}
}
}
}
- Devin’s docs confirm ${env:…} references for the legacy Cascade agent; for the default Devin Local agent they only document them in OAuth settings. If a server can’t authenticate, check Devin’s MCP docs.
Want it alongside other servers? Open dbt MCP Server in the MCP config generator and add the rest; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.
Before you install
- dbt CLI tools such as run and build change models and warehouse objects; dbt Labs says to enable them only for a client you trust.
- Set DISABLE_DBT_CLI=true, or use DBT_MCP_ENABLE_* allowlists, to limit the toolsets.
- Admin API tools can trigger and cancel jobs in your dbt platform account.
- A local MCP server runs with your user account’s permissions. Install it only from the source linked above. See how to choose a safe server.
Why it’s listed
Why we list it
Official, frequently released and the standard way to give an assistant real dbt project context.
Related
More MCP servers
- Grafana MCP serverLets an assistant search dashboards, query Prometheus, Loki and other data sources, and work with alerts and incidents in Grafana.
- Apify MCP ServerLets an assistant find and run Apify Actors to scrape websites, search engines, maps and social media, then read the results.
- Filesystem MCP ServerLets an assistant read, write, edit, move and search files, but only inside the folders you allow.
All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?