MCP Server for ZenML
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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, 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
Compatibility APIs (migration recommended)
- **Pipeline run templates** remain available in ZenML 0.97.0, while **Snapshots** are preferred for new workflows (see Migration Guide)
The server also allows you to **trigger new pipeline runs** using snapshots (preferred) or the deprecated template-based trigger parameter.
*Note: We're continuously improving this integration based on user feedback.
Please join our Slack community to share your experience
and help us make it even better!*
Tool profiles and write policy
The default compact profile advertises 16 tools. Seven generic tools cover the
resource catalog, reads, ordinary mutations, and finite lifecycle actions:
| Tool | Purpose |
|------|---------|
| zenml_describe_resources | Discover supported resource types and bounded operation schemas |
| zenml_list_resources | List one resource type with validated filters and pagination |
| zenml_get_resource | Get one resource, with parent and project scope where required |
| zenml_create_resource | Create a supported resource from a typed payload |
| zenml_update_resource | Update one exact resource UUID |
| zenml_delete_resource | Delete or archive one exact resource UUID |
| zenml_action_resource | Run an allowlisted lifecycle or relation action without retries |
Nine focused tools remain because they provide diagnostics, active context,
streamed logs or code, pipeline execution, or an interactive App:
- diagnose_zenml_setup
- get_active_user and get_active_project
- trigger_pipeline
- get_step_logs, get_step_code, and get_deployment_logs
- open_pipeline_run_dashboard and open_run_activity_chart
get_step_logs returns at most 50,000 entries, oldest first, with a
possibly_truncated flag, plus a note saying which entries are missing and
why. Pass tail to get only the newest entries. On ZenML 0.97+ servers it
pages through the log store; on 0.96 it uses the older single-request endpoint.
Use ZENML_MCP_PROFILE=legacy when an existing client still depends on the old
entity-specific names such as list_pipeline_runs. This retains the
characterized tool-name and schema compatibility layer for ZenML 0.97.0. It