DataHub MCP Server

A DataHub MCP server: an agent searches tables and columns by metadata, traces lineage and finds analysts' SQL queries

  • 85 ★ on the repository
  • Last commit
  • Apache-2.0
MCP serverOfficial

Extended access

Why this level

  • The server reads metadata for the whole catalog as the token owner, including descriptions, owners and query texts.
  • With `TOOLS_IS_MUTATION_ENABLED=true` an agent changes tags, owners, domains and descriptions in DataHub.
All reasons and checks

acryldata/mcp-server-datahub

Install

Manual install

uvx mcp-server-datahub

Local stdio mode. The DataHub address and token come from `DATAHUB_GMS_URL` and `DATAHUB_GMS_TOKEN` or from `~/.datahubenv`.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The server reads metadata for the whole catalog as the token owner, including descriptions, owners and query texts.
  • With `TOOLS_IS_MUTATION_ENABLED=true` an agent changes tags, owners, domains and descriptions in DataHub.

This is third-party code. Review the repository files before installing.

What it does

The official DataHub MCP server starts with `uvx mcp-server-datahub` and connects an agent to the data catalog. The `search` tool understands `/q` queries with wildcards, field filters and boolean logic, for example `/q tag:PII` or `/q (sales OR revenue) AND quarterly`. `get_lineage` shows data origin at table and column level, `get_dataset_queries` returns real SQL queries run against a dataset, and `list_schema_fields` reads a schema page by page. The server is read-only by default. `TOOLS_IS_MUTATION_ENABLED=true` turns on editing of tags, glossary terms, owners, domains, descriptions and structured properties. For shared use there is a separate HTTP entry point, `mcp-server-datahub-http`, and a Docker image: each client sends its own DataHub token, and the server refuses a shared `DATAHUB_GMS_TOKEN`.

Who it is for. Analysts and data engineers with a running DataHub who ask an agent to find the right table and write SQL based on colleagues' real queries.

Good fit when

  • Before writing SQL, an agent finds the `adoptions` table and looks at how the company queries it.
  • A column is about to be renamed, and the agent lists downstream dashboards and tables that use it.
  • An audit needs a list of every dataset tagged `PII`.
  • A newcomer asks who owns a table and which glossary term describes a metric.
  • After review, an agent applies tags and owners to a list of tables with `TOOLS_IS_MUTATION_ENABLED` on.

Not a fit when

  • DataHub is not deployed: the server connects to an existing instance through `DATAHUB_GMS_URL`.
  • Metadata has not been loaded into the catalog: search and lineage work with what DataHub already holds.
  • The agent must run SQL against the warehouse: the server has no tool for executing queries.
  • All teams plan to share one token: HTTP mode will not start while `DATAHUB_GMS_TOKEN` is set.

Example request

Find the pet adoptions table in DataHub, show its schema and typical queries, then write SQL for the number of adoptions last month.

MCP

Transport
stdio, http, sse
Authentication
API key

Environment variables

DATAHUB_GMS_URL required
DataHub server address.
DATAHUB_GMS_TOKEN required, secret
DataHub personal access token for stdio mode. HTTP mode refuses to start with it.
TOOLS_IS_MUTATION_ENABLED
`true` enables the metadata-editing tools.

Limitations

A running DataHub and its address `DATAHUB_GMS_URL` are required. In stdio mode the token comes from `DATAHUB_GMS_TOKEN` or from the `~/.datahubenv` file that `datahub init` creates. HTTP mode moved to a separate entry point and breaks old deployments that use a shared token. SSE suits only a trusted local network. Metadata-editing tools, `get_me` and document saving are enabled through environment variables, and response length is capped by `TOOL_RESPONSE_TOKEN_LIMIT` at 80000 tokens.

How to disable. Remove the `datahub` server from the MCP client configuration and revoke the personal token in DataHub. Setting `TOOLS_IS_MUTATION_ENABLED=false` turns metadata writes back off.

FAQ

How do I run DataHub MCP Server locally?

Run `uvx mcp-server-datahub` with `DATAHUB_GMS_URL` and `DATAHUB_GMS_TOKEN`. Without the variables the server reads `~/.datahubenv`, which `datahub init` creates.

How do I deploy the server for a whole team?

Run the `acryldata/mcp-server-datahub:latest` image with `DATAHUB_GMS_URL`. Clients connect to `http://localhost:8000/mcp` and send their own token in the `Authorization: Bearer` header on every request.

Can the agent change metadata?

Only after `TOOLS_IS_MUTATION_ENABLED=true`. Then it can add and remove tags, terms, owners and domains and edit descriptions.

How do I find all data tagged PII?

Call `search` with the query `/q tag:PII`. Narrow the result with boolean logic and filters, and page through the rest with pagination.

Which read tools does the server have?

`search`, `get_lineage`, `get_dataset_queries`, `get_entities`, `get_aspect_history`, `list_schema_fields` and `get_lineage_paths_between`. For documents there are also `search_documents` and `grep_documents`.

Discussion

No questions or reviews yet.

Editors’ pick

A token-lean MCP server for PostgreSQL, MySQL, MariaDB, SQL Server and SQLite with a read-only mode

MCP serverBroad access3.8KRepository stars
Official

Official Data Commons MCP server: an agent finds statistical indicators and pulls observations for countries, regions and cities.

MCP serverExtended access149Repository stars

One MCP server for SQLite, SQL Server, PostgreSQL and MySQL: read and change data, edit schemas and export to CSV and JSON

MCP serverBroad access390Repository stars
Official

A single-binary MCP server for MySQL, MariaDB, PostgreSQL and SQLite: read-only by default, with optional PII redaction

MCP serverBroad access33Repository stars
Official

Dremio MCP server: an agent browses tables, looks for patterns in the data and analyzes cluster workload.

MCP serverExtended access53Repository stars

MCP server that gives an agent access to MySQL: schema inspection and queries, read-only by default, writes behind flags

MCP serverExtended access2.2KRepository stars

README in short

The project lists the search, lineage, schema and document tools, the stdio and HTTP modes and the environment variables, and walks through an example from a question about pet adoptions to finished SQL.

README badge

Report a problem

Foxx AIDataHub MCP Server
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.