← Back to directory
D

dbt MCP Server

Official
An MCP server for interacting with dbt.
GitHub source repository ↗
★ 599 Stars Category · Dev Tools Very popular Source revision d16db88e4e2c
65FMRS · C
Reliability
9/20
Security and permissions
12/20
Maintenance
16/20
Documentation
15/20
Setup experience
13/20

The dbt MCP server is a feature-rich MCP server for integrating AI agents with dbt projects. It offers a wide array of tools covering SQL execution, Semantic Layer, Discovery API, Admin API, dbt CLI, and code generation. It is suitable for data teams and developers, but caution is needed regarding the potential risks of running dbt commands and SQL.

Read the FMRS scoring method →

The dbt MCP server provides various tools to interact with dbt. You can use this MCP server to provide AI agents with context of your project in dbt Core, dbt Fusion, and dbt Platform.

Tools

execute_sql
Executes SQL on dbt Platform infrastructure with Semantic Layer support.
text_to_sql
Generates SQL from natural language using project context.
get_dimension_values
Gets distinct values for a dimension; option to scope to specific metrics.
get_dimensions
Gets dimensions for specified metrics.
get_entities
Gets entities for specified metrics.
get_metrics_compiled_sql
Returns compiled SQL for metrics without executing the query.
list_metrics
Retrieves all defined metrics.
list_saved_queries
Retrieves all saved queries.
query_metrics
Executes metric queries with filtering and grouping options.
get_all_macros
Retrieves macros; option to filter by package or return package names only.
get_all_models
Retrieves name and description of all models.
get_all_sources
Gets all sources with freshness status; option to filter by source name.
get_exposure_details
(deprecated — use get_node_details instead)
get_exposures
Gets all exposures (downstream dashboards, apps, or analyses).
get_lineage
Gets full lineage graph (ancestors and descendants) with type and depth filtering.
get_macro_details
(deprecated — use get_node_details instead)
get_mart_models
Retrieves all mart models.
get_model_children
(deprecated — use get_lineage instead)
get_model_details
(deprecated — use get_node_details instead)
get_model_health
Gets health signals: run status, test results, and upstream source freshness.
get_model_parents
(deprecated — use get_lineage instead)
get_model_performance
Gets execution history for a model; option to include test results.
get_node_details
Gets full details for any dbt resource type (model, source, exposure, test, seed, snapshot, macro, semantic_model).
get_related_models
Finds similar models using semantic search.
get_seed_details
(deprecated — use get_node_details instead)
get_semantic_model_details
(deprecated — use get_node_details instead)
get_snapshot_details
(deprecated — use get_node_details instead)
get_source_details
(deprecated — use get_node_details instead)
get_test_details
(deprecated — use get_node_details instead)
search
[Alpha] Searches for resources across the dbt project (not generally available).
build
Executes models, tests, snapshots, and seeds in DAG order.
clone
Clones selected nodes from the specified state to the target schema(s).
compile
Generates executable SQL from models/tests/analyses; useful for validating Jinja logic.
docs
Generates documentation for the dbt project.
get_lineage_dev
Retrieves lineage from local manifest.json with type and depth filtering.
get_node_details_dev
Retrieves node details from local manifest.json (models, seeds, snapshots, sources).
list
Lists resources in the dbt project by type with selector support.
parse
Parses and validates project files for syntax correctness.
run
Executes models to materialize them in the database.
show
Executes SQL against the database and returns results.
test
Runs tests to validate data and model integrity.
cancel_job_run
Cancels a running job.
get_job_details
Gets job configuration including triggers, schedule, and dbt commands.
get_job_run_details
Gets run details including status, timing, steps, and artifacts.
get_job_run_error
Gets error and/or warning details for a job run; option to include or show warnings only.
list_job_run_artifacts
Lists available artifacts from a job run.
list_jobs
Lists jobs in a dbt Platform account; option to filter by project or environment.
list_jobs_runs
Lists job runs; option to filter by job, status, or order by field.
list_projects
Lists all projects in the dbt Platform account.
retry_job_run
Retries a failed job run.
trigger_job_run
Triggers a job run; option to override git branch, schema, or other settings.
generate_model_yaml
Generates model YAML with columns; option to inherit upstream descriptions.
generate_source
Generates source YAML by introspecting database schemas; option to include columns.
generate_staging_model
Generates staging model SQL from a source table.
fusion.compile_sql
Compiles SQL in project context via dbt Platform.
fusion.get_column_lineage
Traces column-level lineage via dbt Platform.
get_column_lineage
Traces column-level lineage locally (requires dbt-lsp via dbt Labs VSCE).
get_product_doc_pages
Fetches the full Markdown content of one or more docs.getdbt.com pages by path or URL.
search_product_docs
Searches docs.getdbt.com for pages matching a query; returns titles, URLs, and descriptions ranked by relevance. Use get_product_doc_pages to fetch full content.
get_mcp_server_branch
Returns the current git branch of the running dbt MCP server.
get_mcp_server_version
Returns the current version of the dbt MCP server.

Setup

Clone or download the dbt MCP server from the GitHub repository. Follow the configuration and running instructions in the README. Alternatively, download the experimental MCP bundle from the latest release assets for MCPB-aware clients.

Fit and risk

Best for

  • Data teams using dbt Core, dbt Fusion, or dbt Platform.
  • Developers looking to integrate AI assistance into data workflows.
  • Analysts needing to quickly explore and understand dbt project structure and lineage.

Not for

  • Users without a dbt project or without plans to use dbt.
  • A general-purpose database MCP server for comprehensive database management.
  • Newcomers unaware of the risks of executing dbt commands like run or build.

Required permissions

  • Execute SQL queries (which may modify data).
  • Run dbt commands (e.g., run, build, test), which can modify data models, sources, and warehouse objects.
  • Access dbt Platform APIs such as Discovery API and Admin API.
  • Access local file system (e.g., manifest.json) for local tools.

Risks and side effects

  • Running dbt CLI commands can cause significant modifications to data models, sources, and warehouse objects, potentially leading to data loss or corruption.
  • Executing SQL queries may have unintended side effects, especially in production environments.
  • Access to sensitive data (e.g., job configurations, query results) requires proper authentication and authorization.

Troubleshooting

  1. Ensure the MCP server is configured correctly, including necessary dbt project and platform credentials.
  2. Check network connectivity to ensure access to dbt Platform APIs and docs.getdbt.com.
  3. Verify that dependency versions are pinned and follow the configuration instructions in the README.

Use cases

Provide AI agents with context of your dbt project for data-related questions.
Generate and execute SQL from natural language to accelerate data analysis.
Monitor and manage dbt jobs, such as triggering, retrying, and canceling runs.
Generate dbt project files like model YAML, source YAML, and staging models.

Supported clients

ClaudeFull support
CursorFull support