Skip to main content
Glama
DataHub MCP Server

DataHub MCP Server

DataHub MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with access to DataHub metadata, enabling them to search datasets, retrieve schema information, explore lineage, and more.

Features

  • 🔍 Search Datasets: Find datasets by keyword or query

  • 📊 Dataset Information: Get detailed metadata about datasets

  • 🗂️ Schema Retrieval: Access schema information and field details

  • 🔗 Lineage Tracking: Explore upstream and downstream dependencies

  • 🌐 Entity Search: Search for any type of entity (datasets, dashboards, charts, etc.)

  • 📈 Entity Information: Retrieve detailed information about any entity

Related MCP server: DataHub MCP Server

Prerequisites

  • Node.js 18 or higher

  • A running DataHub instance (self-hosted or DataHub Cloud)

  • DataHub Personal Access Token

Installation

  1. Clone this repository:

git clone <your-repo-url>
cd datahub-mcp-server
  1. Install dependencies:

npm install
  1. Create a .env file based on .env.example:

cp .env.example .env
  1. Configure your environment variables in .env:

DATAHUB_GMS_URL=http://localhost:8080  # or https://<tenant>.acryl.io for DataHub Cloud
DATAHUB_GMS_TOKEN=your_personal_access_token_here
PORT=3000

Getting Your DataHub Token

For Self-Hosted DataHub:

  1. Log in to your DataHub instance

  2. Go to Settings → Access Tokens

  3. Click "Generate Personal Access Token"

  4. Copy the token and add it to your .env file

For DataHub Cloud:

  1. Log in to your DataHub Cloud account at https://<tenant>.acryl.io

  2. Go to Settings → Access Tokens

  3. Generate a new token

  4. Use https://<tenant>.acryl.io as your DATAHUB_GMS_URL

Development

Run the server in development mode:

npm run dev

Build the TypeScript code:

npm run build

Run the built server:

npm start

Available Tools

The MCP server provides the following tools:

1. search_datasets

Search for datasets in DataHub by keyword or query.

Parameters:

  • query (string, required): Search query to find datasets

  • limit (number, optional): Maximum number of results (default: 10)

2. get_dataset_info

Get detailed information about a specific dataset.

Parameters:

  • urn (string, required): The URN of the dataset

3. get_dataset_schema

Get the schema information for a dataset.

Parameters:

  • urn (string, required): The URN of the dataset

4. get_dataset_lineage

Get lineage information (upstream and downstream dependencies) for a dataset.

Parameters:

  • urn (string, required): The URN of the dataset

  • direction (string, optional): Direction of lineage - UPSTREAM, DOWNSTREAM, or BOTH (default: BOTH)

5. search_entities

Search for any type of entity in DataHub.

Parameters:

  • query (string, required): Search query

  • entityType (string, optional): Type of entity (e.g., DATASET, DASHBOARD, CHART, DATA_FLOW)

  • limit (number, optional): Maximum number of results (default: 10)

6. get_entity_info

Get detailed information about any entity by its URN.

Parameters:

  • urn (string, required): The URN of the entity

Deploying to Render

Option 1: Using Render Dashboard

  1. Create a Render Account: Sign up at render.com

  2. Create a New Web Service:

    • Click "New" → "Web Service"

    • Connect your GitHub repository

  3. Configure the Service:

    • Name: datahub-mcp-server

    • Environment: Node

    • Build Command: npm install && npm run build

    • Start Command: npm start

    • Plan: Free (or choose your preferred plan)

  4. Set Environment Variables:

    • Go to the "Environment" tab

    • Add the following variables:

      • DATAHUB_GMS_URL: Your DataHub GMS URL

      • DATAHUB_GMS_TOKEN: Your DataHub personal access token

      • PORT: 10000 (Render's default)

  5. Deploy: Click "Create Web Service"

Option 2: Using render.yaml (Infrastructure as Code)

This repository includes a render.yaml file for automated deployment:

  1. Push your code to GitHub

  2. In Render dashboard, click "New" → "Blueprint"

  3. Connect your repository

  4. Render will automatically detect the render.yaml file

  5. Set the required environment variables:

    • DATAHUB_GMS_URL

    • DATAHUB_GMS_TOKEN

  6. Click "Apply"

Option 3: Using Docker

Build and run with Docker:

# Build the image
docker build -t datahub-mcp-server .

# Run the container
docker run -p 3000:3000 \
  -e DATAHUB_GMS_URL=http://your-datahub-url:8080 \
  -e DATAHUB_GMS_TOKEN=your_token_here \
  datahub-mcp-server

Using with AI Tools

Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "datahub": {
      "command": "node",
      "args": ["/path/to/datahub-mcp-server/dist/index.js"],
      "env": {
        "DATAHUB_GMS_URL": "http://localhost:8080",
        "DATAHUB_GMS_TOKEN": "your_token_here"
      }
    }
  }
}

