$npx -y skills add dbt-labs/dbt-agent-skills --skill configuring-dbt-mcp-serverGenerates MCP server configuration JSON, resolves authentication setup, and validates server connectivity for dbt. Use when setting up, configuring, or troubleshooting the dbt MCP server for AI tools like Claude Desktop, Claude Code, Cursor, or VS Code.
| 1 | # Configure dbt MCP Server |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | The dbt MCP server connects AI tools to dbt's CLI, Semantic Layer, Discovery API, and Admin API. This skill guides users through setup with the correct configuration for their use case. |
| 6 | |
| 7 | ## Decision Flow |
| 8 | |
| 9 | ```mermaid |
| 10 | flowchart TB |
| 11 | start([User wants dbt MCP]) --> q1{Local or Remote?} |
| 12 | q1 -->|dev workflows,<br>CLI access needed| local[Local Server<br>uvx dbt-mcp] |
| 13 | q1 -->|consumption only,<br>no local install| remote[Remote Server<br>HTTP endpoint] |
| 14 | local --> q2{Which client?} |
| 15 | remote --> q2 |
| 16 | q2 --> claude_desktop[Claude Desktop] |
| 17 | q2 --> claude_code[Claude Code] |
| 18 | q2 --> cursor[Cursor] |
| 19 | q2 --> vscode[VS Code] |
| 20 | claude_desktop --> config[Generate config<br>+ test setup] |
| 21 | claude_code --> config |
| 22 | cursor --> config |
| 23 | vscode --> config |
| 24 | ``` |
| 25 | |
| 26 | ## Questions to Ask |
| 27 | |
| 28 | ### 1. Server Type |
| 29 | **Ask:** "Do you want to use the **local** or **remote** dbt MCP server?" |
| 30 | |
| 31 | | Local Server | Remote Server | |
| 32 | | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | |
| 33 | | Runs on your machine via `uvx` | Connects via HTTP to dbt platform | |
| 34 | | Required for development (authoring models, tests, docs) but can also connect to the dbt platform for consumption (querying metrics, exploring metadata) | Best for consumption (querying metrics, exploring metadata) | |
| 35 | | Supports dbt CLI commands (run, build, test, show) | No CLI commands (run, build, test) | |
| 36 | | Works without a dbt platform account but can also connect to the dbt platform for development (authoring models, tests, docs) | Requires dbt platform account | |
| 37 | | No credit consumption | Consumes dbt Copilot credits | |
| 38 | |
| 39 | ### 2. MCP Client |
| 40 | **Ask:** "Which MCP client are you using?" |
| 41 | - Claude Desktop |
| 42 | - Claude Code (CLI) |
| 43 | - Cursor |
| 44 | - VS Code |
| 45 | |
| 46 | ### 3. Use Case (Local Server Only) |
| 47 | **Ask:** "What's your use case?" |
| 48 | |
| 49 | | CLI Only | Platform Only | Platform + CLI | |
| 50 | |----------|---------------|----------------| |
| 51 | | dbt Core/Fusion users | dbt Cloud without local project | Full access to both | |
| 52 | | No platform account needed | OAuth or token auth | Requires paths + credentials | |
| 53 | |
| 54 | ### 4. Tools to Enable |
| 55 | **Ask:** "Which tools do you want enabled?" (show defaults) |
| 56 | |
| 57 | | Tool Category | Default | Environment Variable | |
| 58 | |---------------|---------|---------------------| |
| 59 | | dbt CLI (run, build, test, compile) | Enabled | `DISABLE_DBT_CLI=true` to disable | |
| 60 | | Semantic Layer (metrics, dimensions) | Enabled | `DISABLE_SEMANTIC_LAYER=true` to disable | |
| 61 | | Discovery API (models, lineage) | Enabled | `DISABLE_DISCOVERY=true` to disable | |
| 62 | | Admin API (jobs, runs) | Enabled | `DISABLE_ADMIN_API=true` to disable | |
| 63 | | SQL (text_to_sql, execute_sql) | **Disabled** | `DISABLE_SQL=false` to enable | |
| 64 | | Codegen (generate models/sources) | **Disabled** | `DISABLE_DBT_CODEGEN=false` to enable | |
| 65 | |
| 66 | ## Prerequisites |
| 67 | |
| 68 | ### Local Server |
| 69 | 1. **Install `uv`**: https://docs.astral.sh/uv/getting-started/installation/ |
| 70 | 2. **Have a dbt project** (for CLI commands) |
| 71 | 3. **Find paths:** |
| 72 | - `DBT_PROJECT_DIR`: Folder containing `dbt_project.yml` |
| 73 | - macOS/Linux: `pwd` from project folder |
| 74 | - Windows: Full path with forward slashes (e.g., `C:/Users/name/project`) |
| 75 | - `DBT_PATH`: Path to dbt executable |
| 76 | - macOS/Linux: `which dbt` |
| 77 | - Windows: `where dbt` |
| 78 | |
| 79 | ### Remote Server |
| 80 | 1. **dbt Cloud account** with AI features enabled |
| 81 | 2. **Production environment ID** (from Orchestration page) |
| 82 | 3. **Personal access token** or service token |
| 83 | |
| 84 | See [How to Find Your Credentials](references/finding-credentials.md) for detailed guidance on obtaining tokens and IDs. |
| 85 | |
| 86 | ## Credential Security |
| 87 | |
| 88 | - Always use environment variable references (e.g., `${DBT_TOKEN}`) instead of literal token values in configuration files that may be committed to version control |
| 89 | - Never log, display, or echo token values in terminal output |
| 90 | - When using `.en |