Is the dbt MCP server safe? What it can reach
What the dbt MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.
dbt Labs maintains the official dbt MCP server, which runs locally with uvx and can also be used as a hosted remote server. The local server can run dbt build and run against your warehouse, trigger jobs on dbt platform, and execute SQL. Turn off toolsets you do not need with the DISABLE_ and DBT_MCP_ENABLE_ variables.
Who maintains it
| Implementation | Kind | Status |
|---|---|---|
| dbt MCP server (dbt-labs/dbt-mcp) | Official | active |
It runs as a local process on your machine or as a hosted remote server.
How it signs in
Local use takes a dbt platform personal access token or service token in DBT_TOKEN, or OAuth with only DBT_HOST. The dbt CLI tools use your local dbt setup and its warehouse credentials. execute_sql needs a personal access token, and service tokens do not work for it.
What its tools can do
| Kind | Tools |
|---|---|
| Read | text_to_sql, get_dimension_values, get_dimensions, get_entities, get_metrics_compiled_sql, list_metrics, list_saved_queries, get_all_macros, get_all_models, get_all_sources, get_exposures, get_lineage, get_mart_models, get_model_health, get_model_performance, get_node_details, get_related_models, search, search_public_mesh_models, compile, parse, list, get_lineage_dev, get_node_details_dev, list_projects, list_jobs, list_jobs_runs, get_job_details, get_job_run_details, get_job_run_error, list_job_run_artifacts, get_job_run_artifacts, fusion.compile_sql, fusion.get_column_lineage, get_column_lineage, search_product_docs, get_product_doc_pages, get_mcp_server_branch, get_mcp_server_version |
| Write | show, query_metrics, test, docs, clone, generate_model_yaml, generate_source, generate_staging_model |
| Can’t be undone | execute_sql, build, run, trigger_job_run, retry_job_run, cancel_job_run |
Names come from the README. Deprecated discovery tools such as get_model_details are left out. The README says the SQL and codegen toolsets are off by default, though the dbt docs list DISABLE_SQL and DISABLE_DBT_CODEGEN as defaulting to true, so check your version. The remote server leaves out the dbt CLI and codegen tools. execute_sql, show and query_metrics run queries, so they can cost warehouse credits.
Built-in limits
| Option | What it does |
|---|---|
DISABLE_DBT_CLI, DISABLE_SEMANTIC_LAYER, DISABLE_DISCOVERY, DISABLE_ADMIN_API, DISABLE_SQL, DISABLE_DBT_CODEGEN, DISABLE_LSP | Switch off a whole toolset. DISABLE_SQL and DISABLE_DBT_CODEGEN default to true per the dbt docs. |
DBT_MCP_ENABLE_* variables | An allowlist mode: enable only the toolsets you name, such as DBT_MCP_ENABLE_DISCOVERY. Do not mix enable and disable variables for the same toolset. |
DISABLE_TOOLS / DBT_MCP_ENABLE_TOOLS | Comma-separated tool names to turn off or to allow. DBT_MCP_ENABLE_TOOLS wins over every other setting. |
Service token permission sets | For shared or CI use, assign the Semantic Layer Only and Metadata Only permission sets. |
README warning | dbt Labs says to allow dbt CLI commands only for a client you trust, because they can modify models, sources and warehouse objects. |
The risks
- build and run materialize models in your warehouse, so an injected instruction could rebuild or overwrite production tables if your dbt target points at them.
- trigger_job_run, retry_job_run and cancel_job_run act on dbt platform jobs with the token’s rights, so they can start expensive runs or stop a scheduled production job.
- execute_sql and show send queries to your warehouse, and a personal access token ties them to your own data access.
- The generate_ tools write YAML and SQL files into your project, which a later commit can carry along.
Limit it in Claude Code
Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:
claude mcp add --env DBT_HOST=... --env DBT_TOKEN=... --env DBT_PROJECT_DIR=... --env DBT_PATH=... --env DBT_PROD_ENV_ID=... dbt -- uvx dbt-mcpClaude Code names MCP tools mcp__dbt__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:
{
"permissions": {
"deny": [
"mcp__dbt__execute_sql",
"mcp__dbt__trigger_job_run",
"mcp__dbt__retry_job_run",
"mcp__dbt__cancel_job_run"
],
"ask": [
"mcp__dbt__build",
"mcp__dbt__run",
"mcp__dbt__show",
"mcp__dbt__query_metrics",
"mcp__dbt__test",
"mcp__dbt__docs",
"mcp__dbt__clone",
"mcp__dbt__generate_model_yaml",
"mcp__dbt__generate_source",
"mcp__dbt__generate_staging_model"
]
}
}Limit it in Codex
Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:
[mcp_servers.dbt]
command = "uvx"
args = ["dbt-mcp"]
env_vars = ["DBT_HOST", "DBT_TOKEN", "DBT_PROJECT_DIR", "DBT_PATH", "DBT_PROD_ENV_ID"]
disabled_tools = ["execute_sql", "trigger_job_run", "retry_job_run", "cancel_job_run"]Checklist
- Use DBT_MCP_ENABLE_* to turn on only discovery and the semantic layer first.
- Point the dbt target at a dev schema, never production.
- Give a shared setup a service token with the Metadata Only permission set.
- Deny the job tools unless the agent has to run jobs.
Checked against the vendor documentation on November 25, 2026. dbt-labs/dbt-mcp README · dbt docs: About dbt MCP · dbt docs: Set up the local MCP server
What Excellent covers
Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server
Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing