MCP server · Data + databases

OfficialNot tested yet (sources checked)Read-writeApache-2.0Updated November 2026

dbt MCP Server

dbt Labs' server for running dbt build, run, test and show on a local project; a dbt platform account adds metrics, lineage, SQL and job tools.

Quick verdict

The right MCP server for a dbt project. Point the default target in profiles.yml at a development schema, and for read-only use give that target a warehouse role with read-only grants: disabling tools narrows what the assistant can call, but compile and docs still run the project's macros, which can execute any SQL. Keep the Admin API and SQL tools off unless needed, and turn usage tracking off if tool arguments are sensitive.

  • Maintainerdbt Labs (official)
  • Security scopeRead-write
  • Transportsstdio
  • Install channelpypi · dbt-mcp
  • EvidenceNot tested yet (sources checked)
  • LicenseApache-2.0 · Open source

The dbt MCP Server is dbt Labs' own MCP server for dbt projects. Run locally with uvx, it lets an assistant run dbt commands on a local project (build, run, test, show, compile, clone, docs, list and parse) and read the project's lineage and node details, using the local dbt executable and the warehouse connection in the user's profiles.yml; it works with dbt Core alone, with no dbt account. With a dbt platform account it adds tools for Semantic Layer metrics, Discovery API metadata and lineage, SQL execution in a development environment, and the Administrative API, which can list, trigger, retry and cancel jobs; optional tools generate source and model YAML (Codegen) and column-level lineage (Fusion). dbt run, build and clone materialise tables and views in the warehouse, and dbt marks run, build, test and clone as destructive. Tool groups can be switched off one by one or replaced with an allowlist. dbt Labs also hosts a remote version of the server on the dbt platform for querying metrics and metadata without installing anything; it has no dbt command tools. The configuration shown is dbt's CLI-only setup for a local project. Usage tracking is on by default and can be turned off.

MCP security best practices

Install dbt MCP Server

Runs locally with uv (uvx fetches dbt-mcp and a suitable Python) and needs dbt installed and a local dbt project; no dbt account is needed for the dbt command tools. Replace the two paths with your project folder (the one containing dbt_project.yml) and the output of which dbt (where dbt on Windows, written with forward slashes). In Claude Code: claude mcp add dbt -e DBT_PROJECT_DIR=/path/to/your/dbt/project -e DBT_PATH=/path/to/your/dbt/executable -- uvx dbt-mcp. Safety first: dbt run, build and clone create and replace tables in the warehouse of your profile's default target, and no tool lets the assistant choose another target, so make the default target in profiles.yml a development schema with a least-privilege warehouse role. No tool filter makes this read-only: dbt compile and dbt docs generate run the project's macros against the warehouse, and a macro that calls run_query can execute any SQL, including writes, so for read-only use give the default target a warehouse role with read-only grants. Tool filters still narrow what the assistant can call: add DISABLE_TOOLS=run,build,test,clone,show to env to turn those tools off, or allowlist named tools with DBT_MCP_ENABLE_TOOLS; do not mix the DISABLE_ and DBT_MCP_ENABLE_ styles for one toolset, and never leave an empty DBT_MCP_ENABLE_ line. Usage tracking is on by default and sends tool names and most tool arguments to dbt Labs; set DO_NOT_TRACK=1 in env to turn it off. To add dbt platform tools (Semantic Layer, Discovery, Admin API, SQL; Starter plan or above), add DBT_HOST for an OAuth sign-in, or DBT_HOST, DBT_TOKEN and DBT_PROD_ENV_ID for a token; the Admin API tools can trigger and cancel jobs, so set DISABLE_ADMIN_API=true unless you need them, and SQL tools stay off unless DISABLE_SQL=false. dbt Labs also hosts a remote server at https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/ (OAuth in public beta, or a token with an x-dbt-prod-environment-id header) for querying metrics and metadata without installing anything; it cannot run dbt commands. To freeze the tool set, pin a version: uvx dbt-mcp@2.10.1.

uvx dbt-mcp

Config entry (mcpServers)
{
  "mcpServers": {
    "dbt": {
      "command": "uvx",
      "args": [
        "dbt-mcp"
      ],
      "env": {
        "DBT_PROJECT_DIR": "/path/to/your/dbt/project",
        "DBT_PATH": "/path/to/your/dbt/executable"
      }
    }
  }
}

Credentials

