$git clone https://github.com/dbt-labs/dbt-mcpThis MCP (Model Context Protocol) 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.
| 1 | # dbt MCP Server |
| 2 | [](https://www.bestpractices.dev/projects/11137) |
| 3 | |
| 4 | This MCP (Model Context Protocol) 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. |
| 5 | |
| 6 | Read our documentation [here](https://docs.getdbt.com/docs/dbt-ai/about-mcp) to learn more. [This](https://docs.getdbt.com/blog/introducing-dbt-mcp-server) blog post provides more details for what is possible with the dbt MCP server. |
| 7 | |
| 8 | ## Experimental MCP Bundle |
| 9 | |
| 10 | We publish an experimental Model Context Protocol Bundle (`dbt-mcp.mcpb`) with each release so that MCPB-aware clients can import this server without additional setup. Download the bundle from the latest release assets and follow Anthropic's [`mcpb` CLI](https://github.com/modelcontextprotocol/mcpb) docs to install or inspect it. |
| 11 | |
| 12 | ## Feedback |
| 13 | |
| 14 | If you have comments or questions, create a GitHub Issue or join us in [the community Slack](https://www.getdbt.com/community/join-the-community) in the `#tools-dbt-mcp` channel. |
| 15 | |
| 16 | |
| 17 | ## Architecture |
| 18 | |
| 19 | The dbt MCP server architecture allows for your agent to connect to a variety of tools. |
| 20 | |
| 21 |  |
| 22 | |
| 23 | ## Tools |
| 24 | |
| 25 | ### SQL |
| 26 | |
| 27 | Tools for executing and generating SQL on dbt Platform infrastructure. |
| 28 | - `execute_sql`: Executes SQL on dbt Platform infrastructure with Semantic Layer support. |
| 29 | - `text_to_sql`: Generates SQL from natural language using project context. |
| 30 | |
| 31 | ### Semantic Layer |
| 32 | |
| 33 | To learn more about the dbt Semantic Layer, click [here](https://docs.getdbt.com/docs/use-dbt-semantic-layer/dbt-sl). |
| 34 | - `get_dimension_values`: Gets distinct values for a dimension; option to scope to specific metrics. |
| 35 | - `get_dimensions`: Gets dimensions for specified metrics. |
| 36 | - `get_entities`: Gets entities for specified metrics. |
| 37 | - `get_metrics_compiled_sql`: Returns compiled SQL for metrics without executing the query. |
| 38 | - `list_metrics`: Retrieves all defined metrics. |
| 39 | - `list_saved_queries`: Retrieves all saved queries. |
| 40 | - `query_metrics`: Executes metric queries with filtering and grouping options. |
| 41 | |
| 42 | ### Discovery |
| 43 | |
| 44 | To learn more about the dbt Discovery API, click [here](https://docs.getdbt.com/docs/dbt-cloud-apis/discovery-api). |
| 45 | - `get_all_macros`: Retrieves macros; option to filter by package or return package names only. |
| 46 | - `get_all_models`: Retrieves name and description of all models. |
| 47 | - `get_all_sources`: Gets all sources with freshness status; option to filter by source name. |
| 48 | - `get_exposure_details`: *(deprecated — use `get_node_details` instead)* |
| 49 | - `get_exposures`: Gets all exposures (downstream dashboards, apps, or analyses). |
| 50 | - `get_lineage`: Gets full lineage graph (ancestors and descendants) with type and depth filtering. |
| 51 | - `get_macro_details`: *(deprecated — use `get_node_details` instead)* |
| 52 | - `get_mart_models`: Retrieves all mart models. |
| 53 | - `get_model_children`: *(deprecated — use `get_lineage` instead)* |
| 54 | - `get_model_details`: *(deprecated — use `get_node_details` instead)* |
| 55 | - `get_model_health`: Gets health signals: run status, test results, and upstream source freshness. |
| 56 | - `get_model_parents`: *(deprecated — use `get_lineage` instead)* |
| 57 | - `get_model_performance`: Gets execution history for a model; option to include test results. |
| 58 | - `get_node_details`: Gets full details for any dbt resource type (model, source, exposure, test, seed, snapshot, macro, semantic_model). |
| 59 | - `get_related_models`: Finds similar models using semantic search. |
| 60 | - `get_seed_details`: *(deprecated — use `get_node_details` instead)* |
| 61 | - `get_semantic_model_details`: *(deprecated — use `get_node_details` instead)* |
| 62 | - `get_snapshot_details`: *(deprecated — use `get_node_details` instead)* |
| 63 | - `get_source_details`: *(deprecated — use `get_node_details` instead)* |
| 64 | - `get_test_details`: *(deprecated — use `get_node_details` instead)* |
| 65 | - `sear |