dbt Core

dbt Core MCP Server: Interact with dbt projects via Model Context Protocol
  • python

10

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

Meet your dbt pair programming partner. This MCP server runs in your Python environment and lets Copilot execute dbt commands, analyze lineage, and test changes using your actual project setup—without requiring dbt-core to be installed on the server itself. It respects your environment, adapters, and Python tooling, so you get accurate results and smooth collaboration with Copilot.

How to use

You use an MCP client to connect to the dbt core MCP server. Once connected, you can explain your intent in natural language, and Copilot will run dbt commands, inspect lineage, and report results back to you. This setup lets you explore models, sources, and tests, run targeted builds, and validate changes without leaving your development environment.

How to install

Prerequisites you need before you begin:

  • Python 3.9+ is required.

If you do not have Python installed, download it from the official Python site and install it according to your operating system guidelines.

Install the MCP client utilities you will use to connect to the server, for example via uvx or pipx, depending on your preferred workflow.

Configuration and getting started

Option 1: One-click installation (easiest). Use the MCP client to install the server directly with your VS Code environment. You will use a prebuilt MCP entry that points to the server, and the client will start the server automatically when you open a dbt project.

Option 2: Manual configuration. Add a configuration block to your MCP client to connect to the server. You can point to the MCP URL for installation or configure a local runtime to start and manage the server.

Additional configuration options

If you need to fine-tune how the server runs in your workspace, you can adjust timeouts and project location. The default behavior uses your workspace directory as the dbt project location and runs commands without a user-specified timeout unless you enable a timeout for long-running models.

Security and compatibility notes

The MCP server operates entirely within your Python environment, using bridge execution to run commands with your installed dbt-core and adapters. This avoids conflicts from mismatched dependencies and ensures compatibility with your existing dbt setup.

Troubleshooting tips

If Copilot reports environment or permission issues, verify that your Python environment is accessible, your dbt project is detectable in the workspace, and that the dbt adapter you use is installed in your workspace. Restart the MCP client after installing or updating dependencies.

Examples and quick commands

# Quick example: run a focused build for changed models and tests
# This is handled by Copilot through the MCP server; you just describe your intent

Available tools

get_project_info

Fetches basic project metadata such as name, version, adapter type, and resource counts, and can run a diagnostic check of the environment.

list_resources

Lists resources in the project or filters by type (models, sources, seeds, snapshots, tests) with consistent fields.

get_resource_info

Retrieves detailed information about a resource, including compiled SQL and column definitions.

get_lineage

Displays upstream and downstream relationships for models, sources, seeds, snapshots, and tests.

analyze_impact

Analyzes the blast radius of changes, listing downstream resources and providing recommended commands.

get_column_lineage

Tracks column-level lineage through transformations, showing how columns flow through CTEs and SQL expressions.

query_database

Executes SQL queries against the database using dbt's ref() and source() functions and supports exporting results.

run_models

Runs models with state-based selection to optimize development cycles and support downstream testing.

test_models

Runs tests with state-based selection to validate changes and downstream impacts.

build_models

Builds models and tests in dependency order with state-based selection for efficient iteration.

seed_data

Loads seed data from the seeds directory into the database and supports selective loading.

snapshot_models

Executes dbt snapshots to capture slowly changing dimensions.

install_deps

Installs dbt packages defined in packages.yml to enable interactive package management workflow.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational