
Mcp Datahub
io.github.txn2由 GitHub 账号 txn2 发布v1.15.1更新于 Oct 24, 2026
MCP server for DataHub data catalogs. Discover datasets, explore lineage, and access metadata.
概览
将 AI 助手连接到 DataHub 元数据目录,可搜索数据集、查看 schema、追溯血缘并管理目录实体。
- 可以做什么
- 搜索目录中的数据集、仪表板与管道,并浏览标签、域和数据产品
- 按 URN 读取实体元数据、数据集 schema、术语表词条、数据产品详情及关联 SQL 查询
- 追溯上下游血缘,支持列级血缘
- 创建、更新和删除标签、域、术语表词条、数据产品、文档、事件、数据契约等目录实体(写入工具默认关闭)
- 列出已配置的 DataHub 连接,并在多服务器场景中指定目标连接
- 适用场景
- 适合需要助手回答组织数据资产相关问题的场景,例如找到正确的表、了解其 schema 与负责人,或查看哪些下游依赖它。也适合希望助手不仅读取、还能维护目录元数据的团队。
- 运行要求
- 以本地进程运行,可通过 macOS/Windows 安装包、Homebrew 或 Go 安装。需要可访问的 DataHub GraphQL 端点与 API 令牌,通过 DATAHUB_URL 和 DATAHUB_TOKEN(或 YAML/JSON 配置文件)提供。需 DataHub 1.3.x 及以上,文档功能需 1.4.x。多实例可用 DATAHUB_ADDITIONAL_SERVERS。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Datahub,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[GitHub license] [Go Reference] [Go Report Card] [codecov] [OpenSSF Scorecard] [SLSA 3]
An MCP server and composable Go library that connects AI assistants to DataHub metadata catalogs. Search datasets, explore schemas, trace lineage, and access glossary terms and domains.
mcp-datahub.txn2.com | Installation | Library Docs
MCP Data Platform Ecosystem
mcp-datahub is part of a broader suite of open-source MCP servers designed to work together as a composable data platform. Each component can run standalone or be combined to give AI assistants unified access to storage, query engines, and metadata catalogs.
Two Ways to Use
1. Standalone MCP Server
Install and connect to Claude Desktop, Cursor, or any MCP client:
Claude Desktop (Easiest) - Download the .mcpb bundle from releases and double-click to install:
- macOS Apple Silicon:
mcp-datahub_X.X.X_darwin_arm64.mcpb - macOS Intel:
mcp-datahub_X.X.X_darwin_amd64.mcpb - Windows:
mcp-datahub_X.X.X_windows_amd64.mcpb
Other Installation Methods:
Manual Claude Desktop Configuration (if not using MCPB):
Multi-Server Configuration
Connect to multiple DataHub instances simultaneously:
Use datahub_list_connections to discover available connections, then pass the connection parameter to any tool.
2. Composable Go Library
Import into your own MCP server for custom authentication, tenant isolation, and audit logging:
Customizing Tool Descriptions
Override tool descriptions to match your deployment:
Customizing Tool Annotations
Override MCP tool annotations (behavior hints for AI clients):
All 12 tools ship with default annotations: read tools are marked ReadOnlyHint: true; datahub_create is non-destructive and non-idempotent; datahub_update is non-destructive and idempotent; datahub_delete is destructive and idempotent.
Extensions (Logging, Metrics, Error Hints)
Enable optional middleware via the extensions package:
See the library documentation for middleware, selective tool registration, and enterprise patterns.
Combining with mcp-trino
Build a unified data platform MCP server by combining DataHub metadata with Trino query execution:
See txn2/mcp-trino for the companion library.
Bidirectional Integration with QueryProvider
The library supports bidirectional context injection. While mcp-trino can pull semantic context from DataHub, mcp-datahub can receive query execution context back from a query engine:
When a QueryProvider is configured, tool responses are enriched:
- Search results: Include
query_contextwith table availability - Entity details: Include
query_table,query_examples,query_availability - Schema: Include
query_tablefor immediate SQL usage - Lineage: Include
execution_contextmapping URNs to tables
Integration Middleware
Enterprise features like access control and audit logging are enabled through middleware adapters:
See the library documentation for complete integration patterns.
Available Tools
Read Tools (always available)
Write Tools (require DATAHUB_WRITE_ENABLED=true)
3 CRUD tools using the what discriminator pattern — 37 operations total:
Write tools are disabled by default for safety.
DataHub Version Compatibility
Minimum: DataHub 1.3.x. Full feature set: DataHub 1.4.x.
The client gracefully handles version differences — read queries return empty results (not errors) when a feature is unavailable on older versions.
See the tools reference for detailed documentation.
Configuration
Extensions
Config File
As an alternative to environment variables, configure via YAML or JSON:
Load with extensions.LoadConfig("config.yaml"). Environment variables override file values for sensitive fields. Token values support $VAR / ${VAR} expansion.
See configuration reference for all options.
Development
Related Projects
- txn2/mcp-trino (docs) - Composable MCP toolkit for Trino query execution
- DataHub - The open-source metadata platform
Contributing
See CONTRIBUTING.md for guidelines.
License
Open source by Craig Johnston, sponsored by Deasil Works, Inc.
来源:README.md,提交 8b66462
工具
0版本历史
1- v1.15.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分