
DBT-MCP
Un servidor MCP (protocolo de contexto modelo) para interactuar con DBT.
3 years
Works with Finder
90
Github Watches
7
Github Forks
90
Github Stars
dbt MCP Server
This MCP (Model Context Protocol) server provides tools to interact with dbt. Read this blog to learn more.
Architecture
Installation
Want to get going quickly?
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/dbt-labs/dbt-mcp/refs/heads/main/install.sh)"
The installer also serves as an updater, simply run it again and it will detect your exisiting dbt-mcp installation and offers to update it.
Configuration
The MCP server takes the following configuration:
Tool Groups
Name | Default | Description |
---|---|---|
DISABLE_DBT_CLI |
false |
Set this to true to disable dbt Core and dbt Cloud CLI MCP tools |
DISABLE_SEMANTIC_LAYER |
false |
Set this to true to disable dbt Semantic Layer MCP objects |
DISABLE_DISCOVERY |
false |
Set this to true to disable dbt Discovery API MCP objects |
DISABLE_REMOTE |
true |
Set this to false to enable remote MCP objects |
Configuration for Discovery and Semantic Layer
Name | Default | Description |
---|---|---|
DBT_HOST |
cloud.getdbt.com |
Your dbt Cloud instance hostname. This will look like an Access URL found here. If you are using Multi-cell, do not include the ACCOUNT_PREFIX here |
MULTICELL_ACCOUNT_PREFIX |
- | If you are using Multi-cell, set this to your ACCOUNT_PREFIX . If you are not using Multi-cell, do not set this environment variable. You can learn more here |
DBT_TOKEN |
- | Your personal access token or service token. Note Service token is required when using the Semantic Layer |
DBT_PROD_ENV_ID |
- | Your dbt Cloud production environment ID |
Configuration for Remote Tools
Name | Description |
---|---|
DBT_DEV_ENV_ID |
Your dbt Cloud development environment ID |
DBT_USER_ID |
Your dbt Cloud user ID |
Configuration for dbt CLI
Name | Description |
---|---|
DBT_PROJECT_DIR |
The path to your dbt Project |
DBT_PATH |
The path to your dbt Core or dbt Cloud CLI executable. You can find your dbt executable by running which dbt |
Using with MCP Clients
After going through Installation, you can use your server with an MCP client.
This configuration will be added to the respective client's config file. Be sure to replace the sections within <>
:
If you used the installation script, the mcp server has been installed in your user directory at ~/.dbt-mcp/
.
{
"mcpServers": {
"dbt-mcp": {
"command": "/Users/<YOUR USERNAME>/.dbt-mcp/.venv/bin/mcp",
"args": [
"run",
"/Users/<YOUR USERNAME>/.dbt-mcp/.venv/lib/python3.12/site-packages/dbt_mcp/main.py"
],
"env": {
// see config above
// "DBT_HOST": "cloud.getdbt.com"
// "DBT_TOKEN": "dbtu_...."
}
}
}
}
<path-to-mcp-executable>
depends on your OS:
- Linux & Mac:
<path-to-this-directory>/.venv/bin/mcp
- PC:
<path-to-this-directory>/.venv/Scripts/mcp
Claude Desktop
Follow these instructions to create the claude_desktop_config.json
file and connect.
On Mac, you can find the Claude Desktop logs at ~/Library/Logs/Claude
.
Cursor
- Open the Cursor menu and select Settings → Cursor Settings → MCP
- Click "Add new global MCP server"
- Add the config from above to the provided
mcp.json
file - Verify your connection is active within the MCP tab
Cursor MCP docs here for reference
VS Code
-
Open the Settings menu (Command + Comma) and select the correct tab atop the page for your use case
-
Workspace
- configures the server in the context of your workspace -
User
- configures the server in the context of your user
-
-
Select Features → Chat
-
Ensure that "Mcp" is
Enabled
-
Click "Edit in settings.json" under "Mcp > Discovery"
-
Add your server configuration (
dbt
) to the providedsettings.json
file as one of the servers:
{
"mcp": {
"inputs": [],
"servers": {
"dbt": {
"command": "<path-to-mcp-executable>",
"args": ["run", "<path-to-this-directory>/src/dbt_mcp/main.py"]
}
}
}
}
<path-to-mcp-executable>
depends on your OS:
- Linux & Mac:
<path-to-this-directory>/.venv/bin/mcp
- PC:
<path-to-this-directory>/.venv/Scripts/mcp
- You can start, stop, and configure your MCP servers by:
- Running the
MCP: List Servers
command from the Command Palette (Control + Command + P) and selecting the server - Utlizing the keywords inline within the
settings.json
file
VS Code MCP docs here for reference
Tools
dbt CLI
-
build
- Executes models, tests, snapshots, and seeds in dependency order -
compile
- Generates executable SQL from models, tests, and analyses without running them -
docs
- Generates documentation for the dbt project -
ls
(list) - Lists resources in the dbt project, such as models and tests -
parse
- Parses and validates the project’s files for syntax correctness -
run
- Executes models to materialize them in the database -
test
- Runs tests to validate data and model integrity -
show
- Runs a query against the data warehouse
Allowing your client to utilize dbt commands through this MCP tooling could modify your data models, sources, and warehouse objects. Proceed only if you trust the client and understand the potential impact.
Semantic Layer
-
list_metrics
- Retrieves all defined metrics -
get_dimensions
- Gets dimensions associated with specified metrics -
get_entities
- Gets entities associated with specified metrics -
query_metrics
- Queries metrics with optional grouping, ordering, filtering, and limiting
Discovery
-
get_mart_models
- Gets all mart models -
get_all_models
- Gets all models -
get_model_details
- Gets details for a specific model -
get_model_parents
- Gets parent models of a specific model
Contributing
Read CONTRIBUTING.md
for instructions on how to get involved!
相关推荐
🔥 1Panel proporciona una interfaz web intuitiva y un servidor MCP para administrar sitios web, archivos, contenedores, bases de datos y LLM en un servidor de Linux.
🧑🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.
Traducción de papel científico en PDF con formatos preservados - 基于 Ai 完整保留排版的 PDF 文档全文双语翻译 , 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 等服务 等服务 等服务 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 cli/mcp/docker/zotero
⛓️Rulego es un marco de motor de regla de orquestación de componentes de alta generación de alto rendimiento, de alto rendimiento y de alto rendimiento para GO.
Cree fácilmente herramientas y agentes de LLM utilizando funciones Plain Bash/JavaScript/Python.
😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 Qq / 微信(企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 DiFy 、 Claude 、 Gemini 、 Xai 、 PPIO 、 Ollama 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 Chatglm 、 SillyTraven 、 MCP 等 LLM 的机器人 / Agente | Plataforma de bots de mensajería instantánea basada en LLM, admite Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack
Iniciar aplicaciones de múltiples agentes empoderadas con Building LLM de manera más fácil.
Reviews

user_iQkkZmja
I'm a dedicated user of dbt-mcp by dbt-labs and it has significantly improved my data transformation workflows. The seamless integration and efficient processing capabilities make it essential for any data professional. Highly recommend giving it a try!

user_82MSKjUx
As a dedicated user of dbt-mcp by dbt-labs, I can confidently say that this tool has revolutionized my workflow. The seamless integration and powerful features make data transformation and modeling a breeze. Its user-friendly interface and robust functionality have significantly enhanced the efficiency of my projects. Highly recommend for any data professional!

user_Zjvok1IS
As a dedicated user of the dbt-mcp application, I have found it to be incredibly efficient and reliable for managing my data transformation processes. Created by the reputable dbt-labs, this tool offers advanced functionalities that enhance productivity and streamline workflows. The user interface is intuitive, making it easy to navigate and utilize its robust features. Overall, dbt-mcp has significantly improved the way I handle data projects. Highly recommended for anyone in need of a powerful data transformation tool!

user_HX6rDpid
As a dedicated user of dbt-mcp, I have been consistently impressed with its robust features and seamless integration. Created by dbt-labs, this tool has significantly streamlined our data transformation process. The smooth user interface and extensive documentation have made adoption a breeze for our team. Highly recommended for anyone looking to enhance their data manipulation capabilities!

user_9kamsmuN
As a dedicated user of dbt-mcp, developed by dbt-labs, I am genuinely impressed by its capabilities. This product has significantly streamlined our data transformation processes, making complex tasks easier and more efficient. The user-friendly interface and comprehensive documentation have been invaluable, and the tool's integration with our existing systems is seamless. Highly recommended for anyone looking to enhance their data workflow!

user_dtIp9IgS
I've been using dbt-mcp from dbt-labs and it has significantly streamlined our data transformation processes. The tool's comprehensive functionality, ease of use, and robust performance ensure efficient workflow management. Highly recommended for anyone looking to optimize their data operations.

user_nfYVnc0u
As a dedicated user of the dbt-mcp application by dbt-labs, I am impressed by its seamless integration and robust functionality. It streamlines my data transformation workflows and significantly enhances productivity. Whether you're a professional data engineer or a data enthusiast, dbt-mcp provides a comprehensive toolkit to handle complex data projects efficiently. Its user-friendly interface and extensive documentation make onboarding smooth and quick. Highly recommend!

user_K1CHbzu3
I recently started using dbt-mcp, and I'm thoroughly impressed! Developed by dbt-labs, this tool has significantly streamlined my data transformation processes. The user-friendly interface and robust functionality have made my workflow far more efficient. Highly recommend it to anyone looking for a reliable data transformation solution.

user_KKwxvcay
dbt-mcp by dbt-labs is a game-changer for managing and transforming data workflows. Its seamless integration and user-friendly interface make data manipulation effortless. The support from dbt-labs is top-notch, ensuring smooth implementation. Highly recommend it for anyone looking to streamline their data processes efficiently!