DataHub MCP Server
Enables AI agents to search, explore data lineage, understand business context, and generate SQL queries across an organization's data ecosystem.
README
DataHub MCP Server
A Model Context Protocol server implementation for DataHub.
What is DataHub?
DataHub is an open-source context platform that gives organizations a single pane of glass across their entire data supply chain. DataHub unifies data discovery, governance, and observability under one roof for every table, column, dashboard pipeline, document, and ML Model.
With powerful features for data profiling, data quality monitoring, data lineage, data ownership, and data classification, DataHub brings together both technical and organizational context, allowing teams to find, create, use, and maintain trustworthy data.
Use Cases
The DataHub MCP Server enables AI agents to:
-
Find trustworthy data: Search across the entire data landscape using natural language to find the tables, columns, dashboards, & metrics that can answer your most mission-critical questions. Leverage trust signals like data popularity, quality, lineage, and query history to get it right, every time.
-
Explore data lineage & plan for data changes: Understand the impact of important data changes before they impact your downstream users through rich data lineage at the asset & column level.
-
Understand your business: Navigate important organizational context like business glossaries, data domains, data products products, and data assets. Understand how key metrics, business processes, and data relate to one another.
-
Explain & generate SQL queries: Generate accurate SQL queries to answer your most important questions with the help of critical context like data documentation, data lineage, and popular queries across the organization.
Why DataHub MCP Server?
With DataHub MCP Server, you can instantly give AI agents visibility into of your entire data ecosystem. Find and understand data stored in your databases, data lake, data warehouse, and BI visualization tools. Explore data lineage, understand usage & use cases, identify the data experts, and generate SQL - all through natural language.
Structured Search with Context Filtering
Go beyond keyword matching with powerful query & filtering syntax:
- Wildcard matching:
/q revenue_*findsrevenue_kpis,revenue_daily,revenue_forecast - Field searches:
/q tag:PIIfinds all PII-tagged data - Boolean logic:
/q (sales OR revenue) AND quarterlyfor complex queries
SQL Intelligence & Query Generation
Access popular SQL queries, and generate new ones with accuracy:
- See how analysts query tables (perfect for SQL generation)
- Understand join patterns and common filters
- Learn from production query patterns
Table & Column-Level Lineage
Trace data flow at both the table and column level:
- Track how
user_idbecomescustomer_keydownstream - Understand transformation logic
- Upstream and downstream exploration (1-3+ hops)
- Handle enterprise-scale lineage graphs
Understands Your Data Ecosystem
Understand how your data is organized before searching:
- Discover relevant data domains, owners, tags and glossary terms
- Browse across data platforms and environments
- Navigate the complexities of your data landscape without guessing
Usage
See instructions in the DataHub MCP server docs.
Demo
Check out the demo video, done in collaboration with the team at Block.
Tools
The DataHub MCP Server provides the following tools:
search
Search DataHub using structured keyword search (/q syntax) with boolean logic, filters, pagination, and optional sorting by usage metrics.
get_lineage
Retrieve upstream or downstream lineage for any entity (datasets, columns, dashboards, etc.) with filtering, query-within-lineage, pagination, and hop control.
get_dataset_queries
Fetch real SQL queries referencing a dataset or column—manual or system-generated—to understand usage patterns, joins, filters, and aggregation behavior.
get_entities
Fetch detailed metadata for one or more entities by URN; supports batch retrieval for efficient inspection of search results.
list_schema_fields
List schema fields for a dataset with keyword filtering and pagination, useful when search results truncate fields or when exploring large schemas.
get_lineage_paths_between
Retrieve the exact lineage paths between two assets or columns, including intermediate transformations and SQL query information.
Example: Data Discovery & Understanding Flow (for Agents Using DataHub Tools)
This example illustrates how an AI agent could orchestrate DataHub MCP tools to answer a user's data question. It demonstrates the decision-making flow, which tools are called, and how responses are used.
1. User Asks a Question
Example:
"How can I find out how many pets were adopted last month?"
The agent recognizes this as a data discovery → query construction workflow. It needs to (a) find relevant datasets, (b) inspect metadata, (c) construct a correct SQL query.
2. Search for Relevant Datasets
The agent begins with the search tool (semantic or keyword depending on configuration).
Tool: search
Input: natural-language query
Example Call:
{
"query": "pet adoptions"
}
Purpose: Identify datasets like adoptions, pet_profiles, pet_details.
3. Inspect Candidate Datasets
For each dataset returned by search, the agent may fetch metadata.
3.1 List Schema Fields
Tool: list_schema_fields
Input: URN of dataset
Purpose: Understand schema, datatype, candidate fields for querying.
Example:
{
"urn": "urn:li:dataset:(urn:li:dataPlatform:snowflake,mydb.public.adoptions,PROD)"
}
3.2 Fetch Lineage (optional)
Tool: get_lineage
Purpose: Determine whether dataset is derived or authoritative.
3.3 Get Example Queries
Tool: get_dataset_queries
Purpose: Learn typical usage patterns and query templates for the dataset.
4. Understand Entity Relationships
If the question requires joining or entity navigation (e.g., connecting pets → adoptions):
get_entities
To retrieve entities related to a given URN, such as upstream/downstream tables.
get_lineage_paths_between
To calculate exact lineage paths between datasets if needed (e.g., between pet_profiles and adoptions).
5. Construct a Query
The agent now has:
- The correct dataset
- Its schema
- Key fields
- Sample queries
- Relationship and lineage context
The agent constructs an accurate SQL query.
Example:
SELECT COUNT(*)
FROM mydb.public.adoptions
WHERE adoption_date >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '1' MONTH)
AND adoption_date < DATE_TRUNC('month', CURRENT_DATE);
6. Return the Final Answer
The agent may either:
- return the SQL directly,
- run it (if in an environment where query execution is allowed), or
- provide a natural-language answer based on query output.
Summary of Tools Used
| Tool Name | Purpose |
|---|---|
search |
Find relevant datasets for the question. |
list_schema_fields |
Understand dataset structure. |
get_lineage |
Assess data authority and provenance. |
get_dataset_queries |
Learn how the dataset is typically queried. |
get_entities |
Retrieve related entities for context. |
get_lineage_paths_between |
Understand deeper relationships between datasets. |
Developing
See DEVELOPING.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。