dbt-docs-mcp is an MCP (Model Context Protocol) server for interacting with dbt Docs. It accesses dbt project metadata, including dbt Docs artifacts (manifest.json, catalog.json), exposes dbt graph information, and allows querying node details, model- and column-level lineage, and related metadata.
Purpose: This server is intended for scenarios that require programmatic querying of dbt project metadata and lineage, providing the graph structure and node information from dbt Docs to clients that support the MCP protocol.
Main capabilities:
- Search dbt nodes: find nodes by name (search_dbt_node_names); locate nodes by column name (search_dbt_column_names); search within a node's compiled SQL code (search_dbt_sql_code).
- View nodes: get detailed attributes of any node by its unique ID (get_dbt_node_attributes).
- Explore lineage: find a node's direct upstream dependencies (predecessors, get_dbt_predecessors); find a node's direct downstream dependencies (successors, get_dbt_successors).
- Column-level lineage: trace all upstream sources of a column in a model (get_column_ancestors); trace all downstream dependencies of a column in a model (get_column_descendants).
Usage: Prerequisites: Python and uv are installed. Clone the repository: git clone <repository-url>, then cd dbt-docs-mcp. Optional: parse the dbt manifest to generate column-level lineage. Set up the required Python environment, for example: uv sync; use the provided script scripts/create_manifest_cl.py, providing the dbt manifest path, dbt catalog path, and the target output paths for the schema mapping file and column-level lineage file: python scripts/create_manifest_cl.py --manifest-path PATH_TO_YOUR_MANIFEST_FILE --catalog-path PATH_TO_YOUR_CATALOG_FILE --schema-mapping-path DESIRED_OUTPUT_PATH_FOR_SCHEMA_MAPPING --manifest-cl-path DESIRED_OUTPUT_PATH_FOR_MANIFEST_CL Depending on the size of the dbt project, creating column-level lineage may take a long time (hours). Run the server: if the target MCP client (Claude Desktop, Cursor, etc.) supports mcp.json, you can refer to the following configuration: { "mcpServers": { "DBT Docs MCP": { "command": "uv", "args": [ "run", "--with", "networkx,mcp[cli],rapidfuzz,dbt-core,python-decouple,sqlglot,tqdm", "mcp", "run", "/Users/mattijs/repos/dbt-docs-mcp/src/mcp_server.py" ], "env": { "MANIFEST_PATH": "/Users/mattijs/repos/dbt-docs-mcp/inputs/manifest.json", "SCHEMA_MAPPING_PATH": "/Users/mattijs/repos/dbt-docs-mcp/outputs/schema_mapping.json", "MANIFEST_CL_PATH": "/Users/mattijs/repos/dbt-docs-mcp/outputs/manifest_column_lineage.json" } } } }
Suggested extensions:
- A tool that allows executing SQL queries.
- A tool that retrieves table/view/column metadata directly from the database.
- A tool for searching the knowledge base.
Applicable scenarios: dbt project metadata querying, upstream and downstream lineage analysis of models and columns, retrieving nodes by name or column name, viewing node attributes, etc. Suitable for use with MCP-supporting clients.
Limitations: Column-level lineage generation may take hours depending on project size; other pricing, platform, or performance information is not currently provided.