mcp-zenml — Claude Code MCP server: ZenML access
An MCP server that lets your agent read and change ZenML resources: pipelines, runs, stacks, models. Handy when you want live ML platform data inside the editor.
claude mcp add --env ZENML_STORE_URL=<ZENML_STORE_URL> --env ZENML_STORE_API_KEY=<ZENML_STORE_API_KEY> --env ZENML_MCP_PROFILE=<ZENML_MCP_PROFILE> --env ZENML_MCP_WRITE_POLICY=<ZENML_MCP_WRITE_POLICY> --transport stdio mcp-zenml -- docker run -i --rm -e ZENML_STORE_URL -e ZENML_STORE_API_KEY -e ZENML_MCP_PROFILE -e ZENML_MCP_WRITE_POLICY docker.io/zenmldocker/mcp-zenml:2.0.0What mcp-zenml does
The server talks to the ZenML API and exposes a set of tools to the agent. The compact profile ships 16 of them: seven generic ones (zenml_describe_resources, zenml_list_resources, zenml_get_resource, zenml_create_resource, zenml_update_resource, zenml_delete_resource, zenml_action_resource) plus focused tools for setup diagnostics, the active user and project, pipeline triggering, step logs and code, deployment logs, and opening a run dashboard or activity chart.
Registration and write access are separate switches. ZENML_MCP_WRITE_POLICY=read_only drops the four mutation tools and trigger_pipeline from discovery, along with the create, update, delete and action schemas. The older ZENML_MCP_READ_ONLY=true is still accepted, and a bad policy value falls back to read-only. A bad ZENML_MCP_PROFILE halts startup with a config error.
Version 2.0.0 needs MCP Python SDK 2.2.0 and ZenML 0.96.4. Compact is now the default, which breaks discovery for clients calling entity-specific names such as list_pipeline_runs — set ZENML_MCP_PROFILE=legacy while you migrate. The legacy profile does not extend coverage to earlier ZenML server releases. Mutations report completed, accepted or unknown, and the server never retries after a call may have reached ZenML: reconcile from the response first.
What it helps with
- check run status and history from the editor
- pull logs and code for one pipeline step
- create or update a ZenML resource by UUID
- trigger a pipeline from a snapshot
- open a run dashboard and activity chart
Example prompts for the agent
- Show the latest runs of this pipeline and their status
- Fetch the logs for the step that failed
- Trigger the pipeline from the newest snapshot
How to install mcp-zenml
Platform CLI
claude mcp add --env ZENML_STORE_URL=<ZENML_STORE_URL> --env ZENML_STORE_API_KEY=<ZENML_STORE_API_KEY> --env ZENML_MCP_PROFILE=<ZENML_MCP_PROFILE> --env ZENML_MCP_WRITE_POLICY=<ZENML_MCP_WRITE_POLICY> --transport stdio mcp-zenml -- docker run -i --rm -e ZENML_STORE_URL -e ZENML_STORE_API_KEY -e ZENML_MCP_PROFILE -e ZENML_MCP_WRITE_POLICY docker.io/zenmldocker/mcp-zenml:2.0.0Replace <…> with your own values
Platform CLI
codex mcp add mcp-zenml --env ZENML_STORE_URL=<ZENML_STORE_URL> --env ZENML_STORE_API_KEY=<ZENML_STORE_API_KEY> --env ZENML_MCP_PROFILE=<ZENML_MCP_PROFILE> --env ZENML_MCP_WRITE_POLICY=<ZENML_MCP_WRITE_POLICY> -- docker run -i --rm -e ZENML_STORE_URL -e ZENML_STORE_API_KEY -e ZENML_MCP_PROFILE -e ZENML_MCP_WRITE_POLICY docker.io/zenmldocker/mcp-zenml:2.0.0Replace <…> with your own values
Config file
{
"mcpServers": {
"mcp-zenml": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"ZENML_STORE_URL",
"-e",
"ZENML_STORE_API_KEY",
"-e",
"ZENML_MCP_PROFILE",
"-e",
"ZENML_MCP_WRITE_POLICY",
"docker.io/zenmldocker/mcp-zenml:2.0.0"
],
"env": {
"ZENML_STORE_URL": "<ZENML_STORE_URL>",
"ZENML_STORE_API_KEY": "<ZENML_STORE_API_KEY>",
"ZENML_MCP_PROFILE": "<ZENML_MCP_PROFILE>",
"ZENML_MCP_WRITE_POLICY": "<ZENML_MCP_WRITE_POLICY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"mcp-zenml": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"ZENML_STORE_URL",
"-e",
"ZENML_STORE_API_KEY",
"-e",
"ZENML_MCP_PROFILE",
"-e",
"ZENML_MCP_WRITE_POLICY",
"docker.io/zenmldocker/mcp-zenml:2.0.0"
],
"env": {
"ZENML_STORE_URL": "<ZENML_STORE_URL>",
"ZENML_STORE_API_KEY": "<ZENML_STORE_API_KEY>",
"ZENML_MCP_PROFILE": "<ZENML_MCP_PROFILE>",
"ZENML_MCP_WRITE_POLICY": "<ZENML_MCP_WRITE_POLICY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e ZENML_STORE_URL=<ZENML_STORE_URL> -e ZENML_STORE_API_KEY=<ZENML_STORE_API_KEY> -e ZENML_MCP_PROFILE=<ZENML_MCP_PROFILE> -e ZENML_MCP_WRITE_POLICY=<ZENML_MCP_WRITE_POLICY> mcp-zenml docker run -i --rm -e ZENML_STORE_URL -e ZENML_STORE_API_KEY -e ZENML_MCP_PROFILE -e ZENML_MCP_WRITE_POLICY docker.io/zenmldocker/mcp-zenml:2.0.0Replace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-zenml
How do I install mcp-zenml in Claude Code?
Run `claude mcp add --env ZENML_STORE_URL=<ZENML_STORE_URL> --env ZENML_STORE_API_KEY=<ZENML_STORE_API_KEY> --env ZENML_MCP_PROFILE=<ZENML_MCP_PROFILE> --env ZENML_MCP_WRITE_POLICY=<ZENML_MCP_WRITE_POLICY> --transport stdio mcp-zenml -- docker run -i --rm -e ZENML_STORE_URL -e ZENML_STORE_API_KEY -e ZENML_MCP_PROFILE -e ZENML_MCP_WRITE_POLICY docker.io/zenmldocker/mcp-zenml:2.0.0`.
What does mcp-zenml do?
It gives the agent tools for ZenML: listing and reading resources, ordinary mutations, pipeline triggering, step and deployment logs, and opening dashboards.
How is the compact profile different from legacy?
Compact advertises 16 tools under generic names; legacy advertises 57 under older names such as list_pipeline_runs. Switch to legacy only while migrating a client.