Kubeflow MCP Server
OfficialProvides tools for managing Kubeflow training jobs on Kubernetes clusters, enabling AI agents to plan, submit, monitor, and manage training jobs through natural language.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Kubeflow MCP Server
Quickstart · Architecture · Blog · KEP-936 · Roadmap · Security · Contributing
Overview
The Kubeflow MCP Server exposes Kubeflow operations as Model Context Protocol (MCP) tools. AI agents (Claude, Cursor, Claude Code, or custom agents) can plan, submit, monitor, and manage ML workloads in natural language — without requiring users to write Kubernetes YAML or Kubeflow SDK boilerplate.
Why Kubeflow MCP Server?
Agent-Native: Tools are auto-discovered via MCP with guided workflow phases (
Plan → Discover → Run → Monitor)Preview-Before-Submit: Every mutating operation previews its action first and requires explicit
confirmed=TrueSecurity-First: Persona gating (
readonlyby default), namespace allowlists, input validation, and Bearer/JWT HTTP authMulti-Platform: Auto-detects OpenShift, EKS, and GKE with platform-specific guidance
Token-Efficient: Progressive and semantic tool modes compress tools into 2–3 meta-tools
Modular Clients: Load only what you need (
trainer,spark,pipelines,optimizer; planned:hub)
Related MCP server: colab-autopilot
Demo

