DataHub MCP server

Integrates with DataHub's API to enable metadata management, discovery, and governance across diverse data assets in complex ecosystems.
Back to servers
Provider
Acryl Data
Release date
Mar 01, 2025
Language
Python
Stats
22 stars

The Model Context Protocol (MCP) server for DataHub allows AI agents to query DataHub for metadata and context about your data ecosystem. It enables AI assistants to search, fetch metadata, traverse lineage graphs, and access SQL queries associated with datasets in your DataHub instance.

Installation

Prerequisites

You'll need to install uv, a Python package manager and installer:

# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

Authentication Setup

Before using the MCP server, you need to prepare your DataHub authentication details:

  • The URL of your DataHub instance (e.g., https://tenant.acryl.io/gms)
  • A personal access token from DataHub

Alternatively, you can use a ~/.datahubenv file by running:

uvx --from acryl-datahub datahub init

This command will guide you through creating the necessary configuration file.

Configuration

Once you have your authentication details, you'll need to configure your MCP client to connect to DataHub. The configuration process varies depending on which AI agent you're using.

Claude Desktop Configuration

First, find the full path to the uvx command:

which uvx

Then update your claude_desktop_config.json file with:

{
  "mcpServers": {
    "datahub": {
      "command": "<full-path-to-uvx>",
      "args": ["mcp-server-datahub"],
      "env": {
        "DATAHUB_GMS_URL": "<your-datahub-url>",
        "DATAHUB_GMS_TOKEN": "<your-datahub-token>"
      }
    }
  }
}

Cursor Configuration

Add the following to your .cursor/mcp.json file:

{
  "mcpServers": {
    "datahub": {
      "command": "uvx",
      "args": ["mcp-server-datahub"],
      "env": {
        "DATAHUB_GMS_URL": "<your-datahub-url>",
        "DATAHUB_GMS_TOKEN": "<your-datahub-token>"
      }
    }
  }
}

Other MCP Clients

For other MCP clients, use this generic configuration:

command: uvx
args:
  - mcp-server-datahub
env:
  DATAHUB_GMS_URL: <your-datahub-url>
  DATAHUB_GMS_TOKEN: <your-datahub-token>

Troubleshooting

Common Issues

"spawn uvx ENOENT" Error

If you encounter an error like this:

2025-04-08T19:58:16.593Z [datahub] [error] spawn uvx ENOENT {"stack":"Error: spawn uvx ENOENT\n    at ChildProcess._handle.onexit (node:internal/child_process:285:19)\n    at onErrorNT (node:internal/child_process:483:16)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"}

Solution: Replace uvx in your configuration with the full path to the uvx executable, which you can find using which uvx.

Features

The MCP server for DataHub supports:

  • Searching across all entity types using arbitrary filters
  • Fetching detailed metadata for any entity
  • Traversing lineage graphs (both upstream and downstream)
  • Listing SQL queries associated with specific datasets

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later