dbt
A MCP (Model Context Protocol) server for interacting with dbt.
claude mcp add --transport stdio dbt-labs-dbt-mcp node server.js \ --env DBT_CONFIG="Optional path to dbt_project.yml or dbt profiles if needed" \ --env DBT_API_KEY="API key or token for authenticated access (if applicable)" \ --env DBT_API_ENDPOINT="URL for any hosting/dbt Platform integration (if applicable)" \ --env DBT_PROJECT_ROOT="Path to your dbt project root (absolute or relative)"
How to use
This MCP server exposes a collection of tools to interact with your dbt workstreams via AI agents. The server bundles SQL execution capabilities against dbt Platform infrastructure, semantic layer access to metrics and saved queries, and discovery endpoints to inspect models, sources, macros, lineage, and more. Agents can request generated SQL, fetch metric definitions, inspect model health, pull lineage graphs, and run or test dbt commands in the context of your project. The tools are organized into categories such as SQL, Semantic Layer, Discovery, dbt CLI, Admin API, dbt Codegen, and dbt LSP, enabling comprehensive project introspection and operational automation through natural language prompts.
How to install
Prerequisites:
- Node.js (recommended LTS version) installed on your machine or server
- Access to your dbt project (local or remote)
-
Clone the repository or set up the MCP server package for dbt:
- git clone <dbt-mcp-repo-url>
- cd dbt-mcp-repo
-
Install dependencies:
- npm install
-
Configure environment variables (example):
- Create a .env file or export variables in your environment
- DBT_PROJECT_ROOT=/path/to/your/dbt/project
- DBT_CONFIG=/path/to/your/dbt/project/dbt_project.yml
- DBT_API_ENDPOINT=https://dbt-platform.example/api
- DBT_API_KEY=your-api-key
-
Start the MCP server:
- npm run start (Alternatively, if using the provided Node entry point, you can run: node server.js)
-
Verify the server is running by visiting the MCP endpoint or checking logs for a successful startup.
Additional notes
Notes and tips:
- The server exposes an experimental MCP Bundle (dbt-mcp.mcpb) in release assets for easier client integration; download and follow mcpb docs if you plan to use that bundle.
- If you are using dbt Platform, ensure proper API credentials and network access are configured for the SQL and admin endpoints.
- The env variables are placeholders; replace them with real values or your environment’s configuration management system.
- If you encounter issues with dbt project discovery, verify the DBT_PROJECT_ROOT path and ensure the project is accessible by the server process.
- For production deployments, consider using a process manager and setting up proper logging, retries, and secret management for API keys and tokens.
Related MCP Servers
mcp-ical
A Model Context Protocol Server that allows you to interact with your MacOS Calendar through natural language.
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
oxylabs
Official Oxylabs MCP integration
LLaMa -Streamlit
AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).
roampal-core
Outcome-based memory for Claude Code and OpenCode
asterisk
Asterisk Model Context Protocol (MCP) server.