Skip to main content

A Model Context Protocol (MCP) server for DataHub

Project description

mcp-server-datahub

A Model Context Protocol server implementation for DataHub. This enables AI agents to query DataHub for metadata and context about your data ecosystem.

Supports both DataHub Core and DataHub Cloud.

Features

  • Searching across all entity types and using arbitrary filters
  • Fetching metadata for any entity
  • Traversing the lineage graph, both upstream and downstream
  • Listing SQL queries associated with a dataset

Demo

Check out the demo video, done in collaboration with the team at Block.

Usage

  1. Install uv

    # On macOS and Linux.
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Locate your authentication details

    For authentication, you'll need the following:

    Alternative: Using ~/.datahubenv for authentication

    You can also use a ~/.datahubenv file to configure your authentication. The easiest way to create this file is to run datahub init and follow the prompts.

    uvx --from acryl-datahub datahub init
    
  3. Configure your MCP client. See below - this will vary depending on your agent.

Claude Desktop

Run which uvx to find the full path to the uvx command.

In your claude_desktop_config.json file, add the following:

{
  "mcpServers": {
    "datahub": {
      "command": "<full-path-to-uvx>",  // e.g. /Users/hsheth/.local/bin/uvx
      "args": ["mcp-server-datahub"],
      "env": {
        "DATAHUB_GMS_URL": "<your-datahub-url>",
        "DATAHUB_GMS_TOKEN": "<your-datahub-token>"
      }
    }
  }
}

Cursor

In .cursor/mcp.json, add the following:

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

Other MCP Clients

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

Troubleshooting

spawn uvx ENOENT

The full stack trace might look 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 the uvx bit of the command with the output of which uvx.

Developing

See DEVELOPING.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_datahub-0.2.1.tar.gz (102.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_datahub-0.2.1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_datahub-0.2.1.tar.gz.

File metadata

  • Download URL: mcp_server_datahub-0.2.1.tar.gz
  • Upload date:
  • Size: 102.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for mcp_server_datahub-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a3ba979e503ad320b44ee8827506780e61ac4b58d7454ea328f1a7dc8a869e13
MD5 48415409c4ca427489934a33b4224382
BLAKE2b-256 8c3db89c11732c91313de84f7d3f30e0188d13562ba37019e334262cc00ef8aa

See more details on using hashes here.

File details

Details for the file mcp_server_datahub-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_datahub-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98aecc5118c40c921b862b6517e4171522a3b836fb62c24cde40819131bf4162
MD5 cb30fe6279110a4896f062276588a757
BLAKE2b-256 3f7076b258d677b08e4bc5fdc6186d51a80c254615132e6738a21e252c08053e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page