Cursor

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "datahub": {
      "command": "node",
      "args": ["/path/to/datahub-mcp-server/dist/index.js"],
      "env": {
        "DATAHUB_GMS_URL": "http://localhost:8080",
        "DATAHUB_GMS_TOKEN": "your_token_here"
      }
    }
  }
}

Health Check

The server includes a health check endpoint at /health that returns:

{
  "status": "healthy",
  "service": "datahub-mcp-server",
  "timestamp": "2025-10-07T12:00:00.000Z"
}

This is useful for deployment platforms like Render to monitor the service.

Troubleshooting

Connection Issues

If you can't connect to DataHub:

  • Verify your DATAHUB_GMS_URL is correct

  • Check that your DataHub instance is running and accessible

  • Ensure your token has the necessary permissions

Authentication Errors

If you get authentication errors:

  • Verify your DATAHUB_GMS_TOKEN is valid

  • Check that the token hasn't expired

  • Ensure the token has the required permissions for the operations you're trying to perform

Build Errors

If you encounter build errors:

  • Make sure you're using Node.js 18 or higher

  • Delete node_modules and package-lock.json, then run npm install again

  • Check that all dependencies are properly installed

Architecture

The server consists of:

  • index.ts: Main MCP server implementation with tool definitions and handlers

  • datahub-client.ts: DataHub API client using GraphQL and REST endpoints

  • health.ts: Health check HTTP server for deployment platforms

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Support

For issues and questions:

Available Tools

6 tools
get_dataset_infoC

Get detailed information about a specific dataset

Inputs: urn (required).

get_dataset_lineageB

Get lineage information (upstream and downstream dependencies) for a dataset

Inputs: urn (required), direction.

get_dataset_schemaB

Get the schema information for a dataset

Inputs: urn (required).

get_entity_infoC

Get detailed information about any entity by its URN

Inputs: urn (required).

search_datasetsC

Search for datasets in DataHub by keyword or query

Inputs: query (required), limit.

search_entitiesB

Search for any type of entity in DataHub (datasets, dashboards, charts, etc.)

Inputs: query (required), limit, entityType.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 6 tools

    Disambiguation4/5

    The dataset-specific tools (search_datasets, get_dataset_info) are explicit specializations of the generic search_entities and get_entity_info, which creates mild overlap, but the descriptions clearly signal that the generic tools cover all entity types. get_dataset_info vs. get_dataset_schema is also a slightly fuzzy boundary, though workable.

    Naming Consistency5/5

    All six tools follow a clean verb_noun snake_case pattern, with parallel search_*/get_* prefixes and a consistent get_<resource>_<aspect> structure for schema and lineage.

    Tool Count5/5

    Six tools is well-scoped for a catalog server and each one covers a distinct access path (search, detail, schema, lineage), with no obvious redundancy or filler.

    Completeness3/5

    Core read paths for datasets are covered, but the surface is read-only with no write/annotate, ownership, domain, or tag operations, and schema is only reachable for datasets, not other entity types discoverable via search_entities.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      A Model Context Protocol server that enables AI assistants to interact with Databricks workspaces, allowing them to browse Unity Catalog, query metadata, sample data, and execute SQL queries.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to perform corpus analysis tasks such as discovery, search, and data access via the Model Context Protocol.
      13
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Databricks workspaces, running SQL queries, managing jobs, and exploring schemas via the Model Context Protocol.
      1
      GPL 3.0