A MCP (Model Context Protocol) server for interacting with dbt. It exposes dbt CLI, Discovery, Semantic-Layer and Remote tools so editors such as Cursor, Claude Desktop and VS Code can run dbt commands through the Model Context Protocol.
https://github.com/dbt-labs/dbt-mcpStop context-switching between your IDE and terminal every time you need to run dbt commands, check model dependencies, or query your semantic layer. The dbt MCP server connects your dbt project directly to AI-powered editors like Cursor, Claude Desktop, and VS Code, turning natural language into executable dbt workflows.
You're deep in a data modeling session when you need to:
Instead of staying in your flow, you're jumping between terminal windows, opening dbt docs in a browser, and manually running commands. Each context switch costs you focus and momentum.
This MCP server transforms your dbt workflow by exposing four powerful tool groups directly to your AI assistant:
dbt CLI Integration: Execute dbt build, dbt test, dbt run, and other commands without leaving your editor. Ask "run tests for the user_metrics model" and watch it happen.
Discovery API: Query your project structure naturally. "Show me all models that depend on raw_events" or "What are the column details for the user_funnel mart?"
Semantic Layer: Access your metrics layer through conversation. "List all revenue metrics" or "Query monthly active users grouped by region for the last quarter."
Remote Execution: Generate SQL from natural language and execute it directly on dbt Cloud's infrastructure. "Create a query that shows the top 10 customers by lifetime value."
Model Development: You're building a new user acquisition funnel. Instead of manually checking dependencies and running tests, you ask your AI: "What models use the users table, and can you run a build to make sure my changes don't break anything?"
Code Review: A teammate modified the revenue attribution model. Ask: "Show me the children of the revenue_attribution model and run tests to check data quality."
Metric Exploration: The business team wants to understand churn patterns. Query: "Show me all churn-related metrics and their dimensions, then generate a SQL query for monthly churn rates by user segment."
Documentation: You've just finished a complex data mart. Request: "Generate documentation for the customer_lifecycle_mart and show me its lineage."
Skip the complex setup. The server integrates seamlessly with your existing dbt environment:
# Install via uvx (recommended)
uvx dbt-mcp
# Or install traditionally
pip install dbt-mcp
Configure your .env file with your dbt project details, add the server to your IDE's MCP configuration, and you're ready. Your existing dbt profiles, connections, and permissions work as-is.
Local Development: Run dbt commands against your local project using dbt Core or dbt Cloud CLI.
dbt Cloud Discovery: Access your production project metadata, model lineage, and documentation.
Semantic Layer: Query your metrics layer directly from your IDE using your existing service tokens.
Remote Execution: Generate and run SQL on dbt Cloud's infrastructure with full semantic layer syntax support.
Enable only the tools you need by configuring environment variables. Want just CLI commands? Disable the others. Need full remote access? Enable everything.
This isn't a third-party integration that might break with the next dbt update. It's an official dbt Labs project that follows dbt's architecture patterns and security best practices. The server respects your existing permissions, authentication, and project structure.
Cursor: One-click installation with a pre-configured deep link that sets up all environment variables.
Claude Desktop: Standard MCP configuration that works with your existing claude_desktop_config.json.
VS Code: Native MCP support through the official extension with inline server management.
Each integration gives you access to the full dbt command set through natural language, turning your AI assistant into a dbt-native development partner.
Before: "Let me open a terminal, run dbt ls to see my models, then dbt test to check everything, then open the docs site to check dependencies..."
After: "Show me all models in the user domain, run their tests, and explain the dependency chain for the user_metrics model."
Your AI assistant becomes fluent in dbt, understanding your project structure, semantic layer, and data warehouse patterns. Development becomes conversational, and your focus stays on solving data problems rather than managing tools.
The dbt MCP server doesn't just add AI to your dbt workflow—it makes your dbt project AI-native from the ground up.