Quick Start
New to Kubeflow MCP? Follow the Quickstart & Troubleshooting Guide for step-by-step cluster verification, RBAC checks, and common fixes.
Prerequisites
Python 3.10, 3.11, or 3.12
Kubernetes cluster with
kubectland a configuredkubeconfig(see RBAC Configuration)Kubeflow component(s) installed for the clients you enable: Kubeflow Trainer, Spark Operator, and/or Kubeflow Pipelines
Install & Run
# Default (Trainer client)
pip install kubeflow-mcp
# Optional client extras
pip install "kubeflow-mcp[pipelines]" # Kubeflow Pipelines (kfp)
pip install "kubeflow-mcp[spark]" # Kubeflow Spark
# Start the MCP server (stdio transport by default)
kubeflow-mcp serveConnect an MCP Client
Add to .cursor/mcp.json:
{
"mcpServers": {
"kubeflow": {
"command": "kubeflow-mcp",
"args": ["serve"]
}
}
}claude mcp add kubeflow -- kubeflow-mcp servePre-built multi-arch images are published to GHCR on every release. Replace <your-secret-token> with a unique secret before running:
docker run --rm -p 127.0.0.1:8000:8000 \
-v ~/.kube/config:/kubeconfig:ro \
-e KUBECONFIG=/kubeconfig \
-e KUBEFLOW_MCP_AUTH_TOKEN="<your-secret-token>" \
ghcr.io/kubeflow/mcp-server:latestConnect your MCP client to http://localhost:8000/mcp:
{
"mcpServers": {
"kubeflow": {
"url": "http://localhost:8000/mcp",
"headers": { "Authorization": "Bearer <your-secret-token>" }
}
}
}For local clusters (e.g., Kind/Minikube) whose kubeconfig points to 127.0.0.1, use --network host (Linux) or a kubeconfig targeting host.docker.internal so the container can reach the host API server. For in-cluster Kubernetes deployments, omit the kubeconfig mount (the pod uses its ServiceAccount credentials) and set KUBEFLOW_MCP_ALLOWED_HOSTS when exposing behind a Service or Ingress. Unauthenticated container probes are exposed at GET /health (liveness) and GET /ready (readiness).
Example Workflow
Start the server with data-scientist (the default readonly persona blocks job submission):
kubeflow-mcp serve --persona data-scientistUser: "Fine-tune gemma-2b on the alpaca dataset"
Agent → check_compatibility() # K8s + Trainer CRD verified
Agent → get_cluster_resources() # 4x A100 GPUs available
Agent → estimate_resources("google/gemma-2b") # Needs ~16GB GPU, 1x A100
Agent → list_runtimes() # torchtune-gemma-2b found
Agent → fine_tune(..., confirmed=False) # Returns preview for approval
Agent → fine_tune(..., confirmed=True) # TrainJob "train-gemma-abc" created
Agent → get_training_logs("train-gemma-abc") # Streams training progressAgent Skills
Agent Skills catalog: a skeleton for independently released skill
plugins. Register the catalog, then install a plugin by replacing <plugin-name> with its name:
# Claude Code
claude plugin marketplace add kubeflow/mcp-server
claude plugin install "<plugin-name>@kubeflow-mcp"
# Codex CLI
codex plugin marketplace add kubeflow/mcp-server
codex plugin add "<plugin-name>@kubeflow-mcp"Available Tools
Trainer (--clients trainer, default — 23 tools)
Phase | Tools | Description |
Planning |
| Environment checks and GPU/memory estimation |
Discovery |
| Browse TrainJobs and ClusterTrainingRuntimes |
Training |
| Submit LoRA/QLoRA fine-tuning, Python scripts, or container jobs |
Monitoring |
| Track job status, logs, and Kubernetes events |
Lifecycle |
| Suspend, resume, or delete MCP-managed jobs |
Platform |
| Cluster inspection and runtime administration |
Health |
| Server diagnostics |
Pipelines (--clients pipelines — 14 tools)
Requires pip install "kubeflow-mcp[pipelines]" and Kubeflow Pipelines on the cluster.
Phase | Tools | Description |
Discovery |
| Browse pipelines, versions, and experiments |
Authoring |
| Compile and register KFP v2 pipelines from Python, or delete them |
Monitoring |
| Follow runs and read task pod logs |
Runs |
| Launch, stop, or retry runs and manage experiments |
Spark (--clients spark — 5 tools)
Requires kubeflow[spark] extra.
Phase | Tools | Description |
Discovery |
| Browse SparkConnect sessions |
Sessions |
| Provision and delete MCP-managed SparkConnect sessions |
Monitoring |
| Read Spark driver logs |
Optimizer (--clients optimizer — 17 tools)
Requires Katib v0.19 on the cluster, and the katib.kubeflow.org/metrics-collector-injection=enabled label on the experiment namespace.
Phase | Tools | Description |
Planning |
| Check the Experiment CRD, controller readiness, and admission webhooks |
Discovery |
| Browse Katib experiments, trials, and suggestions |
Optimization |
| Create experiments from flat parameters or a full |
Monitoring |
| Follow trials and read the best result, trial logs, and events |
Lifecycle |
| Wait for completion, change the trial budget or parallelism, or delete MCP-managed experiments |
Katib has no pause: lowering parallel_trial_count makes Katib delete trials, newest first and whatever their state, so update_hpo_experiment is destructive and its preview lists those trials. See optimizer://guides/hpo-patterns.
Personas & Configuration
--persona controls which tools are exposed. Each level includes all tools from the level above it:
Persona | Scope |
| Planning, browsing resources/jobs, reading logs and events |
| Submitting training/pipeline runs, deleting MCP-created jobs/sessions |
| Container training, job lifecycle controls, pipeline authoring, CRD/controller inspection |
| Full access, including runtime and pipeline/experiment administration |
Custom personas can also be defined in ~/.kf-mcp-policy.yaml (see Architecture).
CLI Reference (kubeflow-mcp serve)
Flag | Values / Default | Description |
|
| Comma-separated client modules to enable |
|
| Tool access persona |
|
|
|
|
| Agent instruction verbosity |
|
| Transport protocol ( |
|
| Bearer token for HTTP authentication |
|
| Optional OTLP HTTP endpoint for OpenTelemetry tracing |
|
| Server log verbosity |
|
| Auto-detected if omitted |
| flag | Suppress the startup banner |
Variable | Default | Description |
|
| Transport protocol ( |
|
| Comma-separated client modules |
|
| Active persona name |
|
| Instruction verbosity ( |
| (none) | Bearer token for HTTP auth (dev/staging) |
| (none) | JWKS endpoint for JWT verification (production) |
| (none) | Expected JWT issuer (required with |
| (none) | Expected JWT audience (required with |
| (loopback) | Allowed |
| (loopback) | Allowed |
|
| Set |
| (auto) | Override Kubeflow Pipelines endpoint URL |
| (auto) | Override Kubeflow Pipelines auth token |
| (auto) | Override Kubeflow Pipelines namespace |
|
| Logging format and level |
KUBEFLOW_MCP_JWT_ISSUER and KUBEFLOW_MCP_JWT_AUDIENCE are required with KUBEFLOW_MCP_JWKS_URI; the server refuses to start without them.
Without --auth-token or JWT settings on --transport http, the server logs a warning that the endpoint is open.
Observability
Optional OpenTelemetry tracing can be enabled with --otel-endpoint http://localhost:4318 (or OTEL_EXPORTER_OTLP_ENDPOINT) after installing uv sync --group otel. See examples/observability/README.md for collector setup, span attributes, and log correlation.
Compatibility
MCP Server | Kubeflow Trainer | Kubeflow SDK | Python | Kubernetes |
|
|
|
|
|
|
|
|
|
|
Development
git clone https://github.com/kubeflow/mcp-server.git
cd mcp-server
make install-dev # setup environment
make verify # lint + format check
make test-python # run unit tests
make inspector # launch MCP Inspector (stdio; or TRANSPORT=http)Community & Documentation
Slack: #kubeflow-wg-agents and #kubeflow-mcp-server on CNCF Slack
Meetings: Kubeflow WG Agents Meeting Notes
Blog: Introducing Kubeflow MCP: An Agent Interface for Cloud Native AI at Scale
Docs: Quickstart · Architecture · Client Conventions · Contributing · Roadmap · Security
License
Apache License 2.0 — see LICENSE.
Contributors
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Create and manage AI agents that collaborate and solve problems through natural language interacti…
Autonomous and governed SRE & MLOps control plane for AI agent platforms.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Many agents. One Chief. Plan, track, and manage all your AI agents in one place.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables natural language management of the full ML lifecycle including experiments, model registration, deployment, and pipeline orchestration through a conversational agent.-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to autonomously manage Google Colab GPU sessions, submit and monitor training jobs, and debug/fix issues via an encrypted tunnel without requiring a browser tab.MIT
- AlicenseNot gradedqualityDmaintenanceAI-powered interface for Kubeflow Training via MCP, enabling AI assistants to manage distributed training jobs, fine-tune LLMs, and monitor workloads on Kubernetes through natural language.Apache 2.0
- FlicenseNot gradedqualityBmaintenanceEnables LLMs to manage and run machine learning training jobs on a remote server, including syncing code, submitting experiments, monitoring progress, reading TensorBoard metrics, and receiving completion notifications.-