Skip to directory

dbt MCP

dbt Labs

stdio (self-hosted); Streamable HTTP (remote)16+ documented tools0

About dbt MCP

dbt's MCP server gives AI clients governed access to dbt projects, models, metrics, lineage, jobs, and data queries. The self-hosted and dbt-hosted remote versions expose different tools and require different setup and authentication.

What you can use it for

  • Explore models, sources, lineage, health, and performance
  • Query metrics and Semantic Layer data
  • Generate or compile SQL and dbt project files
  • Inspect or operate jobs and runs when authorized
Connection and setup
Hosting
Both: self-hosted stdio and dbt-hosted remote HTTP
Transport
stdio (self-hosted); Streamable HTTP (remote)
Endpoint
https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/
Authentication
Remote OAuth (eligible plans and OAuth-capable client), or token headers using a dbt PAT/service token. Self-hosted may use OAuth or local dbt credentials depending on mode.

Requirements

  • dbt project for local development tools
  • uvx for self-hosted installation
  • dbt platform account and endpoint for platform-backed features
  • Semantic Layer/Discovery/Admin API permissions depend on plan
  • Personal access token is required for token-authenticated `execute_sql`; service tokens do not support this tool

Setup steps

  1. Choose remote for hosted data consumption or self-hosted for local project/CLI workflows.
  2. For self-hosted, run `uvx dbt-mcp` and follow dbt's local setup guide to select project path, dbt executable, platform endpoint, and authentication.
  3. For remote, copy the exact MCP Endpoint URL from dbt platform Account settings ? Access URLs; do not guess the hostname. Add it to an HTTP MCP client and complete OAuth in the browser, or configure the documented headers for token auth.
  4. For token setup, use placeholders only in configuration and keep the PAT/service token in secure local storage. Set environment IDs and user ID where required by enabled toolsets.
  5. Verify through a read-only metadata operation such as listing models or lineage before running SQL, dbt CLI, admin, or job tools.
Tools 16+

dbt says the full tool list is kept in sync from the maintained README. Local versus remote mode, plan/API availability, permissions and toolset configuration change the exposed set; these 16 stored names are a subset.

  • execute_sql

    Execute SQL on dbt platform infrastructure with Semantic Layer support.

    01
  • text_to_sql

    Generate SQL from natural language using project context.

    02
  • list_metrics

    Retrieve defined Semantic Layer metrics.

    03
  • query_metrics

    Query metrics with filters and grouping.

    04
  • get_all_models

    Retrieve model names and descriptions.

    05
  • get_all_sources

    List sources and freshness information.

    06
  • get_lineage

    Retrieve a resource lineage graph.

    07
  • get_node_details

    Retrieve details for a dbt resource.

    08
  • get_model_health

    Get run status, test results, and upstream source freshness.

    09
  • run

    Execute dbt models.

    10
  • build

    Execute models, tests, snapshots, and seeds in DAG order.

    11
  • test

    Run dbt tests.

    12
  • list_jobs

    List dbt platform jobs.

    13
  • trigger_job_run

    Trigger a dbt platform job run.

    14
  • search_product_docs

    Search official dbt product documentation.

    15
  • get_product_doc_pages

    Fetch full dbt documentation pages.

    16

This server’s available tools can vary by account, permissions, or configuration. The list shown is not its full runtime catalog.

Limitations and notes
  • Remote MCP does not support local dbt CLI commands such as `dbt run`, `dbt build`, or `dbt test`; use self-hosted for those.
  • Tool and API access vary by account plan and permissions; `text_to_sql` requires available dbt Copilot actions/AI feature access.
  • SQL execution and dbt CLI tools can affect warehouse data or project objects. Require user review before execution.
  • Remote MCP uses dbt platform API rate limits; current docs state default 5,000 requests/minute/IP.
Original sources
  • official tool reference

    dbt’s current docs say the full tool list is fetched from the maintained README and varies by self-hosted versus remote mode, plan, API availability, toolsets, permissions and environment. The 16 stored identifiers are a subset, not a complete inventory.

  • official documentation or source

    dbt’s current docs say the full tool list is fetched from the maintained README and varies by self-hosted versus remote mode, plan, API availability, toolsets, permissions and environment. The 16 stored identifiers are a subset, not a complete inventory.

Documentation checked 2026-10-28T12:38:00.000Z. Connection has not been runtime tested.