AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Dbt Doctor

mcp-astoriel-dbt-doctor · by Astoriel

AI-driven quality & governance MCP Server for dbt projects. Audit coverage, profile data, detect schema drift, and auto-generate documentation — all through natural language with your AI assistant.

— No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add mcp-astoriel-dbt-doctor

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • ✓ Prompt-injection patterns
  • ✓ Secret / credential exfiltration
  • ✓ Dangerous shell & filesystem operations
  • ✓ Untrusted network calls
  • ✓ Known-malicious package signatures

What it can access

  • ✓ Network access No
  • ✓ Filesystem access No
  • ✓ Shell / process execution No
  • ✓ Environment & secrets No
  • ✓ Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-astoriel-dbt-doctor)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
○ 4mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Dbt Doctor? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

AI-driven quality and governance MCP Server for dbt projects. Audit coverage, profile data, detect schema drift, and auto-generate documentation—all through natural language with an AI assistant.


Project status

Active alpha. Snapshot date: 2025-12-25. See [STATUS.md](STATUS.md) and [KNOWNLIMITATIONS.md](KNOWNLIMITATIONS.md) for what is working today, what is planned, and what is not claimed.

What is dbt-doctor?

dbt-doctor is a Model Context Protocol (MCP) server that provides your AI coding assistant with deep context regarding your dbt project's health. Instead of manually running CLI commands and analyzing outputs, you can interact with your AI:

  • "What's the overall health of my dbt project?"
  • "Profile the fct_orders model and suggest appropriate tests."
  • "Auto-document the models that have the lowest test coverage."

The tool handles the heavy operations—reading the manifest, profiling your data warehouse, detecting schema drift, and writing back to schema.yml files—without requiring you to leave the chat.

Note: This tool is designed to complement the official dbt-labs/dbt-mcp. While dbt-labs/dbt-mcp focuses on running dbt commands, dbt-doctor focuses on auditing, profiling, and documentation.

Key Features

Project Auditing

Evaluate your project with a 0–100% score based on documentation, testing, and naming conventions. Access a ranked list of models lacking coverage to prioritize your efforts.

Data Profiling

Perform efficient single-pass column statistics—including NULL rates, cardinality, min/max values, and uniqueness—using one batched SQL query per table to avoid slow row-by-row scanning.

Schema Drift Detection

Compare the current state of your data warehouse against the definitions in your manifest.json. Instantly identify added, removed, or type-changed columns.

Intelligent Test Suggestions

Translate profiling statistics into actionable dbt test recommendations. For example, a uniquely populated column without nulls will prompt suggestions for not_null and unique tests, while low cardinality will suggest accepted_values with predefined options.

Non-Destructive YAML Writing

Update schema.yml files using ruamel.yaml to retain hand-written comments, existing tests, and formatting. The tool only appends missing information and preserves your manual configurations.

End-to-End Documentation Generation

Execute a complete workflow in a single conversational turn: profile a model, suggest tests, preview changes, and write to schema.yml.


Included MCP Tools

| Category | Tool | Description | |---|---|---| | Context | list_models | Overview of all models and their coverage status | | Context | get_model_details | Detailed model information including SQL, columns, lineage, and tests | | Audit | audit_project | Project health score and naming convention violations | | Audit | check_test_coverage | Models ranked by their test coverage percentage | | Audit | analyze_dag | Detection of orphan models and high fan-out nodes | | Audit | get_project_health | Single-call dashboard summarizing project status | | Profiling | profile_model | Batched column statistics | | Profiling | execute_query | Read-only SQL execution against your warehouse | | Profiling | detect_schema_drift | Comparison of database columns against manifest definitions | | Generation | suggest_tests | Translation of profile data into dbt test recommendations | | Generation | update_model_yaml | Safe merging of documentation and tests to schema.yml | | Generation | generate_model_docs | Complete end-to-end documentation workflow |


Quick Start

Installation

pip install dbt-doctor

Configuration (Claude Desktop)

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "dbt-doctor": {
      "command": "dbt-doctor",
      "args": ["--project-dir", "/absolute/path/to/your/dbt/project"]
    }
  }
}

Configuration (Cursor)

Add the following to your .cursor/mcp.json:

{
  "mcpServers": {
    "dbt-doctor": {
      "command": "dbt-doctor",
      "args": ["--project-dir", "/absolute/path/to/your/dbt/project"]
    }
  }
}

Prerequisite: Run dbt compile prior to usage to ensure target/manifest.json is available for dbt-doctor to parse.


Architecture

The application connects the AI Assistant with your dbt project and database through the MCP protocol. It features a read-only analysis layer combined with a secure generation toolkit that merges changes seamlessly into your existing YAML schemas.


Security Design

  • Read-only execution: All execute_query operations operate within a read-only transaction. Write processes are restricted at the database connector level.
  • SQL validation: Table and column identifiers are strictly validated against a whitelist to prevent injection.
  • Stateless connections: Data warehouse credentials are instantiated per connection and are never cached in memory.
  • Preview before commit: The document generation process provides a difference preview prior to rewriting schema.yml, ensuring you retain control over modifications.

Related Projects

| Project | Description | |---|---| | dbt-labs/dbt-mcp | Official MCP focused on dbt command execution | | dbt-coverage | CLI tool for coverage reporting without AI integration | | dbt-project-evaluator | dbt package for project evaluation, requiring installation per project |

dbt-doctor uniquely consolidates auditing, profiling, drift detection, and AI-driven YAML updates into a single server interface.


License

MIT — see the [LICENSE](LICENSE) file.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.