Logo MCP Server Datahub

MCP Server Datahub

Tổ chức
acryldata

The official Model Context Protocol (MCP) server for DataHub (https://datahub.com)

Nhà phát hànhacryldata
Kho mãmcp-server-datahub
Ngôn ngữPython
Bản fork
94
Sao
83
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    MCP Server Datahub cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    83 sao và 94 bản fork từ kho mã được liên kết.

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_* finds revenue_kpis, revenue_daily, revenue_forecast
  • Field searches: /q tag:PII finds all PII-tagged data
  • Boolean logic: /q (sales OR revenue) AND quarterly for 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_id becomes customer_key downstream
  • 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.

Local stdio deployment

The default transport remains stdio for local MCP clients:

bash
uvx mcp-server-datahub

The stdio server loads DATAHUB_GMS_URL and DATAHUB_GMS_TOKEN from the environment, falling back to ~/.datahubenv created by datahub init. This is the local deployment mode and does not require HTTP authentication.

The local CLI also supports SSE for trusted, local-network use. SSE does not provide the per-request bearer authentication used by the dedicated HTTP entry point and should not be exposed as a shared network service.

Docker HTTP deployment

The container runs the stateless HTTP transport on port 8000. It deliberately does not use a server-wide DATAHUB_GMS_TOKEN; each MCP client supplies its own DataHub token so DataHub permissions and audit identity are preserved per user.

Breaking change for existing HTTP deployments: HTTP now has a separate mcp-server-datahub-http entry point. It refuses to start when DATAHUB_GMS_TOKEN is configured, and every client must send its own DataHub bearer token. Local stdio and SSE behavior are unchanged.

bash
docker run --rm -p 8000:8000 \
  -e DATAHUB_GMS_URL=https://your-datahub.example \
  acryldata/mcp-server-datahub:latest

The same isolated HTTP entry point is available outside Docker:

bash
DATAHUB_GMS_URL=https://your-datahub.example mcp-server-datahub-http

Connect to http://localhost:8000/mcp and include the token on every request:

text
Authorization: Bearer <datahub-personal-access-token>

Tokens are accepted only in the Authorization header; query-string tokens such as ?access_token=... are rejected.

DataHub must have METADATA_SERVICE_AUTH_ENABLED=true to establish caller identity. When upstream auth is disabled, GMS may return a synthetic, non-existent actor for arbitrary bearer values; the MCP server cannot correct that upstream configuration.

For a local build, create a .env file containing DATAHUB_GMS_URL, then run:

bash
docker compose up --build

The image and server expose an unauthenticated GET /health endpoint for container, load-balancer, and Kubernetes probes. The endpoint reports process health only and does not contact DataHub.

yaml
livenessProbe:
  httpGet:
    path: /health
    port: 8000
readinessProbe:
  httpGet:
    path: /health
    port: 8000

Bearer tokens must be protected in transit. Terminate TLS and apply rate-limiting at an ingress or reverse proxy before exposing the HTTP deployment outside a trusted network. Rate limiting is especially important because each new invalid token can trigger a validation request to GMS.

Successfully verified tokens and their DataHub clients are cached for five minutes. If a cached request receives a 401 or 403 from DataHub, that client is evicted and the next request revalidates the token. Failed validations are not cached; concurrent upstream validations are bounded to protect DataHub.

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.

get_aspect_history

Retrieve the current value and a bounded, newest-first page of retained historical versions for one or more entity/aspect pairs, with per-version ingestion and audit provenance.

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.

Mutation Tools

These tools allow modifying metadata in DataHub. They are enabled via the TOOLS_IS_MUTATION_ENABLED=true environment variable.

add_tags / remove_tags

Add or remove tags from entities or schema fields (columns). Supports bulk operations on multiple entities.

add_terms / remove_terms

Add or remove glossary terms from entities or schema fields. Useful for applying business definitions and data classification.

add_owners / remove_owners

Add or remove ownership assignments from entities. Supports different ownership types (technical owner, data owner, etc.).

set_domains / remove_domains

Assign or remove domain membership for entities. Each entity can belong to one domain.

update_description

Update, append to, or remove descriptions for entities or schema fields. Supports markdown formatting.

add_structured_properties / remove_structured_properties

Manage structured properties (typed metadata fields) on entities. Supports string, number, URN, date, and rich text value types.

User Tools

These tools provide information about the authenticated user. Enabled via TOOLS_IS_USER_ENABLED=true.

get_me

Retrieve information about the currently authenticated user, including profile details and group memberships.

Document Tools

These tools work with documents (knowledge articles, runbooks, FAQs) stored in DataHub. Document tools are automatically hidden if no documents exist in the catalog.

search_documents

Search for documents using keyword search with filters for platforms, domains, tags, glossary terms, and owners.

grep_documents

Search within document content using regex patterns. Useful for finding specific information across multiple documents.

save_document

Save standalone documents (insights, decisions, FAQs, notes) to DataHub's knowledge base. Documents are organized under a configurable parent folder.

Configuration

Environment Variables

VariableDefaultDescription
DATAHUB_GMS_URLnoneDataHub server URL. Required in HTTP mode; stdio can also load it from ~/.datahubenv.
DATAHUB_GMS_TOKENnoneLegacy stdio/SSE credential. HTTP mode refuses to start when this shared credential is set.
FASTMCP_HOSTFastMCP default (127.0.0.1); image default (0.0.0.0)HTTP/SSE bind address.
FASTMCP_PORT8000HTTP/SSE listen port; also used by the image health check.
TOOLS_IS_MUTATION_ENABLEDfalseEnable mutation tools (add/remove tags, owners, etc.)
TOOLS_IS_USER_ENABLEDfalseEnable user tools (get_me)
DATAHUB_MCP_DOCUMENT_TOOLS_DISABLEDfalseCompletely disable document tools
SAVE_DOCUMENT_TOOL_ENABLEDtrueEnable or disable save_document. The tool is registered only when TOOLS_IS_MUTATION_ENABLED=true.
SAVE_DOCUMENT_PARENT_TITLESharedTitle for the parent folder of saved documents
SAVE_DOCUMENT_ORGANIZE_BY_USERfalseOrganize saved documents by user
SAVE_DOCUMENT_RESTRICT_UPDATEStrueOnly allow updating documents in the shared folder
TOOL_RESPONSE_TOKEN_LIMIT80000Maximum tokens for tool responses
QUERY_LENGTH_LIMIT5000Maximum characters for SQL query statements and view definitions in tool responses
ENTITY_SCHEMA_TOKEN_BUDGET16000Token budget per entity for schema fields
DESCRIPTION_LENGTH_LIMIT5000Maximum characters for an entity-level description
FIELD_DESCRIPTION_LENGTH_LIMIT120Maximum characters for a schema field's description, edited description and deprecation note
DISABLE_NEWER_GMS_FIELD_DETECTIONfalseDisable adaptive GMS field detection
DATAHUB_MCP_DISABLE_DEFAULT_VIEWfalseDisable automatic default view application
SEMANTIC_SEARCH_ENABLEDfalseEnable semantic (AI-powered) search

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:

json
{
  "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:

json
{
  "urn": "urn:li:dataset:(urn:li:dataPlatform:snowflake,mydb.public.adoptions,PROD)"
}

list_schema_fields is paginated. A successful first response is not necessarily the complete schema: continue while remainingCount is greater than zero. Advance by the number of fields actually returned, not by the requested limit, because the response token budget can shorten a page:

text
offset = 0
all_fields = []

do:
    page = list_schema_fields(urn=dataset_urn, limit=100, offset=offset)
    all_fields.extend(page.fields)
    offset = page.offset + page.returned
while page.remainingCount > 0

This pattern also terminates safely if an offset is already beyond the last field: the tool returns an empty page with remainingCount: 0.

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:

sql
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 NamePurpose
searchFind relevant datasets for the question.
list_schema_fieldsUnderstand dataset structure.
get_lineageAssess data authority and provenance.
get_dataset_queriesLearn how the dataset is typically queried.
get_entitiesRetrieve related entities for context.
get_lineage_paths_betweenUnderstand deeper relationships between datasets.

Developing

See DEVELOPING.md.

Dùng MCP MCP Server Datahub với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối MCP Server Datahub, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm MCP Server Datahub làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của MCP Server Datahub.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "mcp-server-datahub": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của MCP Server Datahub, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của MCP Server Datahub.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng MCP Server Datahub giúp tôi làm việc này không?
MCP Server Datahub
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng MCP Server Datahub.

Câu hỏi thường gặp

Máy chủ MCP MCP Server Datahub dùng để làm gì?

MCP Server Datahub là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP MCP Server Datahub với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng MCP Server Datahub với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP MCP Server Datahub với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối MCP Server Datahub, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP MCP Server Datahub với TypingMind?

MCP Server Datahub hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP MCP Server Datahub cung cấp những công cụ nào trong TypingMind?

MCP Server Datahub cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP MCP Server Datahub không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu MCP Server Datahub yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