Skip to main content

A Model Context Protocol server that enables LLM agents to execute Unity Catalog functions seamlessly.

Project description

mcp-server-unitycatalog: An 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: A 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 will 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: A 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 will 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, while the access token and verbosity level are optional. Run uv run mcp-server-unitycatalog --help for more detailed configuration options.

Argument Environment Variable Description Required/Optional
-u, --uc_server UC_SERVER The base URL of the Unity Catalog server. Required
-c, --uc_catalog UC_CATALOG The name of the Unity Catalog catalog. Required
-s, --uc_schema UC_SCHEMA The name of the schema within a Unity Catalog catalog. Required
-t, --uc_token UC_TOKEN The access token used to authorize API requests to the Unity Catalog server. Optional
-v, --uc_verbosity UC_VERBOSITY The verbosity level for logging. Default: warn. Optional
-l, --uc_log_directory UC_LOG_DIRECTORY The directory 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 the a path that you want to be 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

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. In the current implementation, catalog and schema need to be defined when starting the server. However, they will be implemented as use_catalog and use_schema functions, dynamically updating the list of available functions when the use_xxx is executed.

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

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

mseep_mcp_server_unitycatalog-0.1.0.tar.gz (12.3 MB view details)

Uploaded Source

Built Distribution

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

mseep_mcp_server_unitycatalog-0.1.0-py3-none-any.whl (12.3 MB view details)

Uploaded Python 3

File details

Details for the file mseep_mcp_server_unitycatalog-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mseep_mcp_server_unitycatalog-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b09313d9380c3627f28548e413ffcc76909bab136807db2f1e505d1117f9d36d
MD5 8abc2b69237cb04dad016f8f4adfa09f
BLAKE2b-256 19b6e285c869141d5d1fea7bb6dfa4bf60c4dacf970ec476df138eb3ac9777c4

See more details on using hashes here.

File details

Details for the file mseep_mcp_server_unitycatalog-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_mcp_server_unitycatalog-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b796266a8ba76170584c9f366bb56edfbf1a18873e7b8175b2066e94d0f53aca
MD5 3a00c2eda008ba11a506daa421d0391c
BLAKE2b-256 f4571fcfdab57d78b2868ec9560f14471c0e982b9a44d3a4325fb2f812dcbd6f

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