Unity Catalog MCP Server for CRUD and Execution
Enable LLMs to manage Unity Catalog Functions and run them as tools with an MCP server that supports CRUD and execution via Unity Catalog AI.
npx -y @ognis1205/mcp-server-unitycatalogOverview
This MCP (Model Context Protocol) server exposes Unity Catalog functions as first-class tools for large language models (LLMs). It implements CRUD (create, read, update, delete) operations for Unity Catalog Functions and supports remote execution of those functions through Unity Catalog AI, letting an LLM discover, manage, and invoke data-aware tools at runtime.
For developers building LLM integrations, the server provides a standardized MCP surface so models can list available tools, inspect function signatures and metadata, modify functions, and run them as tool calls. That enables automation scenarios where an LLM not only suggests code or SQL, but also updates and executes cataloged functions that run on your Databricks/Unity Catalog environment.
GitHub: https://github.com/ognis1205/mcp-server-unitycatalog
Features
- CRUD management for Unity Catalog Functions (create, read, update, delete)
- Exposes functions as MCP tools so LLMs can discover and call them
- Execution integration with Unity Catalog AI to run functions and return structured results
- HTTP API compatible with MCP expectations (tool listing, metadata, and execute)
- Configurable via environment variables or Docker for easy deployment
- Audit-friendly: logs invocations and returns execution metadata for observability
- Designed for safe, permissioned operation within Databricks/Unity Catalog environments
Installation / Configuration
Clone the repository and run the server locally or in a container. The examples below assume a Python-based implementation with a standard requirements file and a Uvicorn entrypoint; adapt to the start script provided in the repo if different.
Clone repo:
Python virtualenv and run:
# start the server (example)
Docker build and run:
Important environment variables
| Variable | Description |
|---|---|
| DATABRICKS_HOST | Databricks workspace URL (e.g. https://adb-1234567890123456.17.azuredatabricks.net) |
| DATABRICKS_TOKEN | Personal access token or service principal token with Unity Catalog permissions |
| UNITY_CATALOG_METASTORE | Target metastore name or ID (where functions live) |
| MCP_SERVER_PORT | Port for the MCP server (default 8000) |
| LOG_LEVEL | Optional logging level (info, debug, warn, error) |
Security notes:
- Ensure the token has least-privilege access for creating and executing functions.
- Run the server inside a secure network environment with access controls to Databricks.
Available Tools / Resources
The server exposes MCP-compatible endpoints to discover and manage tools. Typical endpoints (adjust prefix/path to match the repo implementation):
- GET /tools
- Returns a list of available Unity Catalog Functions exposed as tools (id, name, description, input schema, output schema)
- GET /tools/{tool_id}
- Returns metadata and signature for a single function/tool
- POST /tools
- Create a new Unity Catalog Function (payload includes name, code or SQL, parameters, annotations)
- PUT /tools/{tool_id}
- Update function metadata or implementation
- DELETE /tools/{tool_id}
- Remove a function from the catalog
- POST /tools/{tool_id}/execute
- Invoke the function via Unity Catalog AI; returns execution result, logs, and structured output
Example: list tools (curl)
|
Example: execute a tool (curl)
|
Responses include structured metadata so an LLM can parse results and continue multi-step workflows.
Use Cases
- LLM-driven data tasks: Let an LLM discover analytical functions (aggregation, cohort analysis, transformations) and invoke them directly to get live results instead of returning code for a human to run.
- Function lifecycle automation: Use an LLM orchestration agent to create or update Unity Catalog Functions from high-level prompts — e.g., “Create a function to compute weekly active users across tables X and Y” — then run the function to validate outcomes.
- Model-as-tool inference: Wrap deployed model inference logic as Unity Catalog Functions and allow LLMs to invoke them as tools for scoring or enrichment in multi-step prompts.
- Auditable CI/CD for data functions: Track creation, modification, and invocations of functions through the MCP server’s logs and execution metadata for governance and reproducibility.
- Interactive data assistants: Embed the MCP server in a chat assistant so the model can both suggest and run SQL or data-processing functions, returning tabular outputs the assistant can interpret and summarize.
Getting started tips
- Start by connecting the server to a non-production metastore to safely experiment with create/update flows.
- Define clear input/output schemas for functions so models can reliably construct tool calls
Common Issues & Solutions
The MCP server is listed on the Glama directory but is not usable due to the absence of a Dockerfile. This prevents others from accessing and utilizing the server.
I ran into this too! It’s frustrating when your server isn’t available for others to use. Adding a Dockerfile is essential for making your MCP server functional on Glama. I found that installing `@ChromeDevTools/chrome-devtools-mcp` helped streamline the process of creating and managing the Dockerfile. This package provides the necessary tools to ensure your server is properly configured and ready for use. Just run the following command to install it: npm install @ChromeDevTools/chrome-devtools-mcp
npm install @ChromeDevTools/chrome-devtools-mcp