ZenML MCP server

Integrates with ZenML to enable querying pipeline metadata, triggering new runs, and analyzing ML workflow history through Python-based tools for machine learning pipeline management
Back to servers
Setup instructions
Provider
ZenML
Release date
Mar 10, 2025
Language
Python
Stats
24 stars

The ZenML MCP server provides a standardized way to interact with your ZenML platform through the Model Context Protocol (MCP). This integration allows AI assistants to access information about your ML pipelines, runs, artifacts, and more directly from your ZenML server.

Installation Requirements

Before setting up the ZenML MCP server, you'll need:

  • Access to a deployed ZenML server (sign up for a free trial at ZenML Pro if needed)
  • The uv package manager installed on your system (recommended for easy setup)
  • A local copy of the MCP-ZenML repository

Getting the Code

Clone the repository to your local machine:

git clone https://github.com/zenml-io/mcp-zenml.git

Configuration

You'll need to create an MCP configuration file that tells your AI assistant how to connect to the ZenML server.

Basic MCP Configuration

Create a JSON configuration file with the following structure:

{
    "mcpServers": {
        "zenml": {
            "command": "/usr/local/bin/uv",
            "args": ["run", "path/to/server/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"
            }
        }
    }
}

Make sure to replace the following:

  • The path to your uv installation
  • The full path to the zenml_server.py file in your cloned repository
  • Your ZenML server URL
  • Your ZenML API key (consider using a service account key)

Using with Claude Desktop

Claude Desktop provides the simplest integration method:

  1. Install the latest version of Claude Desktop
  2. Open Claude's Settings menu
  3. Drag the mcp-zenml.dxt file from the repository root onto the settings panel
  4. Follow the guided setup to add your ZenML server URL and API key

Enhancing Output Display

For better readability of ZenML tool results, configure Claude's preferences:

  1. Go to Settings → Profile
  2. In the "What personal preferences should Claude consider in responses?" section, add:
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 helps Claude format ZenML data more readably.

Using with Cursor

To set up the ZenML MCP server with Cursor:

  1. Create a .cursor folder in the root of your repository
  2. Inside it, create a mcp.json file with your configuration (as shown above)
  3. Open Cursor settings and enable the ZenML server

Note: Cursor may sometimes show an error indicator even when the connection is working. You can verify functionality by testing it in the Cursor chat window.

Features Available Through MCP

Once connected, you can use the MCP server to access:

  • User information
  • Stack configurations
  • Pipeline details and runs
  • Step code and logs
  • Services and components
  • Artifacts metadata
  • Run templates and schedules

You can also trigger new pipeline runs if a run template is available.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "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"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "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"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "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"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later