
dbt MCP Server: Setup for Claude, Cursor and Other Apps
Lets Claude, Cursor and other assistants explore your dbt models, metrics and lineage, query data, and run dbt commands.
This is dbt Labs' own server for dbt Core, dbt Fusion and the dbt platform. Run it on your machine with uvx to work on a local dbt project, with or without a dbt platform account. dbt also offers a hosted remote version for querying and exploring metadata with no install, but not for running dbt commands. The command-line tools can change your models and warehouse objects, so only connect it to an assistant you trust.
Good for
- Analytics engineers who write and test dbt models with an assistant
- Data teams who ask questions of governed metrics
- Platform owners who watch dbt jobs and runs
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install dbt MCP
Claude Code
- 1
Copy this prompt.
Add the dbt MCP server to Claude Code. Run this command: claude mcp add dbt -e DBT_PROJECT_DIR=/path/to/your/dbt/project -e DBT_PATH=/path/to/your/dbt/executable -- uvx dbt-mcp Ask me for DBT_PROJECT_DIR, DBT_PATH and only put the values in that config, nowhere else. Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires uv, Python 3.12+.
This sets up local dbt commands. Point DBT_PROJECT_DIR at your dbt project and DBT_PATH at your dbt executable. To use dbt platform features, also set DBT_HOST, DBT_TOKEN and DBT_PROD_ENV_ID, as in the repo's .env.example. dbt's docs cover remote setup.
From the project README. Source.
Tools
Lists your defined metrics
Retrieves all metrics defined in the dbt Semantic Layer.
Try: “What metrics do we have?”
Read ·
list_metricsQueries a metric with filters
Runs a metric query with filtering and grouping options.
Try: “Show monthly revenue by region for 2025.”
Read ·
query_metricsLists dimensions for metrics
Gets the dimensions available for chosen metrics.
Try: “What can I break revenue down by?”
Read ·
get_dimensionsLists values of a dimension
Gets the distinct values of a dimension, optionally for chosen metrics.
Try: “Which regions exist?”
Read ·
get_dimension_valuesLists entities for metrics
Gets the entities for chosen metrics.
Try: “What entities does the revenue metric use?”
Read ·
get_entitiesShows the SQL behind a metric
Returns compiled SQL for metrics without running the query.
Try: “Show the SQL for monthly revenue.”
Read ·
get_metrics_compiled_sqlLists saved metric queries
Retrieves all saved queries.
Try: “List the saved queries.”
Read ·
list_saved_queriesRuns SQL on dbt platform
Runs SQL on dbt platform infrastructure with Semantic Layer support.
Try: “Run a query to count orders by status.”
Read ·
execute_sqlWrites SQL from a plain question
Generates SQL from natural language using your project context.
Try: “Write SQL for total sales by month.”
Read ·
text_to_sqlLists all models
Retrieves the name and description of every model.
Try: “List all models in my project.”
Read ·
get_all_modelsLists mart models
Retrieves all mart models.
Try: “Which mart models do we have?”
Read ·
get_mart_modelsLists sources and freshness
Gets all sources with their freshness status.
Try: “Which sources are stale?”
Read ·
get_all_sourcesLists macros
Retrieves macros, optionally filtered by package.
Try: “List the macros in the dbt_utils package.”
Read ·
get_all_macrosLists dashboards and apps fed by dbt
Gets all exposures, the downstream dashboards, apps or analyses.
Try: “Which dashboards depend on our models?”
Read ·
get_exposuresShows details of any dbt resource
Gets full details for a model, source, exposure, test, seed, snapshot, macro or semantic model.
Try: “Show details of the orders model.”
Read ·
get_node_detailsShows what feeds what
Gets a lineage graph filtered by type, depth and direction.
Try: “What sits upstream of the orders model?”
Read ·
get_lineageChecks a model's health
Gets run status, test results and upstream source freshness for a model.
Try: “Is the orders model healthy?”
Read ·
get_model_healthShows a model's run history
Gets execution history for a model, optionally with test results.
Try: “How long did the orders model take over the last 10 runs?”
Read ·
get_model_performanceFinds similar models
Finds similar models using semantic search.
Try: “Find models similar to customers.”
Read ·
get_related_modelsFinds public models across projects
Finds public dbt Mesh models across projects and confirms who produced them. Multi-project setups only.
Try: “Find a public customers model in other projects.”
Read ·
search_public_mesh_modelsSearches dbt resources (alpha)
Searches for resources across the dbt project. Alpha and not generally available.
Try: “Search for revenue.”
Read ·
searchBuilds models, tests and seeds
Runs models, tests, snapshots and seeds in dependency order with the dbt command line.
Try: “Build the orders model and everything downstream.”
Runs code ·
buildRuns models
Executes models to create tables and views in your database.
Try: “Run the orders model.”
Runs code ·
runRuns tests
Runs tests to check data and model integrity.
Try: “Run the tests on orders.”
Runs code ·
testCompiles models to SQL
Generates executable SQL from models, tests and analyses.
Try: “Compile the orders model.”
Runs code ·
compileChecks project files
Parses and validates project files for syntax errors.
Try: “Check my dbt project for errors.”
Runs code ·
parseLists project resources
Lists resources in the project by type, with selector support.
Try: “List all models tagged finance.”
Runs code ·
listRuns SQL against your database
Runs SQL against the database and returns results.
Try: “Show 10 rows from the orders model.”
Runs code ·
showClones nodes between environments
Clones selected nodes from a given state to target schemas.
Try: “Clone production models to my dev schema.”
Runs code ·
cloneGenerates project docs
Generates documentation for the dbt project.
Try: “Generate the docs.”
Runs code ·
docsShows lineage from your local project
Retrieves lineage from the local manifest file, filtered by type and depth.
Try: “What depends on stg_orders locally?”
Read ·
get_lineage_devShows local node details
Retrieves node details from the local manifest for models, seeds, snapshots and sources.
Try: “Show the local definition of orders.”
Read ·
get_node_details_devLists dbt platform projects
Lists all projects in the dbt platform account.
Try: “List our dbt projects.”
Read ·
list_projectsLists jobs
Lists jobs in a dbt platform account, optionally by project or environment.
Try: “List jobs in the analytics project.”
Read ·
list_jobsShows a job's setup
Gets a job's configuration, triggers, schedule and commands.
Try: “Show how the nightly job is set up.”
Read ·
get_job_detailsLists job runs
Lists job runs, filtered by job or status.
Try: “Show failed job runs from today.”
Read ·
list_jobs_runsShows a job run
Gets run status, timing, steps and artifacts.
Try: “Show details of the last nightly run.”
Read ·
get_job_run_detailsExplains why a run failed
Gets error and warning details for a job run.
Try: “Why did the last nightly run fail?”
Read ·
get_job_run_errorLists a run's artifacts
Lists the artifacts available from a job run.
Try: “What artifacts did the last run produce?”
Read ·
list_job_run_artifactsDownloads a run artifact
Downloads one artifact from a job run, with optional jq filtering.
Try: “Get run_results.json from the last run.”
Read ·
get_job_run_artifactsStarts a job run
Triggers a job run, optionally overriding git branch, schema or other settings.
Try: “Run the nightly job now.”
Runs code ·
trigger_job_runRetries a failed run
Retries a failed job run.
Try: “Retry the failed nightly run.”
Runs code ·
retry_job_runCancels a running job
Cancels a job run that is in progress.
Try: “Cancel the running nightly job.”
Runs code ·
cancel_job_runWrites model YAML
Generates model YAML with columns, optionally inheriting upstream descriptions.
Try: “Generate YAML for the orders model.”
Write ·
generate_model_yamlWrites source YAML
Generates source YAML by reading database schemas.
Try: “Generate source YAML for the raw schema.”
Write ·
generate_sourceWrites a staging model
Generates staging model SQL from a source table.
Try: “Create a staging model for raw.orders.”
Write ·
generate_staging_modelCompiles SQL with Fusion
Compiles SQL in project context through dbt platform.
Try: “Compile this SQL against my project.”
Read ·
fusion.compile_sqlTraces a column's origin on the platform
Traces column-level lineage through dbt platform.
Try: “Where does orders.total come from?”
Read ·
fusion.get_column_lineageTraces a column's origin locally
Traces column-level lineage locally. Needs dbt-lsp from the dbt Labs VS Code extension.
Try: “Trace orders.total locally.”
Read ·
get_column_lineageSearches the dbt docs
Searches docs.getdbt.com and returns titles, URLs and descriptions.
Try: “How do I set up incremental models?”
Read ·
search_product_docsReads dbt doc pages
Fetches the full Markdown of docs.getdbt.com pages.
Try: “Open the incremental models doc.”
Read ·
get_product_doc_pagesShows the server version
Returns the version of the running dbt MCP server.
Try: “Which dbt MCP version is running?”
Read ·
get_mcp_server_versionShows the server's git branch
Returns the git branch of the running dbt MCP server.
Try: “Which branch is the dbt MCP server on?”
Read ·
get_mcp_server_branch
Read from the source code
Permissions
medium risk · 2 things to watch · 5 advisories
Medium risk
The command-line tools can run, build and clone models, which change tables and views in your warehouse, and dbt warns they can modify your data models and sources. Disable the command-line tool group if you only want to read metadata and metrics.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
dbt commands can change your warehouse
build, run and clone create or replace tables and views, and the SQL tools run what the assistant writes. Run against a development target, not production. raw.githubusercontent.com
It can start and cancel platform jobs
It can trigger, retry and cancel dbt platform job runs. Use a service token with only the permissions you need. raw.githubusercontent.com
Security advisories
5 known advisories, all fixed in a newer version.
- dbt-mcp exposes dbt platform OAuth access and refresh tokens to local processesmedium · Fixed in 2.1.2 · GHSA-qgp5-9hvj-2pr7
- Unauthenticated OAuth Context Endpoint Leaks dbt Platform Tokensmedium · Fixed in 1.20.0 · GHSA-jr33-mw75-7j8f
- Argument Injection in dbt CLI Tool Wrappers via node_selection and resource_type Parametersmedium · Fixed in 1.17.1 · GHSA-xpww-f6pm-cfhq
- All MCP Tool Arguments Including Raw SQL and --vars Credentials Transmitted to dbt Labs Telemetry by Default Without Redactionlow · Fixed in 1.17.1 · GHSA-jj54-r8gm-2fcf
- Tool Arguments Including SQL Queries and Credentials Logged in Plaintext Without Redaction When File Logging Is Enabledlow · Fixed in 1.17.1 · GHSA-7xgw-6qf3-7w59
Technical details
| Turning on read-only | Turn off tool groups or single tools with environment variables such as DISABLE_TOOLS. See dbt's environment variables reference. |
|---|---|
| Talks to | dbt platform (DBT_HOST). docs.getdbt.com |
| Sign-in and keys | Environment variables such as DBT_TOKEN in your client config. Local dbt commands use your existing dbt profile. |
| Scopes |
|
Questions
Is the dbt MCP server official?
Yes. It is published by dbt Labs in the dbt-labs/dbt-mcp repository and documented on docs.getdbt.com.
Do I need a dbt platform account?
Not to run dbt commands on a local project. With an account you also get the Semantic Layer, Discovery API, Admin API and SQL tools.
What is the difference between self-hosted and remote?
Self-hosted runs on your machine with uvx and supports dbt commands, codegen and the Admin API. The remote one is hosted by dbt, needs no install, and is for querying data and exploring metadata. It cannot run dbt platform CLI commands.
What do I need to install?
uv, so you can run uvx dbt-mcp. The package on PyPI needs Python 3.12 or newer.
Can I make it read-only?
You can turn off the dbt command tools, or any single tool, with environment variables such as DISABLE_TOOLS. The metadata and metric tools do not change data.
What does the experimental bundle do?
dbt publishes a dbt-mcp.mcpb file with each release. Apps that support MCP bundles can import it without extra setup.
Information
updated Nov 2, 2026
- Publisher
- Official
- Package
dbt-mcp- Registry
- PyPI
- Transport
- stdio
- License
- Apache-2.0
- Last commit
- Oct 30, 2026
- Open issues
- 30
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 2Hide
- docs.getdbt.com · docs.getdbt.com
- raw.githubusercontent.com · raw.githubusercontent.com