io.github.zenml-io/mcp-zenml

MCP server for ZenML - browse stacks, pipelines, runs, artifacts & trigger pipeline runs via API

43MITdevtools

Install

Config snippet generator goes here (5 client tabs)

README

# MCP Server for ZenML
[![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/zenml-io/mcp-zenml)](https://archestra.ai/mcp-catalog/zenml-io__mcp-zenml)

This project implements a [Model Context Protocol
(MCP)](https://modelcontextprotocol.io/introduction) server for interacting with
the [ZenML](https://zenml.io) API.

![ZenML MCP Server](assets/mcp-zenml.png)

## 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](https://zenml.io) and [our documentation](https://docs.zenml.io).

## Features

The server provides MCP tools to access core read functionality from the ZenML
server, providing a way to get live information about:

### Core Entities
- **Users** - user accounts and permissions
- **Stacks** - infrastructure configurations
- **Stack Components** - individual stack building blocks
- **Flavors** - available component types
- **Service Connectors** - cloud authentication

### Pipeline Execution
- **Pipelines** - pipeline definitions
- **Pipeline Runs** - execution history and status
- **Pipeline Steps** - individual step details, code, and logs
- **Schedules** - automated run schedules
- **Artifacts** - metadata about data artifacts (not the data itself)

### Deployment & Serving
- **Snapshots** - frozen pipeline configurations (the "what to run/serve" artifact)
- **Deployments** - runtime serving instances with status, URL, and logs
- **Services** - model serving endpoints

### Organization & Discovery
- **Projects** - organizational containers for ZenML resources
- **Tags** - cross-cutting metadata labels for discovery
- **Builds** - pipeline build artifacts with image and code info

### Models
- **Models** - ML model registry entries
- **Model Versions** - versioned model artifacts

### Deprecated (migration recommended)
- ~~Pipeline run templates~~ → use **Snapshots** instead (see [Migration Guide](#migration-run-templates--snapshots))

The server also allows you to **trigger new pipeline runs** using snapshots (preferred) or run templates (deprecated).

*Note: We're continuously improving this integration based on user feedback.
Please join our [Slack community](https://zenml.io/slack) to share your experience
and help us make it even better!*

## Available Tools

The MCP server exposes the following tools, grouped by category:

### Pipeline Execution (New in v1.2)
| Tool | Description |
|------|-------------|
| `get_snapshot` | Get a frozen pipeline configuration by name/ID |
| `list_snapshots` | List snapshots with filters (runnable, deployable, deployed, tag) |
| `get_deployment` | Get a deployment's runtime status and URL |
| `list_deployments` | List deployments with filters (status, pipeline, tag) |
| `get_deployment_logs` | Get bounded logs from a deployment (tail=100 default, max 1000) |
| `trigger_pipeline` | Trigger a pipeline run (prefer `snapshot_name_or_id` parameter) |

### Organization (New in v1.2)
| Tool | Description |
|------|-------------|
| `get_active_project` | Get the currently active project |
| `get_project` | Get project details by name/ID |
| `list_projects` | List all projects |
| `get_tag` | Get tag details (exclusive, colors) |
| `list_tags` | List tags with filters (resource_type) |
| `get_build` | Get build details (image, code embedding) |
| `list_builds` | List builds with filters (is_local, contains_code) |

### Core Entities
| Tool | Description |
|------|-------------|
| `get_user`, `list_users`, `get_active_user` | User management |
| `get_stack`, `list_stacks` | Stack configurations |
| `get_stack_component`, `list_stack_components` | Stack components |
| `get_flavor`, `list_flavors` | Component flavors |
| `get_service_connector`, `list_service_connectors` | Cloud connectors |
| `get_pipeline_run`, `list_pipeline_runs` | Pipeline runs |
| `get_run_step`, `list_run_steps` | Step details |
| `get_step_logs`, `get_step_code` | Step logs and source code |
| `list_pipelines`, `get_pipeline_details` | Pipeline definitions |
| `get_schedule`, `list_schedules` | Schedules |
|