dbt MCP Server
A MCP (Model Context Protocol) server for interacting with dbt resources.
dbt-labs
README
dbt MCP Server
This MCP (Model Context Protocol) server provides MCP tools to interact with dbt in a few different ways.
In its current form, it allows users to:
- run commands from their local install of the dbt Core or dbt Cloud CLI
- get information about their models and the transformation configured in a given dbt project
- interact with the dbt Cloud Semantic Layer gateway, getting the list of metrics, dimensions and directly querying those
Architecture
Setup
- Clone the repository:
git clone https://github.com/dbt-labs/dbt-mcp.git
cd dbt-mcp
-
Run
task install
-
Configure environment variables:
cp .env.example .env
Then edit .env
with your specific environment variables:
DISABLE_DBT_CLI
: Set this totrue
to disable dbt Core and dbt Cloud CLI MCP objects. Otherwise, they are enabled.DISABLE_SEMANTIC_LAYER
: Set this totrue
to disable dbt Semantic Layer MCP objects. Otherwise, they are enabled.DISABLE_DISCOVERY
: Set this totrue
to disable dbt Discovery API MCP objects. Otherwise, they are enabled.DBT_HOST
: Your dbt Cloud instance hostname. This will look like anAccess URL
found here. If you are using Multi-cell, do not include theACCOUNT_PREFIX
here.MULTICELL_ACCOUNT_PREFIX
: If you are using Multi-cell, set this to yourACCOUNT_PREFIX
. If you are not using Multi-cell, do not set this environment variable. You can learn more here.DBT_ENV_ID
: Your dbt environment ID.DBT_TOKEN
: Your personal access token or service token. Service token is required when using the Semantic Layer.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 runningwhich dbt
.DBT_EXECUTABLE_TYPE
: Set this tocore
if theDBT_PATH
environment variable points toward dbt Core. Otherwise, dbt Cloud CLI is assumed
Using with MCP Clients
After going through Setup, you can use your server with an MCP client.
This configuration will be added to the respective client's config file:
{
"mcpServers": {
"dbt": {
"command": "<path-to-this-directory>/.venv/bin/mcp",
"args": [
"run",
"<path-to-this-directory>/src/dbt_mcp/main.py"
]
}
}
}
Be sure to replace <path-to-this-directory>
If you encounter any problems. You can try running task run
to see errors in your terminal
Claude Desktop
Follow these instructions to create the claude_desktop_config.json
file and connect.
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 workspaceUser
- 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-this-directory>/.venv/bin/mcp",
"args": ["run", "<path-to-this-directory>/src/dbt_mcp/main.py"]
}
}
}
}
After setup 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
Contributing
Read CONTRIBUTING.md
for instructions on how to get involved!
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.