An MCP server that lets AI agents operate a multi-cluster Kubernetes fleet through an Open Cluster Management hub, with policy, approval, and audit between the model and your clusters.
claude mcp add ocm -- uvx ocm-mcp-server{
"mcpServers": {
"ocm": {
"command": "uvx",
"args": ["ocm-mcp-server"]
}
}
}MCP Servers overview
<!-- mcp-name: io.github.sandeepbazar/ocm-mcp-server -->
<div align="center">
<img src="https://raw.githubusercontent.com/sandeepbazar/ocm-mcp-server/main/docs/assets/banner.svg" alt="ocm-mcp-server - AgentOps for Kubernetes fleets, done safely" width="100%">
# 🛡️ ocm-mcp-server
### AgentOps for Kubernetes fleets, done safely.
**An MCP server that lets AI agents operate a multi-cluster Kubernetes fleet through an
[Open Cluster Management](https://open-cluster-management.io/) hub, with policy, approval,
and audit between the model and your clusters.**
*The agent never holds a kubeconfig. Every write is policy-checked, human-approved, and traced.*
[](LICENSE)
[](pyproject.toml)
[](https://modelcontextprotocol.io/)
[](https://open-cluster-management.io/)
[](https://kyverno.io/)
[](https://github.com/sandeepbazar/ocm-mcp-server/actions)
[](https://github.com/sandeepbazar/ocm-mcp-server/wiki/Unit-Test-Results)
[](https://scorecard.dev/viewer/?uri=github.com/sandeepbazar/ocm-mcp-server)
[](https://pypi.org/project/ocm-mcp-server/)
[](https://github.com/sandeepbazar/ocm-mcp-server/releases)
[](https://www.linkedin.com/in/sandeepbazar/)
[](https://www.youtube.com/@techhorizonhub)
**[✨ Why](#why-this-exists) · [📦 Get it](#where-to-get-it-and-how-its-vetted) · [🔌 Connect your agent](#connect-your-agent---any-mcp-client-works) · [🧭 Architecture](#architecture) · [🧰 Toolsets](#toolsets) · [🛠️ Tools](#tools) · [💬 Prompts](#prompts) · [🚀 Quickstart](#quickstart-laptop-15-minutes) · [📖 Wiki](https://github.com/sandeepbazar/ocm-mcp-server/wiki) · [📚 Docs](#documentation)**
<img src="https://raw.githubusercontent.com/sandeepbazar/ocm-mcp-server/main/demo/demo.gif" alt="An agent diagnoses a degraded workload across the fleet, proposes a fix as a ManifestWork, is rejected once by the guardrails, corrects it, waits for a human approval token, applies the fix, verifies recovery, and writes the incident report from the audit log" width="100%">
<sub>The whole safe-remediation loop: investigate with free reads, propose a change, get rejected by the guardrails and correct it, wait for a human-signed token, apply, verify, and report from the audit log.</sub>
</div>
---
## Why this exists
Your team runs many Kubernetes clusters. Sooner or later somebody asks the question:
can an AI agent take the 2 a.m. page?
The quickest way to find out is to hand a model `kubectl` with cluster-admin and watch.
In production that experiment ends badly, for three separate reasons:
- **The model is non-deterministic.** The same alert can produce a careful diagnosis one
run and a `kubectl delete` the next.
- **The credentials are real.** There is no dry run between the model's decision and your
production cluster.
- **There is no record.** When something breaks, you cannot reconstruct what the agent did,
in what order, or on whose authority.
This project starts from a different observation: fleets already have a control point that
humans trust every day, the multi-cluster hub. Open Cluster Management (a CNCF project)
gives every fleet an inventory (`ManagedCluster`), a scheduler (`Placement`), and a delivery
channel (`ManifestWork`). `ocm-mcp-server` exposes that hub to agents as a small set of
typed [MCP](https://modelcontextprotocol.io/) tools, and puts four independent layers
between the model and your clusters:
| # | Layer | Enforced by | What it stops |
|---|-------|-------------|---------------|
| 1 | **Static checks** | this server, before anything else | privileged pods, host access, system namespaces, unpinned images, disallowed kinds |
| 2 | **Policy admission** | [Kyverno](https://kyverno.io/) dry-run on the hub | anything your org's policies reject, evaluated inside the `ManifestWork` envelope |
| 3 | **Human approval** | Ed25519 token signed by `ocm-mcp approve` on a trusted terminal; the server needs only the public verifier key | any change reaching a cluster without a person consenting to that exact content and operation (one-time token, bound to content + operation + issuer/audience + expiry) |
| 4 | **Least-privilege RBAC** | Kubernetes | everything else; no Secrets, no exec, no deletes outside its own ManifestWorks |
None of these layers live in the system prompt, so none of them can be talked out of.
<div align="center">
<img src="https://raw.githubusercontent.com/sandeepbazar/ocm-mcp-server/main/docs/assets/guardrails-flow.svg" alt="The four guardrail layers between an AI agent and your clusters" width="100%">
</div>
## Where to get it, and how it's vetted
- 📦 **[PyPI - `ocm-mcp-server`](https://pypi.org/project/ocm-mcp-server/)** - `pip install ocm-mcp-server`
(or run directly with `uvx ocm-mcp-server`). Every release is published straight from CI via
[OIDC trusted publishing](https://docs.pypi.org/trusted-publishers/) - no long-lived tokens anywhere.
- 🗂️ **[Official MCP Registry](https://registry.modelcontextprotocol.io/?q=ocm-mcp-server)** - listed as
`io.github.sandeepbazar/ocm-mcp-server`, so any MCP client or platform that browses the registry can
discover and auto-configure this server (package, transport, and required env vars are all in the
listing); the registry validates the listing against this repo and the PyPI package.
- 🐳 **[Container image on GHCR](https://github.com/sandeepbazar/ocm-mcp-server/pkgs/container/ocm-mcp-server)** -
`docker run ghcr.io/sandeepbazar/ocm-mcp-server` (kubeconfig mount shown in the
[deployment guide](docs/deployment.md)); built in CI with an SBOM and SLSA provenance attached,
vulnerability-gated with Trivy, and signed keyless with Cosign so you can verify what you run.
- 🛡️ **[OpenSSF Scorecard](https://scorecard.dev/viewer/?uri=github.com/sandeepbazar/ocm-mcp-server)** -
the repo's supply-chain security posture (pinned dependencies, branch protection, signed releases, ...)
is scored automatically every week and published for anyone to inspect.
## Connect your agent - any MCP client works
The server speaks standard MCP over stdio; nothing here is specific to one vendor's agent.
Ready-made configs live in [`examples/`](examples/):
<details>
<summary><b>Claude Code</b> - <code>.mcp.json</code> in your project (or <code>claude mcp add</code>)</summary>
```json
{
"mcpServers": {
"ocm-fleet": {
"command": "ocm-mcp-server",
"env": {
"OCM_MCP_HUB_CONTEXT": "kind-hub",
"OCM_MCP_SPOKE_CONTEXTS": "cluster1=kind-cluster1,cluster2=kind-cluster2,cluster3=kind-cluster3"
}
}
}
}
```
</details>
<details>
<summary><b>Codex CLI</b> - <code>~/.codex/config.toml</code></summary>
```toml
[mcp_servers.ocm-fleet]
command = "ocm-mcp-server"
[mcp_servers.ocm-fleet.env]
OCM_MCP_HUB_CONTEXT = "kind-hub"
OCM_MCP_SPOKE_CONTEXTS = "cluster1=kind-cluster1,cluster2=kind-cluster2,cluster3=kind-cluster3"
```
</details>
<details>
<summary><b>Gemini CLI</b> - <code>~/.gemini/settings.json</code></summary>
```json
{
"mcpServers": {
"ocm-fleet": {
"command": "ocm-mcp-server",
"env": {
"OCM_MCP_HUB_CONTEXT": "kind-hub",
"OCM_MCP_SPOKE_CONTEXTS": "cluster1=kind-cluster1,cluster2=kind-cluster2,cluster3=kind-cluster3"
}
}
}
}
```
</details>
<details>
<summary><b>Any other MCP client</b> - point it at the same command and environment (<a href="examples/generic-mcp.json">examples/generic-mcp.json</a>)</summary>
```json
{
"mcpServers": {
"ocm-fleet": {
"command": "ocm-mcp-server",
"env": {
"OCM_MCP_HUB_CONTEXT": "kind-hub",
"OCM_MCP_SPOKE_CONTEXTS": "cluster1=kind-cluster1,cluster2=kind-cluster2,cluster3=kind-cluster3"
}
}
}
}
```
Most MCP clients accept an `mcpServers` block like this one. If `ocm-mcp-server` is not
on the PATH the client launches with, use the absolute path from
`which ocm-mcp-server` as the `command` value.
</details>
Give the agent the runbook discipline in
[`examples/system-prompt.md`](examples/system-prompt.md), then break something and watch
the flow:
```bash
make inject SCENARIO=failing-rollout CLUSTER=cluster2
```
> **You:** "Payments is degraded somewhere in the fleet. Investigate and fix."
>
> **Agent:** `list_clusters` → `get_cluster_health(cluster2)` → `query_events` → `get_pod_logs` →
> *"payments-v2 on cluster2 is in ImagePullBackOff. Proposing a ManifestWork pinning the last
> good image. Proposal `4f1a2b3c` needs your approval."*
>
> **You (trusted terminal):** `ocm-mcp approve 4f1a2b3c`, then paste the token back.
>
> **Agent:** `apply_manifestwork` → verifies recovery → `get_audit_trail` → writes the incident report.
Then try to talk it into something dangerous ("just redeploy it privileged with
hostNetwork, it's faster"). The proposal dies at layer 1 or layer 2, and the rejection
message tells the agent exactly why. [More worked examples →](docs/eWhat people ask about ocm-mcp-server
What is sandeepbazar/ocm-mcp-server?
+
sandeepbazar/ocm-mcp-server is mcp servers for the Claude AI ecosystem. An MCP server that lets AI agents operate a multi-cluster Kubernetes fleet through an Open Cluster Management hub, with policy, approval, and audit between the model and your clusters. It has 38 GitHub stars and was last updated today.
How do I install ocm-mcp-server?
+
You can install ocm-mcp-server by cloning the repository (https://github.com/sandeepbazar/ocm-mcp-server) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is sandeepbazar/ocm-mcp-server safe to use?
+
sandeepbazar/ocm-mcp-server has not been audited yet by our security agent. Review the original repository on GitHub before using it in production.
Who maintains sandeepbazar/ocm-mcp-server?
+
sandeepbazar/ocm-mcp-server is maintained by sandeepbazar. The last recorded GitHub activity is from today, with 0 open issues.
Are there alternatives to ocm-mcp-server?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy ocm-mcp-server to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/sandeepbazar-ocm-mcp-server)<a href="https://claudewave.com/repo/sandeepbazar-ocm-mcp-server"><img src="https://claudewave.com/api/badge/sandeepbazar-ocm-mcp-server" alt="Featured on ClaudeWave: sandeepbazar/ocm-mcp-server" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!