dbt-mcp
Use this MCP server to inspect a dbt project's run state and diagnose failures. Capabilities include:
run_summary – Summarize the most recent dbt run: how many tests failed and their names.
list_failing_tests – List each failing test, what it guards, failed row counts, and whether it is generic or hand-written.
sample_failing_rows – Fetch the actual rows that caused a test to fail, capped by a limit.
explain_failure – Get an AI-generated root cause, fix suggestion, and confidence grounded in those rows.
model_lineage – Find a model's upstream dependencies, downstream dependents, and blast radius.
test_history – See whether a failure is new or long-standing and its trend.
health – Check configuration, artifact availability, warehouse connectivity, and manifest/warehouse consistency.
usage_stats – Summarize structured call logs for tool usage, latency, and errors.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dbt-mcp what failed in the last dbt run?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sentinel-mcp
Ask your dbt project what's wrong, in plain English. An MCP server that exposes a dbt project's run state as tools, so an AI assistant composes its own answers to questions like "is the warehouse healthy?" or "what broke and why?" — no orchestration written by hand.
Built on dbt-sentinel, which does the artifact parsing, row sampling and grounded analysis.

Tools
Tool | Answers | Uses AI? |
| What failed in the last run, at a glance | No |
| Each failure: what it guards, rows, test type | No |
| The actual offending rows, capped | No |
| Root cause, fix and confidence, grounded in those rows | Yes |
| What a model depends on, what depends on it, blast radius | No |
| New breakage or long-standing, with trend | No |
| Config, connectivity, and manifest/warehouse consistency | No |
| Call counts, latency, errors, estimated time saved | No |
Only one tool calls a model. Lineage, history and summaries are deterministic lookups — using an LLM for them would add cost, latency and risk for no benefit.
Related MCP server: @us-all/dbt-mcp
Quickstart
uv sync
export DBT_TARGET_DIR=/path/to/dbt/target
export DBT_DUCKDB_PATH=/path/to/warehouse.duckdb # or BQ_PROJECT=my-project
export ANTHROPIC_API_KEY=sk-ant-... # only needed for explain_failure
uv run sentinel-mcpRegister it with Claude Code:
claude mcp add sentinel-mcp \
-e DBT_TARGET_DIR=$DBT_TARGET_DIR \
-e DBT_DUCKDB_PATH=$DBT_DUCKDB_PATH \
-e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
-- uv run --directory /path/to/sentinel-mcp sentinel-mcpOr inspect it interactively:
npx @modelcontextprotocol/inspector \
-e DBT_TARGET_DIR=$DBT_TARGET_DIR \
-e DBT_DUCKDB_PATH=$DBT_DUCKDB_PATH \
uv run sentinel-mcpWhat it looks like in use
Asked "Is my dbt project healthy? If not, what broke, why, and what's the blast
radius?", an agent called run_summary, list_failing_tests, sample_failing_rows,
explain_failure and model_lineage in sequence. None of those were named in the
question — that composition is the point of exposing tools rather than a fixed CLI.
It then did something better than answer: it cross-checked the diagnosis against the repository, found that the model's source already contained the correct formula, and concluded the manifest being analysed was a stale snapshot — so the confident, internally-consistent diagnosis described SQL that was no longer deployed.
That finding produced the staleness guard now in health: a manifest older than 24
hours is flagged, because its compiled SQL may no longer match the warehouse. A tool
that can be confidently wrong should say when its inputs are suspect.
Configuration
Variable | Purpose |
| dbt |
| DuckDB warehouse file |
| BigQuery alternative |
| Snowflake (key-pair auth); optional |
| Required only by |
| dbt-sentinel history database (defaults to |
The server deliberately does not read a .env file: MCP clients pass environment
explicitly in their config, so configuration has exactly one source.
Design decisions
Why MCP rather than a CLI. A CLI answers the question you anticipated. MCP tools let an agent compose answers to questions you didn't — it picks the tools and the order.
Thin tools, not one catch-all. Each does one legible thing so a model can reason about when to use it. The docstrings are the interface: they become the descriptions the model reads when choosing.
AI only where it earns its place. Seven of eight tools are deterministic. Only root-cause explanation needs a model.
Read-only by contract. The warehouse is opened read-only; this inspects, never mutates.
Errors are messages, not stack traces. Missing config returns "DBT_TARGET_DIR is not set; point it at a dbt target/ directory" — something an agent can act on and recover from.
Status
Complete: eight tools, a data-quality-brief Claude Skill, structured call logging with
usage measurement, self-contained tests, and CI on Python 3.11 and 3.12. Verified against a
real dbt project via MCP Inspector and Claude Code.
Related projects
dbt-sentinel — the library underneath this server, published on PyPI; does the artifact parsing, row sampling and grounded analysis.
taxi-analytics-pipeline — the dbt project used to verify it end to end.
Development
uv sync --group dev
uv run ruff check .
uv run pytest -vTests build their own dbt fixtures in a temp directory — no warehouse, no API key, no sibling repository required.
Observability and measurement
Every tool call is appended to a structured log (.sentinel-mcp/calls.jsonl by default,
override with DBT_MCP_LOG): tool name, duration, status, truncated arguments, and any
error. usage_stats summarises it.
Logging never writes to stdout. Under stdio transport stdout carries the MCP protocol itself, so anything else written there corrupts the JSON-RPC stream. Records go to a file; logging failures go to stderr and never break a tool call.
Observed on a real dbt project:
Metric | Value |
p50 latency | ~4 ms |
p95 latency | ~11 s |
Deterministic tools | ~4 ms |
| ~11 s |
That 2,500x gap is why only one of eight tools uses a model. Lineage, history and run summaries are graph and file lookups; routing them through an LLM would add latency and cost for no gain in accuracy.
Time saved is estimated, not measured. The figure counts completed diagnoses against
a stated baseline (MANUAL_BASELINE_MINUTES, default 15 — roughly how long it takes to
open run_results.json, cross-reference manifest.json, and query the warehouse by hand).
An earlier version counted every tool call, which overstated the benefit roughly five-fold,
since one question costs several calls.
Available Tools
4 toolshealthA
Check that the server is configured correctly and can reach its inputs.
Verifies the target directory, the required artifacts, and warehouse connectivity.
Inputs: no named parameters. Returns: object
list_failing_testsA
List every failing test in the last dbt run, with what it guards.
Returns the test name, the model and column it protects, how many rows failed,
and whether it is a generic (not_null, unique...) or hand-written test.
Inputs: no named parameters. Returns: result
run_summaryA
Summarise the most recent dbt run: how many tests failed, and their names.
Use this first to judge overall health before drilling into any one failure.
Inputs: no named parameters. Returns: object
sample_failing_rowsA
Fetch the actual rows that caused a test to fail.
Args:
test_name: the test's name or unique_id, as returned by list_failing_tests.
limit: maximum rows to return (kept small on purpose).
Inputs: test_name (required), limit. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: run_summary provides a high-level overview, list_failing_tests enumerates failures in detail, sample_failing_rows retrieves offending rows, and health checks configuration. Even though run_summary and list_failing_tests both relate to failing tests, they operate at different levels of detail, leaving no ambiguity.
Most tool names follow a consistent verb_noun pattern (run_summary, list_failing_tests, sample_failing_rows). However, 'health' breaks the pattern as a single noun rather than a verb_noun construct, a minor but noticeable deviation.
With 4 tools, the server is well-scoped for its purpose of analyzing dbt test failures. Each tool earns its place, and the count is appropriate for a focused domain without feeling thin or bloated.
The tool set covers the full workflow: verifying setup (health), getting a summary (run_summary), drilling into failures (list_failing_tests), and examining specific rows (sample_failing_rows). No obvious missing operations within the stated scope.
Maintenance
Related MCP Connectors
Hosted MCP server for RudderStack, the agentic CDP that runs on your warehouse. Ask Claude, ChatGPT, Cursor or Codex why events failed, which warehouse loads broke, or where your tracking plan is violated. Build and test transformations and audiences. OAuth login, your permissions, PII masked.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
MCP server exposing Buildkite API data (pipelines, builds, jobs, tests) to AI tooling and editors.
156
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server that wraps the dbt CLI tool, enabling AI coding agents to interact with dbt projects through standardized MCP tools. Developed by Mammoth Growth.918MIT
- AlicenseBqualityCmaintenanceA read-only MCP server that exposes dbt project artifacts and data quality result tables (BigQuery/Postgres) to LLM clients, enabling deep introspection, run-history analysis, source freshness, test coverage, and lineage walks.2782 npmMIT
- AlicenseNot gradedqualityDmaintenanceAI-driven MCP server that audits, profiles, detects schema drift, and auto-generates documentation for dbt projects, enabling natural language interaction with your dbt project's health.104MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that provides tools to interact with dbt, including dbt Core, Cloud CLI, Semantic Layer, and Discovery API.Apache 2.0