Enables interaction with DBT (Data Build Tool) projects, allowing querying of project metadata, inspection of models, sources, and tests, viewing compiled SQL, running DBT commands, and accessing DBT documentation and lineage.
DBT Core MCP Server
An MCP (Model Context Protocol) server for interacting with DBT (Data Build Tool) projects.
Overview
This server provides tools to interact with DBT projects via the Model Context Protocol, enabling AI assistants to:
Query DBT project metadata
Inspect models, sources, and tests
View compiled SQL
Run DBT commands
Access DBT documentation and lineage
Installation
From PyPI (when published)
The easiest way to use this MCP server is with uvx (no installation needed):
Or install it permanently:
Usage
Running the Server
The server automatically detects DBT projects from workspace roots provided by VS Code.
Configuration for VS Code
Add to your VS Code MCP settings:
Or if you prefer pipx:
For the impatient (bleeding edge from GitHub)
If you want to always run the latest code directly from GitHub:
Or with pipx:
Requirements
DBT Core: Version 1.9.0 or higher
Python: 3.9 or higher
Supported Adapters: Any DBT adapter (dbt-duckdb, dbt-postgres, dbt-snowflake, etc.)
Limitations
Python models: Not currently supported. Only SQL-based DBT models are supported at this time.
DBT Version: Requires dbt-core 1.9.0 or higher
Features
ā Implemented:
Get DBT project information (version, adapter, counts)
List all models with metadata
List all sources
Automatic environment detection (uv, poetry, pipenv, venv, conda)
Bridge runner for executing DBT in user's environment
š§ Planned:
Get model information and metadata (enhanced)
View compiled SQL
Run specific models
Test models
View model lineage
Access DBT documentation
Execute custom DBT commands
Available Tools
get_project_info
Returns metadata about the DBT project including:
Project name
DBT version
Adapter type (e.g., duckdb, postgres, snowflake)
Model and source counts
list_models
Lists all models in the project with:
Name and unique ID
Schema and database
Materialization type (table, view, incremental, etc.)
Tags
Dependencies
File path
list_sources
Lists all sources in the project with:
Source and table names
Schema and database
Description and tags
How It Works
This server uses a "bridge runner" approach to execute DBT in your project's Python environment:
Environment Detection: Automatically detects your Python environment (uv, poetry, pipenv, venv, conda)
Subprocess Bridge: Executes DBT commands using inline Python scripts in your environment
Manifest Parsing: Reads
target/manifest.jsonfor model and source metadataNo Version Conflicts: Uses your exact dbt-core version and adapter without conflicts
Contributing
Want to help improve this server? Check out CONTRIBUTING.md for development setup and guidelines.
License
MIT License - see LICENSE file for details.
Author
Niclas Olofsson - GitHub
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables AI assistants to interact with DBT (Data Build Tool) projects, allowing them to query project metadata, inspect models and sources, view compiled SQL, and run DBT commands.