Official dbt server: run dbt Core/Cloud CLI commands, discover project metadata and models, and query the semantic layer.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add dbt --env ENV_FILE_PATH='<ENV_FILE_PATH>' -- uvx --env-file '<path-to-.env-file>' dbt-mcp~/.codex/config.toml
[mcp_servers.dbt]
command = "uvx"
args = ["--env-file", "<path-to-.env-file>", "dbt-mcp"]
env = { ENV_FILE_PATH = "<ENV_FILE_PATH>" }
# codex mcp add dbt --env ENV_FILE_PATH='<ENV_FILE_PATH>' -- uvx --env-file '<path-to-.env-file>' dbt-mcp~/.cursor/mcp.json
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": [
"--env-file",
"<path-to-.env-file>",
"dbt-mcp"
],
"env": {
"ENV_FILE_PATH": "<ENV_FILE_PATH>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"dbt": {
"type": "stdio",
"command": "uvx",
"args": [
"--env-file",
"<path-to-.env-file>",
"dbt-mcp"
],
"env": {
"ENV_FILE_PATH": "<ENV_FILE_PATH>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": [
"--env-file",
"<path-to-.env-file>",
"dbt-mcp"
],
"env": {
"ENV_FILE_PATH": "<ENV_FILE_PATH>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": [
"--env-file",
"<path-to-.env-file>",
"dbt-mcp"
],
"env": {
"ENV_FILE_PATH": "<ENV_FILE_PATH>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": [
"--env-file",
"<path-to-.env-file>",
"dbt-mcp"
],
"env": {
"ENV_FILE_PATH": "<ENV_FILE_PATH>"
}
}
}
}Environment variables
ENV_FILE_PATH
Replace the placeholders with your own credentials and keep them out of version control.