skills/dbt/skills/configuring-dbt-mcp-server/SKILL.md
Generates 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 Kilo, Cursor, VS Code, or Claude Desktop.
npx skillsauth add kilo-org/kilo-marketplace configuring-dbt-mcp-serverInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
flowchart TB
start([User wants dbt MCP]) --> q1{Local or Remote?}
q1 -->|dev workflows,<br>CLI access needed| local[Local Server<br>uvx dbt-mcp]
q1 -->|consumption only,<br>no local install| remote[Remote Server<br>HTTP endpoint]
local --> q2{Which client?}
remote --> q2
q2 --> kilo[Kilo]
q2 --> claude_desktop[Claude Desktop]
q2 --> cursor[Cursor]
q2 --> vscode[VS Code]
kilo --> config[Generate config<br>+ test setup]
claude_desktop --> config
cursor --> config
vscode --> config
Ask: "Do you want to use the local or remote dbt MCP server?"
| Local Server | Remote Server |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| Runs on your machine via uvx | Connects via HTTP to dbt platform |
| 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) |
| Supports dbt CLI commands (run, build, test, show) | No CLI commands (run, build, test) |
| Works without a dbt platform account but can also connect to the dbt platform for development (authoring models, tests, docs) | Requires dbt platform account |
| No credit consumption | Consumes dbt Copilot credits |
Ask: "Which MCP client are you using?"
Ask: "What's your use case?"
| CLI Only | Platform Only | Platform + CLI | |----------|---------------|----------------| | dbt Core/Fusion users | dbt Cloud without local project | Full access to both | | No platform account needed | OAuth or token auth | Requires paths + credentials |
Ask: "Which tools do you want enabled?" (show defaults)
| Tool Category | Default | Environment Variable |
|---------------|---------|---------------------|
| dbt CLI (run, build, test, compile) | Enabled | DISABLE_DBT_CLI=true to disable |
| Semantic Layer (metrics, dimensions) | Enabled | DISABLE_SEMANTIC_LAYER=true to disable |
| Discovery API (models, lineage) | Enabled | DISABLE_DISCOVERY=true to disable |
| Admin API (jobs, runs) | Enabled | DISABLE_ADMIN_API=true to disable |
| SQL (text_to_sql, execute_sql) | Disabled | DISABLE_SQL=false to enable |
| Codegen (generate models/sources) | Disabled | DISABLE_DBT_CODEGEN=false to enable |
uv: https://docs.astral.sh/uv/getting-started/installation/DBT_PROJECT_DIR: Folder containing dbt_project.yml
pwd from project folderC:/Users/name/project)DBT_PATH: Path to dbt executable
which dbtwhere dbtSee How to Find Your Credentials for detailed guidance on obtaining tokens and IDs.
${DBT_TOKEN}) instead of literal token values in configuration files that may be committed to version control.env files, ensure they are added to .gitignore to prevent accidental commits{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": ["dbt-mcp"],
"env": {
"DBT_PROJECT_DIR": "/path/to/your/dbt/project",
"DBT_PATH": "/path/to/dbt"
}
}
}
}
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": ["dbt-mcp"],
"env": {
"DBT_HOST": "https://your-subdomain.us1.dbt.com",
"DBT_PROJECT_DIR": "/path/to/project",
"DBT_PATH": "/path/to/dbt"
}
}
}
}
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": ["dbt-mcp"],
"env": {
"DBT_HOST": "cloud.getdbt.com",
"DBT_TOKEN": "your-token",
"DBT_ACCOUNT_ID": "your-account-id",
"DBT_PROD_ENV_ID": "your-prod-env-id",
"DBT_PROJECT_DIR": "/path/to/project",
"DBT_PATH": "/path/to/dbt"
}
}
}
}
{
"mcpServers": {
"dbt": {
"command": "uvx",
"args": ["--env-file", "/path/to/.env", "dbt-mcp"]
}
}
}
.env file contents:
DBT_HOST=cloud.getdbt.com
DBT_TOKEN=your-token
DBT_ACCOUNT_ID=your-account-id
DBT_PROD_ENV_ID=your-prod-env-id
DBT_DEV_ENV_ID=your-dev-env-id
DBT_USER_ID=your-user-id
DBT_PROJECT_DIR=/path/to/project
DBT_PATH=/path/to/dbt
{
"mcpServers": {
"dbt": {
"url": "https://cloud.getdbt.com/api/ai/v1/mcp/",
"headers": {
"Authorization": "Token your-token",
"x-dbt-prod-environment-id": "your-prod-env-id"
}
}
}
}
Additional headers for SQL/Fusion tools:
{
"headers": {
"Authorization": "Token your-token",
"x-dbt-prod-environment-id": "your-prod-env-id",
"x-dbt-dev-environment-id": "your-dev-env-id",
"x-dbt-user-id": "your-user-id"
}
}
Config location:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd the mcp block to your kilo.json config file.
Config locations:
~/.config/kilo/kilo.json./kilo.json or ./.kilo/kilo.json in your project rootProject-level configuration takes precedence over global settings. For project-specific dbt setups, use .kilo/kilo.json so your team shares the same configuration.
Add the dbt MCP server under the mcp key:
{
"mcp": {
"dbt": {
"command": "uvx",
"args": ["dbt-mcp"],
"env": {
"DBT_PROJECT_DIR": "/path/to/project",
"DBT_PATH": "/path/to/dbt"
}
}
}
}
VS Code Extension: Open Kilo Settings > Agent Behaviour > MCP Servers, then click "Edit Global MCP" (or "Edit Project MCP" for project-specific config) and add the config above.
servers not mcpServers):{
"servers": {
"dbt": {
"command": "uvx",
"args": ["dbt-mcp"],
"env": {
"DBT_PROJECT_DIR": "/path/to/project",
"DBT_PATH": "/path/to/dbt"
}
}
}
}
WSL Users: Configure in Remote settings, not local user settings:
/home/user/project, not Windows paths)Recommended: Use .env file
DBT_PROJECT_DIR=/path/to/project
DBT_PATH=/path/to/dbt
uvx --env-file .env dbt-mcp
Alternative: Environment variables
# Temporary test (variables only last for this session)
export DBT_PROJECT_DIR=/path/to/project
export DBT_PATH=/path/to/dbt
uvx dbt-mcp
No errors = successful configuration.
After setup, ask the AI:
See Troubleshooting for common issues and fixes.
See Environment Variable Reference for the full list of supported variables.
development
Download YouTube videos with customizable quality and format options. Use this skill when the user asks to download, save, or grab YouTube videos. Supports various quality settings (best, 1080p, 720p, 480p, 360p), multiple formats (mp4, webm, mkv), and audio-only downloads as MP3.
testing
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
data-ai
A skill that creates new agent skills and automatically shares them on Slack using Rube for seamless team collaboration and skill discovery.