The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the MCP Datahub listing page.
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-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.
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:
mcp-datahub_X.X.X_darwin_arm64.mcpbmcp-datahub_X.X.X_darwin_amd64.mcpbmcp-datahub_X.X.X_windows_amd64.mcpbOther Installation Methods:
Manual Claude Desktop Configuration (if not using MCPB):
Connect to multiple DataHub instances simultaneously:
Use datahub_list_connections to discover available connections, then pass the connection parameter to any tool.
Import into your own MCP server for custom authentication, tenant isolation, and audit logging:
Override tool descriptions to match your deployment:
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.
Enable optional middleware via the extensions package:
See the library documentation for middleware, selective tool registration, and enterprise patterns.
Build a unified data platform MCP server by combining DataHub metadata with Trino query execution:
See txn2/mcp-trino for the companion library.
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:
query_context with table availabilityquery_table, query_examples, query_availabilityquery_table for immediate SQL usageexecution_context mapping URNs to tablesEnterprise features like access control and audit logging are enabled through middleware adapters:
See the library documentation for complete integration patterns.
| Tool | Description |
|---|---|
datahub_search | Search for datasets, dashboards, pipelines by query and entity type |
datahub_get_entity | Get entity metadata by URN (description, owners, tags, domain) |
datahub_get_schema | Get dataset schema with field types and descriptions |
datahub_get_lineage | Get upstream/downstream lineage (supports level=column for column-level) |
datahub_get_queries | Get SQL queries associated with a dataset |
datahub_browse | Browse catalog: list tags, domains, or data products |
datahub_get_glossary_term | Get glossary term definition and properties |
datahub_get_data_product | Get data product details (owners, domain, properties) |
datahub_list_connections | List configured DataHub server connections (multi-server mode) |
DATAHUB_WRITE_ENABLED=true)3 CRUD tools using the what discriminator pattern — 37 operations total:
| Tool | Operations | Description |
|---|---|---|
datahub_create | 10 | Create tags, domains, glossary terms, data products, documents, applications, queries, incidents, structured properties, data contracts |
datahub_update | 19 | Update descriptions (including tag/glossaryTerm descriptions), tags, glossary terms, links, owners, domains, structured properties, custom properties, incidents, queries, documents, data contracts |
datahub_delete | 8 | Delete queries, tags, domains, glossary entities, data products, applications, documents, structured properties |
Write tools are disabled by default for safety.
Minimum: DataHub 1.3.x. Full feature set: DataHub 1.4.x.
| DataHub Version | Features |
|---|---|
| 1.3.x+ (minimum) | All read tools, all write operations except documents (tags, domains, glossary, data products, queries, owners, links, descriptions, incidents, applications, structured properties incl. delete, data contracts) |
| 1.4.x+ (full) | + Documents (create/update/delete) |
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.
| Variable | Description | Default |
|---|---|---|
DATAHUB_URL | DataHub GraphQL API URL | (required) |
DATAHUB_TOKEN | API token | (required) |
DATAHUB_TIMEOUT | Request timeout (seconds) | 30 |
DATAHUB_DEFAULT_LIMIT | Default search limit | 10 |
DATAHUB_MAX_LIMIT | Maximum limit | 100 |
DATAHUB_CONNECTION_NAME | Display name for primary connection | datahub |
DATAHUB_ADDITIONAL_SERVERS | JSON map of additional servers | (optional) |
DATAHUB_WRITE_ENABLED | Enable write operations (true or 1) | false |
DATAHUB_DEBUG | Enable debug logging (1 or true) | false |
| Variable | Description | Default |
|---|---|---|
MCP_DATAHUB_EXT_LOGGING | Enable structured logging of tool calls | false |
MCP_DATAHUB_EXT_METRICS | Enable metrics collection | false |
MCP_DATAHUB_EXT_METADATA | Enable metadata enrichment on results | false |
MCP_DATAHUB_EXT_ERRORS | Enable error hint enrichment | true |
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.
See CONTRIBUTING.md for guidelines.
Open source by Craig Johnston, sponsored by Deasil Works, Inc.