mcp-zenml
by: zenml-io
MCP server to connect an MCP client (Cursor, Claude Desktop etc) with your ZenML MLOps and LLMOps pipelines
📌Overview
Purpose: The MCP Server enables seamless interaction between the Model Context Protocol (MCP) and the ZenML API, standardizing access to various data sources and tools for AI applications.
Overview: This project implements an MCP server specifically designed for ZenML, an open-source platform for building and managing machine learning (ML) and AI pipelines. The server operates under a client-server architecture, allowing users to retrieve and manage live information from ZenML efficiently.
Key Features:
-
Core Read Functionality: Provides access to vital information such as users, stacks, pipelines, and artifacts, facilitating real-time interaction and data management.
-
Trigger Pipeline Runs: Offers the capability to initiate new pipeline runs based on available run templates, enhancing automation and workflow efficiency.
-
Compatibility with Clients: Works with various MCP clients, allowing easy integration with popular tools like Claude Desktop and Cursor.
-
Environment Support: Built as a lightweight program that securely connects to both local and remote data sources, enabling broader usage scenarios for AI applications.
MCP Server for ZenML
This project implements a Model Context Protocol (MCP) server for interacting with the ZenML API.
What is MCP?
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It acts like a "USB-C port for AI applications" — providing a standardized way to connect AI models to different data sources and tools.
MCP follows a client-server architecture where:
- MCP Hosts: Programs like Claude Desktop or IDEs that want to access data through MCP
- MCP Clients: Protocol clients that maintain 1:1 connections with servers
- MCP Servers: Lightweight programs that expose specific capabilities through the standardized protocol
- Local Data Sources: Your computer's files, databases, and services that MCP servers can securely access
- Remote Services: External systems available over the internet that MCP servers can connect to
What is ZenML?
ZenML is an open-source platform for building and managing ML and AI pipelines. It provides a unified interface for managing data, models, and experiments.
For more information, see the ZenML website and our documentation.
Features
The server provides MCP tools to access core read functionality from the ZenML server, enabling access to live information about:
- Users
- Stacks
- Pipelines
- Pipeline runs
- Pipeline steps
- Services
- Stack components
- Flavors
- Pipeline run templates
- Schedules
- Artifacts (metadata about data artifacts, not the data itself)
- Service Connectors
- Step code
- Step logs (if the step was run on a cloud-based stack)
It also allows triggering new pipeline runs (if a run template is present).
Note: This is a beta/experimental release. Feedback and suggestions are welcome! Join the Slack community to share your experience and help improve.
How to Use
Prerequisites
-
Access to a ZenML Cloud server. Sign up for a free trial at ZenML Cloud.
-
Install
uv
locally. Recommended installation methods are via the installer script orbrew
for Mac. See theuv
documentation for details. -
Clone this repository locally:
git clone https://github.com/zenml-io/mcp-zenml.git
MCP Config File
The MCP config file is a JSON file that tells the MCP client how to connect to your MCP server.
Use this template, replacing the dummy values accordingly:
{
"mcpServers": {
"zenml": {
"command": "/usr/local/bin/uv",
"args": ["run", "path/to/zenml_server.py"],
"env": {
"LOGLEVEL": "INFO",
"NO_COLOR": "1",
"PYTHONUNBUFFERED": "1",
"PYTHONIOENCODING": "UTF-8",
"ZENML_STORE_URL": "https://your-zenml-server-goes-here.com",
"ZENML_STORE_API_KEY": "your-api-key-here"
}
}
}
}
Replace the following:
- Path to the locally installed
uv
- Full path to
zenml_server.py
located at the root of this repository - ZenML server URL (found in the ZenML Cloud UI)
- ZenML server API key (found in the ZenML Cloud UI or refer to these docs to create one; a service account is recommended)
You can modify how the MCP server Python file runs, but using uv
is recommended since it manages environment and dependencies.
Installation for Use with Claude Desktop
You need to have Claude Desktop installed.
- Open Claude Desktop.
- Go to 'Settings' → 'Developer' tab → 'Edit Config' button to open the config file location.
- Paste the completed config JSON into the revealed file.
- Restart Claude Desktop.
The ZenML server should appear in the developer settings menu. When chatting with Claude, it will use the newly added ZenML tools.
Optional: Improving ZenML Tool Output Display
To improve JSON output readability in Claude Desktop:
-
Go to Settings → Profile
-
In the "What personal preferences should Claude consider in responses?" section, add the following text:
When using zenml tools which return JSON strings and you're asked a question, you might want to consider using markdown tables to summarize the results or make them easier to view!
This encourages Claude to format ZenML tool outputs as markdown tables, improving readability.
Installation for Use with Cursor
You need to have Cursor installed.
Cursor requires specifying the config file per repository:
- In your repository root, create a
.cursor
folder. - Inside
.cursor
, create amcp.json
file with the config JSON content. - In Cursor settings, enable the ZenML server.
Note: Sometimes a red error indicator may appear even if it is working correctly. You can verify functionality by chatting in the Cursor chat window; it will confirm if it can access the ZenML tools.