ocm-mcp-server
GitHub

Tools and Prompts

35 tools across ten toolsets, plus ten prompts. Almost all of it is read: the whole Open Cluster Management API is safe to inspect. Only two toolsets can change anything, and only through the propose -> approve -> apply gate.

Reads are free; writes are gated

Every hub-level tool works for any managed spoke - a standalone OpenShift cluster, a HyperShift hosted cluster, or a cloud cluster - because on the hub they are all ManagedClusters. Run ocm-mcp doctor to call every read tool against your hub and print a PASS / EMPTY / SKIP / FAIL table before wiring up an agent.

Toolsets at a glance #

Toolset What it covers Tools Writes
inventory ManagedClusters, ClusterSets, set bindings, ClusterClaims, ManagedClusterInfo 6 -
observability cluster health, one-call fleet sweep, events, pod logs 4 -
placement Placements, PlacementDecisions, AddOnPlacementScores 3 -
work ManifestWork status feedback + the gated deploy flow 7 gated
addons ClusterManagementAddOns, fleet + per-cluster add-on health 3 -
registration pending join CSRs + gated cluster lifecycle actions 3 gated
policy governance compliance + violations rollup (if installed) 2 -
hosted-control-planes HyperShift HostedClusters and NodePools (when the hub hosts them) 3 -
resources generic get/list over an allow-list of OCM API types 2 -
audit pending proposals, this server's own audit trail 2 -

Tool classes #

OCM_MCP_READ_ONLY=1 makes every propose and apply tool refuse - a strictly-inspection deployment, backstopping the token gate.

The reads #

The gated writes #

The work toolset proposes a workload change:

The registration toolset proposes an OCM lifecycle action:

action is one of:

The generic reader is an allow-list #

list_resources and get_resource read any Open Cluster Management type through one interface - but only types on a fixed allow-list. This is deliberately an allow-list, not a deny-list: Secret, ConfigMap, and every core kind are absent, so the dangerous read cannot be named. The safety guarantee does not depend on an operator remembering to block anything.

managedclusters              managedclustersets           managedclustersetbindings
placements                   placementdecisions           addonplacementscores
manifestworks                manifestworkreplicasets       clustermanagementaddons
managedclusteraddons         addondeploymentconfigs        addontemplates
clustermanagers              klusterlets                   policies
policysets                   placementbindings             managedclusterinfos
hostedclusters               nodepools

Prompts #

MCP prompts are reusable templates a client offers as a starting point. Each drives the agent through the safe workflow with the real tool names.

Prompt Arguments What it drives
diagnose_fleet - sweep every cluster and add-on, summarize what is unhealthy and why. Reads only.
remediate_with_approval symptom investigate, propose the smallest safe fix, wait for the human token, apply, verify, report.
incident_postmortem - write the post-incident report strictly from get_audit_trail.
why_not_scheduled cluster, placement, namespace explain a Placement decision from the live objects.
onboard_cluster cluster accept a pending cluster safely through the approval gate.
addon_troubleshoot addon diagnose a degraded add-on across the fleet.
hosted_cluster_health cluster assess a HyperShift hosted control plane and its node pools.
policy_compliance_report - summarize governance compliance and prioritize what to fix.
capacity_report - find clusters with headroom and clusters under pressure.
rollout_status name, namespace track a ManifestWorkReplicaSet rollout across selected clusters.

The full argument-by-argument reference lives in docs/tools.md.

Next: Guardrails Deep Dive.