dbt-mcp
The dbt MCP Server facilitates interaction with dbt by providing various tools for dbt CLI, Semantic Layer, Discovery, and Remote operations. It supports executing and managing dbt models and integrating with development environments like VS Code and Cursor.
dbt MCP Server
This project is an MCP (Model Context Protocol) server to interact with dbt. It offers tools for dbt CLI, Semantic Layer, Discovery, and Remote interactions. Key features include executing and compiling dbt models, generating documentation, and querying metrics. The setup involves cloning the repository, installing dependencies, and configuring environment variables to use with MCP clients like VS Code and Cursor. The project supports integration with various development environments and provides documentation for configuration and usage.
Tools
dbt CLI
- build - Executes models, tests, snapshots, and seeds
- compile - Generates executable SQL
- docs - Generates project documentation
- run - Executes models
- test - Validates data and model integrity
Semantic Layer
- list_metrics - Retrieves defined metrics
- query_metrics - Queries metrics
Discovery
- get_mart_models - Retrieves all mart models
Remote
- text_to_sql - Generate SQL from natural language
- execute_sql - Execute SQL on dbt Cloud infrastructure