MCP HubMCP Hub
ognis1205

mcp-server-unitycatalog

by: ognis1205

Unity Catalog AI Model Context Protocol Server

12created 03/02/2025
Visit
Unity
AI

📌Overview

Purpose: To provide a Model Context Protocol (MCP) server integrated with Unity Catalog functionalities.

Overview: The mcp-server-unitycatalog is designed to facilitate interaction with Unity Catalog by offering dedicated MCP tools to manage catalog functions efficiently. It enables users to perform various operations associated with Unity Catalog Functions with ease and flexibility.

Key Features:

  • uc_list_functions: This tool allows users to list all functions present within a specified parent catalog and schema, aiding in function management.

  • uc_get_function: It retrieves detailed information about a specified function within a catalog and schema, useful for checking function specifications before execution.

  • uc_create_function: Facilitates the creation of new functions within Unity Catalog, though it is noted as experimental and subject to change in future versions.

  • uc_delete_function: Enables users to delete specific functions from the catalog, helping maintain a clean and organized function library.


mcp-server-unitycatalog: A Unity Catalog MCP Server

Overview

A Model Context Protocol server for Unity Catalog. This server provides Unity Catalog Functions as MCP tools.

Tools

You can use all Unity Catalog Functions registered in Unity Catalog alongside the following predefined Unity Catalog AI tools:

  1. uc_list_functions

    • Lists functions within the specified parent catalog and schema.
    • Returns: A list of functions retrieved from Unity Catalog.
  2. uc_get_function

    • Gets a function within a parent catalog and schema.
    • Input:
      • name (string): The name of the function (not fully-qualified).
    • Returns: Function details retrieved from Unity Catalog.
  3. uc_create_function

    • Creates a function within a parent catalog and schema. WARNING: This API is experimental and may change in future versions.
    • Input:
      • name (string): The name of the function (not fully-qualified).
      • script (string): The Python script including the function to be registered.
    • Returns: Function details created within Unity Catalog.
  4. uc_delete_function

    • Deletes a function within a parent catalog and schema.
    • Input:
      • name (string): The name of the function (not fully-qualified).
    • Returns: None.

Installation

Using uv

When using uv no specific installation is needed. We use uvx to directly run mcp-server-git.

Configuration

These values can also be set via CLI options or .env environment variables. Required arguments are the Unity Catalog server, catalog, and schema; access token and verbosity are optional.

Run uv run mcp-server-unitycatalog --help for detailed configuration options.

ArgumentEnvironment VariableDescriptionRequired/Optional
-u, --uc_serverUC_SERVERThe base URL of the Unity Catalog server.Required
-c, --uc_catalogUC_CATALOGThe name of the Unity Catalog catalog.Required
-s, --uc_schemaUC_SCHEMAThe name of the schema within a Unity Catalog catalog.Required
-t, --uc_tokenUC_TOKENAccess token used to authorize API requests.Optional
-v, --uc_verbosityUC_VERBOSITYLogging verbosity level. Default: warn.Optional
-l, --uc_log_directoryUC_LOG_DIRECTORYDirectory where log files will be stored. Default: .mcp_server_unitycatalog.Optional

Usage with Claude Desktop or VSCode Cline

Add this to your claude_desktop_config.json (or cline_mcp_settings.json):

Using uv

{
  "mcpServers": {
    "unitycatalog": {
      "command": "uv",
      "args": [
        "--directory",
        "/<path to your local git repository>/mcp-server-unitycatalog",
        "run",
        "mcp-server-unitycatalog",
        "--uc_server",
        "<your unity catalog url>",
        "--uc_catalog",
        "<your catalog name>",
        "--uc_schema",
        "<your schema name>"
      ]
    }
  }
}

Using docker

Note: replace '/Users/username' with a path you want accessible by this tool

{
  "mcpServers": {
    "unitycatalog": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "mcp/unitycatalog",
        "--uc_server",
        "<your unity catalog url>",
        "--uc_catalog",
        "<your catalog name>",
        "--uc_schema",
        "<your schema name>"
      ]
    }
  }
}

Building

Using Docker:

docker build -t mcp/unitycatalog .

Future Plans

  • Implement support for list_functions.
  • Implement support for get_function.
  • Implement support for create_python_function.
  • Implement support for execute_function.
  • Implement support for delete_function.
  • Implement semantic catalog explorer tools.
  • Add Docker image.
  • Implement use_xxx methods to dynamically update functions (use_catalog and use_schema).

License

This MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software under the terms of the MIT License. See the LICENSE file in the project repository for details.