dbt-doctor
Provides tools for auditing, profiling, schema drift detection, test suggestions, and non-destructive documentation generation for dbt projects, including reading manifest.json and updating schema.yml files.
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-doctoraudit my dbt project and show models with lowest test coverage"
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.
Project status
Active alpha. Snapshot date: 2025-12-25. See STATUS.md and KNOWN_LIMITATIONS.md for what is working today, what is planned, and what is not claimed.
Related MCP server: dbt-doctor
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 |
| Overview of all models and their coverage status |
Context |
| Detailed model information including SQL, columns, lineage, and tests |
Audit |
| Project health score and naming convention violations |
Audit |
| Models ranked by their test coverage percentage |
Audit |
| Detection of orphan models and high fan-out nodes |
Audit |
| Single-call dashboard summarizing project status |
Profiling |
| Batched column statistics |
Profiling |
| Read-only SQL execution against your warehouse |
Profiling |
| Comparison of database columns against manifest definitions |
Generation |
| Translation of profile data into dbt test recommendations |
Generation |
| Safe merging of documentation and tests to schema.yml |
Generation |
| Complete end-to-end documentation workflow |
Quick Start
Installation
pip install dbt-doctorConfiguration (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_queryoperations 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 file.
This server cannot be deployed
Maintenance
Related MCP Connectors
The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.
Your Databricks Lakehouse in natural language: run SQL on your SQL warehouses, track long-running qu
Bring Kubit into your AI workflow — query your warehouse with natural language
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceIt enables AI assistants to audit dbt project health, profile data, detect schema drift, suggest tests, and auto-generate documentation through natural language.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to audit project health, profile data, detect schema drift, and auto-generate documentation for dbt projects through natural language. It also provides coverage scoring, test suggestions, and safe schema.yml updates via MCP.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to audit dbt project health, profile warehouse data, detect schema drift, and generate non-destructive schema.yml documentation and test suggestions through natural language.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to audit dbt project health, profile warehouse data, detect schema drift, recommend tests, and safely generate or update schema.yml documentation through natural language. It provides project scoring, coverage rankings, and non-destructive YAML edits while preserving comments and existing configurations.-