ZenML MCP Server for MLOps and LLMOps
Manage MLOps and LLMOps pipelines with your ZenML MCP server to monitor, deploy, and optimize models and workflows.
npx -y @zenml-io/mcp-zenmlOverview
The ZenML MCP (Model Context Protocol) server is a lightweight service that centralizes management for MLOps and LLMOps workflows. It provides a single place to register models, track runs and artifacts, coordinate deployments, and expose runtime metadata used by pipelines and model-serving components. By standardizing how pipelines and model operations exchange context (metadata, inputs, outputs, and monitoring information), the MCP server helps teams maintain reproducible pipelines and operationalize models across environments.
For developers, the MCP server is useful as a coordination and observability layer that integrates with existing artifact stores, model registries, and orchestration systems. It is designed to be run locally for development, in CI, or deployed in production (Docker/Kubernetes), and exposes REST APIs and client SDK hooks so ZenML pipelines and other orchestration pieces can publish and consume context information consistently.
Features
- Centralized registry for models, versions, and artifacts
- REST API for registering runs, models, and pipeline metadata
- Lightweight server suitable for local development and production deployment
- Pluggable storage backends (object stores, SQL databases) and configuration
- Web UI and/or API-driven inspection of runs, models, and metrics
- Integration points for deployment workflows and monitoring tools
- Authentication and API key support for multi-user environments
- Designed to support both traditional MLOps pipelines and LLMOps workflows
Installation / Configuration
Quick start (local development):
# clone the repository
# build Docker image (optional)
# run locally with Docker
Example docker-compose.yml (development):
version: "3.8"
services:
mcp-server:
image: mcp-zenml:latest
ports:
- "8080:8080"
environment:
- MCP_DATABASE_URL=postgresql://postgres:password@postgres:5432/mcp
- MCP_ARTIFACT_STORE=s3://my-bucket/mcp
- MCP_API_KEY=dev-secret-key
depends_on:
- postgres
postgres:
image: postgres:14
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=mcp
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
Minimal configuration (config.yaml):
server:
host: "0.0.0.0"
port: 8080
database:
url: "postgresql://postgres:password@postgres:5432/mcp"
artifact_store:
type: "s3"
uri: "s3://my-bucket/mcp"
auth:
api_key: "your-api-key"
Common environment variables:
| Variable | Purpose | Example |
|---|---|---|
| MCP_DATABASE_URL | SQL connection for metadata | postgresql://user:pass@host:5432/db |
| MCP_ARTIFACT_STORE | Artifact store URI | s3://bucket/path or file:///tmp/artifacts |
| MCP_API_KEY | API key for simple auth | my-secret-key |
| MCP_HOST / MCP_PORT | Server binding | 0.0.0.0 / 8080 |
Available Resources
- GitHub repository: https://github.com/zenml-io/mcp-zenml
- Example configs and integration examples included in the repo (examples/ or docs/)
- REST API (OpenAPI/Swagger) — typically exposed at /docs or /openapi.json on the running server
- SDK client for language bindings (Python) to integrate with pipelines and CI
- Docker image and Dockerfile for containerized deployment
- Kubernetes manifests / Helm charts (if provided in repo) for production deployments
Check the repository’s README and docs/ directory for up-to-date links and API specs.
Use Cases
Model registration and versioning
- Record a model build, attach artifacts (weights, tokenizer, config), and promote a version to staging/production. Consumers query the MCP server to fetch the production model URI.
Pipeline coordination and provenance
- ZenML pipelines publish run-level context (datasets used, hyperparameters, metrics). The MCP server stores this lineage so you can reproduce or debug runs later.
LLMOps metadata management
- Track prompts, system messages, and response artifacts as first-class objects. Use MCP to compare prompt versions and track evaluation scores for different prompt sets.
Deployment orchestration
- Orchestrators or CI systems query the MCP server to determine which model version to deploy (based on tags or metrics), and then trigger rollout to serving infrastructure.
Monitoring and drift detection
- Stream runtime metrics and input distributions to the MCP server, where they can be consumed by monitoring tools or dashboards to detect model drift and trigger retraining.
Concrete examples
- Registering a model (curl):
- Marking a run complete from a pipeline (Python pseudocode):
=
=
Getting help and next steps
- Browse the repository for examples, issues, and contribution guidelines.
- Start by running the server locally with the example docker-compose and explore the API via the OpenAPI UI.
- Integrate the MCP client into a single ZenML pipeline to publish and query context