NameRequiredWhat it is for
DBT_PROJECT_DIRRequiredSetting, not a secret: the full path to the dbt project folder that contains dbt_project.yml. dbt commands write their artifacts to its target folder. Warehouse credentials are not set here; dbt reads them from profiles.yml, so point the profile's default target at a development schema.
DBT_PATHRequiredSetting, not a secret: the full path to the dbt executable (dbt Core, Fusion or the dbt platform CLI), found with which dbt or where dbt. On Windows use forward slashes, for example C:/Python39/Scripts/dbt.exe.
DBT_HOSTOptionalSetting, not a secret: the dbt platform access URL hostname, for example cloud.getdbt.com or abc123.us1.dbt.com. Needed only for dbt platform tools (Semantic Layer, Discovery, Admin API, SQL); with DBT_HOST alone the server signs in with OAuth on Starter, Enterprise and Enterprise+ plans.
DBT_TOKENOptionaldbt platform personal access token or service token, for platform tools when not using OAuth. A personal access token acts with all of your dbt permissions; a service token is limited to the permission sets assigned to it (Semantic Layer Only, Metadata Only). execute_sql works only with a personal access token. Not used by the CLI-only configuration shown.
DBT_PROD_ENV_IDOptionalSetting, not a secret: the numeric production environment id, needed for Semantic Layer and Discovery tools.
DBT_ACCOUNT_IDOptionalSetting, not a secret: the numeric dbt account id, needed for Administrative API tools (which can trigger, retry and cancel jobs) and when DBT_TOKEN is a personal access token.

Verified configurations

Not run by us yet. This profile is Not tested yet (sources checked): the install channel, config entry, credentials and license were checked against the source and upstream metadata, but no configuration has been installed, discovered and executed in a recorded environment. When one is, it appears here with the eight scope dimensions below.

Best for

Analytics engineers who build dbt models and want an assistant to compile, run and test them on a development target, inspect lineage and generate source and model YAML; and, on a dbt platform plan, to query governed metrics and check job runs.

Why use it

It is dbt Labs' own server, Apache-2.0, released every week or two, and it runs the user's real dbt executable, so the assistant sees actual compile errors, test failures and lineage instead of guessing at the project. It works with dbt Core and no account, and each tool group can be disabled or allowlisted to narrow what the assistant can call.

Tradeoffs

The CLI tools are on by default and run against whatever target is the default in profiles.yml: build, run and clone create and replace warehouse tables and views, a full refresh drops and rebuilds incremental models, and dbt marks run, build, test and clone as destructive. No tool takes a target argument, so the default target decides whether the assistant touches production. Tool filters are not a read-only mode: dbt compile and dbt docs generate run the project's macros against the warehouse, and a macro that calls run_query can execute any SQL, including writes, so only the warehouse role's grants make a setup read-only. show and execute_sql run model-written SQL, and dbt says execute_sql does not block writes, so warehouse roles are the real limit. Every run spends warehouse compute. Usage tracking is on by default and sends tool names, tool arguments other than SQL and vars, error messages and account ids to dbt Labs until turned off. Semantic Layer, Discovery, Admin API and SQL need a paid dbt platform plan (Starter or above), and execute_sql needs a personal access token. Tool names and inputs change often (ten releases between September and November 2026) and dbt says they are not a contract. Query results and model text are untrusted input to the model.

Upstream state

pypi package published · repository active. Lifecycle is derived from a committed upstream snapshot at build time, never authored by hand.

Editorial details

EditorCJ ZwartLast updatedNovember 2026Sourcesdbt docs: About the dbt MCP server (self-hosted vs remote, plans, tool availability); dbt docs: Set up self-hosted MCP (uvx, CLI-only config, toolset requirements, auth, toggles); dbt docs: Run the self-hosted dbt MCP server (Claude Desktop, Claude Code, Cursor, VS Code configs); dbt docs: MCP environment variables reference (disable and enable modes); dbt docs: Available tools (execute_sql does not block writes, tools not a contract); dbt docs: Set up remote MCP (endpoint, OAuth public beta, token headers, permissions); dbt docs: MCP FAQs and troubleshooting (execute_sql credentials, least-privilege roles); dbt-labs/dbt-mcp README (tool list, dbt CLI write warning); dbt-labs/dbt-mcp LICENSE (Apache-2.0); dbt-mcp source: dbt CLI tools (destructive annotations, full refresh, no target argument); dbt-mcp source: usage tracking (fields sent, redacted arguments); PyPI: dbt-mcp; dbt docs: Administrative API (Starter, Enterprise and Enterprise+ plans); dbt docs: dbt Semantic Layer (Starter plan minimum); dbt pricing (Developer free, Starter per seat); dbt docs: run_query (runs during dbt compile and dbt docs generate, including DML unless scoped); dbt docs: compile (accesses the data platform and runs introspective queries)

Grade B: Not tested yet (sources checked). Re-review is due by 2027-02-16. Config entries, credential names and package status can change upstream; verify against the source repository before granting an agent access.

Sources

Related guides

All MCP servers →