
dbt-mcp
MCP server giving AI agents access to dbt projects, models, lineage and jobs
The repository was last updated 4 days ago and is published under Apache-2.0.
dbt-mcp is an open-source MCP server for databases. It is available on CLI, API and Self-hosted.
- Pricing
- Open source
- Platforms
- CLI, API, Self-hosted
- What it can do
- Can change data (3 tools)
- GitHub stars
- 626
- Last commit
Similar MCP servers
About dbt-mcp
Connects AI assistants to a dbt project so they can read models, tests, lineage and documentation directly rather than guessing from raw files. It covers dbt Core, dbt Fusion and dbt Platform, so the same client setup can work across local and cloud workflows.
The server is organized into toolsets: querying through the Semantic Layer, discovery of models and sources, running dbt CLI commands, pulling job run details from the Admin API, generating YAML and staging SQL, and searching the official dbt documentation. Several CLI tools can change warehouse objects, so the README advises enabling them only for clients you trust.
It suits analytics engineers and data teams who already use dbt and want an assistant that understands their project structure, debugging failed runs or drafting model code against it.
Tools this server provides (15)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 3 of 15 tools change data; 5 names don't say.
From the server's own tool labels and tool names; not verified by us.
- execute_sqlName suggests: changes
- Executes SQL on dbt Platform infrastructure with Semantic Layer support.
- text_to_sql
- Generates SQL from natural language using project context.
- query_metricsName suggests: reads
- Executes metric queries with filtering and grouping options.
- list_metricsName suggests: reads
- Retrieves all defined metrics.
- get_lineageName suggests: reads
- Gets a bounded lineage graph with type, depth, and direction filtering.
- get_model_healthName suggests: reads
- Gets health signals: run status, test results, and upstream source freshness.
- build
- Executes models, tests, snapshots, and seeds in DAG order.
- runName suggests: changes
- Executes models to materialize them in the database.
- test
- Runs tests to validate data and model integrity.
- list_jobs_runsName suggests: reads
- Lists job runs; option to filter by job, status, or order by field.
- get_job_run_errorName suggests: reads
- Gets error and/or warning details for a job run.
- trigger_job_runName suggests: changes
- Triggers a job run; option to override git branch, schema, or other settings.
- generate_staging_model
- Generates staging model SQL from a source table.
- generate_source
- Generates source YAML by introspecting database schemas.
- search_product_docsName suggests: reads
- Searches docs.getdbt.com for pages matching a query.
What it does
- Semantic Layer querying
- Lists metrics and dimensions and runs metric queries, including compiled SQL previews without execution.
- Model and lineage discovery
- Retrieves model details, bounded lineage graphs and health signals such as run status and test results.
- dbt CLI execution
- Runs build, test, compile, run and parse commands from the agent, with a warning about warehouse impact.
- Job run diagnostics
- Lists dbt Platform jobs and runs, fetches errors, and downloads run artifacts with jq filtering.
- Code generation helpers
- Generates model YAML, source definitions and staging model SQL from database schemas.
- Product documentation search
- Searches docs.getdbt.com and fetches full page content for agents to reference.
Good for
- Debugging a failed dbt Platform job by pulling its error details and run artifacts
- Tracing which downstream dashboards and models depend on a given model before changing it
- Generating staging models and source YAML for newly loaded warehouse tables
- Answering business questions by querying defined metrics through the Semantic Layer
- Checking model freshness and test results before publishing data
Pricing
Open source
Open source under Apache-2.0; dbt Platform accounts are needed for platform tools.
dbt-mcp FAQ
Which dbt products does dbt-mcp work with?
The README says it works with dbt Core, dbt Fusion and dbt Platform.
How do I install dbt-mcp?
An experimental MCP Bundle (dbt-mcp.mcpb) is attached to each release for MCPB-aware clients, and it is commonly connected to clients such as Claude or Cursor.
Can the agent modify my data?
Yes. The dbt CLI tools such as build, run and test can change models and warehouse objects, so the README recommends enabling them only for trusted clients.
Is dbt-mcp free?
Yes. dbt-mcp is open source, so you can use and self-host it for free.
What are the best alternatives to dbt-mcp?
The closest alternatives to dbt-mcp are dbt-docs-mcp, Dbt, mcp-databricks-server, Databricks MCP Server and Metabase Ai Assistant.
Where this comes from
- Description: written from the project's README.

