Analyzes DBT manifest files with automatic schema version detection, providing lineage tracking, upstream and downstream dependency analysis, model metadata retrieval, and compiled code access for DBT projects.
Stores and queries DBT manifest data efficiently using SQLite database storage, with tables for metadata, nodes, sources, macros, and relationship mappings.
DBT Manifest MCP Server
A FastMCP server for analyzing DBT manifests with automatic schema version detection and lineage tracking.
Author: David B Company: DABBLEFISH LLC License: MIT
Features
- Automatic Schema Version Detection: Supports DBT manifest schema versions v0-v12
- Version-Adaptive Parsing: Backward compatibility with legacy manifest formats
- SQLite Database Storage: Efficient querying and data persistence
- Lineage Analysis: Upstream and downstream dependency tracking
- Model Information: Detailed model metadata and compiled code access
- PEP-8 Compliant: Professional Python package structure
Installation
From PyPI (when published)
From Source
Development Installation
Usage
Running the Server
Environment Variables
DBT_MANIFEST_PATH
: Path to the DBT manifest.json file (required)DBT_DB_PATH
: Path to SQLite database file (optional, defaults to ./dbt_manifest.db)
Example
Available Tools
1. refresh_manifest
Refresh DBT manifest data by parsing and storing in SQLite database.
Parameters:
manifest_path
(optional): Path to the DBT manifest.json file
Returns: Success message with statistics
2. get_upstream_lineage
Get upstream lineage for a DBT model.
Parameters:
model_id
: Unique ID of the DBT model (e.g., 'model.my_project.my_model')
Returns: Dictionary with model_id, upstream_models list, and count
3. get_downstream_lineage
Get downstream lineage for a DBT model.
Parameters:
model_id
: Unique ID of the DBT model (e.g., 'model.my_project.my_model')
Returns: Dictionary with model_id, downstream_models list, and count
4. get_model_info
Get detailed information about a DBT model including parent/child counts and compiled code.
Parameters:
model_id
: Unique ID of the DBT model (e.g., 'model.my_project.my_model')
Returns: Dictionary with detailed model information
5. get_schema_info
Get information about the loaded DBT manifest schema version, supported features, and database statistics.
Returns: Dictionary with version info, features, and statistics
Schema Version Support
The server automatically detects and adapts to different DBT manifest schema versions:
- v0-v3: Legacy format with basic node structure
- v4+: Modern format with parent_map and child_map
- v12: Latest format with enhanced metadata
Version-Specific Features
Version | Parent Map | Child Map | Node Structure | Metadata Location |
---|---|---|---|---|
v0-v3 | ❌ (built from dependencies) | ❌ (built from dependencies) | Legacy | Root |
v4-v11 | ✅ | ✅ | Modern | Metadata |
v12 | ✅ | ✅ | Modern | Metadata |
Database Schema
The server creates the following SQLite tables:
metadata
: Schema version and manifest metadatanodes
: DBT models, tests, and other nodessources
: DBT source definitionsmacros
: DBT macro definitionsparent_map
: Parent-child relationshipschild_map
: Child-parent relationships
Example Usage
Error Handling
The server includes comprehensive error handling for:
- Missing or invalid manifest files
- Unsupported schema versions
- Database connection issues
- Invalid model IDs
License
MIT License - see LICENSE file for details.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables the analysis of DBT manifests with automatic schema version detection and lineage tracking, allowing users to query model dependencies, access compiled code, and get detailed model information.
Related MCP Servers
- -securityAlicense-qualityA server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.Last updated -10TypeScriptMIT License
- -securityFlicense-qualityIntelligent knowledge base management tool that enables searching, browsing, and analyzing documents across multiple datasets with smart document analysis capabilities.Last updated -14Python
- AsecurityAlicenseAqualityProvides tools for analyzing project structures, searching through codebases, managing dependencies, and performing file operations with advanced filtering capabilities.Last updated -65121TypeScriptMIT License
- -securityAlicense-qualityA powerful tool designed to help, primarily LLMs, understand and navigate complex codebases. It functions both as a command-line application for on-demand analysis and as an MCP (Model Context Protocol) server, providing continuous repository mapping capabilities to other applications. By generatingLast updated -20Apache 2.0