list_k8s_clustersLABSCO SUMMARY
A Kubernetes SDK first, an MCP server second.
kom is a Go package, so the install story is code: you register clusters in your own program and the MCP server comes up inside it. What that buys you is one endpoint that reaches about as far as kubectl does, across every cluster you registered, with the cluster named per call instead of switched between. What it costs you is that the credential is the only boundary — the write tools are on by default, so the role you register decides how far a bad call travels.
What it is
A Go library that wraps kubectl and client-go, with an MCP server built into it. You start the server from your own program — mcp.RunMCPServer("kom mcp server", "0.0.1", 9096) — and the compiled binary is the stdio entry point your client launches — Claude Desktop, Cursor, Windsurf and Cherry Studio all take it that way. The README also names http://IP:9096/sse as an SSE endpoint, but RunMCPServer opens that listener only after its stdio session ends; a standing SSE server is started with RunMCPServerWithOption and Mode: mcp.ServerModeSSE, as the repository's own main.go does. Every tool takes a cluster, namespace and name, so one server front-ends every cluster you registered, self-managed or AWS EKS.
What you get
- Cluster registry —
list_k8s_clusters, and in SSE moderegister_k8s_clusterandunregister_k8s_clusterat runtime, so a new kubeconfig does not mean a restart - Any resource, custom ones included —
get_k8s_resource,describe_k8s_resource,list_k8s_resource,delete_k8s_resource,patch_k8s_resource,label_k8s_resource,annotate_k8s_resource - The whole Deployment lifecycle —
scale_k8s_deployment,restart_k8s_deployment,stop_k8s_deployment,restore_k8s_deployment,update_k8s_deployment_image_tag,get_k8s_deployment_hpa_list - Rollouts as separate calls rather than one blunt apply —
get_k8s_deployment_rollout_history,undo_k8s_deployment_rollout,pause_k8s_deployment_rollout,resume_k8s_deployment_rollout,get_k8s_deployment_rollout_status - Pod inspection and Pod insides —
list_k8s_pod,describe_k8s_pod,get_k8s_top_pod,GetPodLogsTool,run_command_in_k8s_pod, and file work withlist_files_in_k8s_pod,list_pod_all_files,UploadPodFileTool,DeletePodFileTool - What a Pod is wired to —
get_k8s_pod_linked_services,get_pod_linked_ingresses,get_pod_linked_endpoints,get_k8s_pod_linked_env,get_pod_linked_env_from_yaml - Node scheduling and capacity —
cordon_k8s_node,uncordon_k8s_node,drain_k8s_node,taint_k8s_node,untaint_k8s_node,get_k8s_node_resource_usage,get_k8s_node_ip_usage,get_k8s_top_node,get_k8s_pod_count_running_on_node - Manifests in and out —
apply_k8s_yaml,delete_k8s_yaml - Storage and Ingress defaults —
set_k8s_default_storageclass,get_k8s_storageclass_pvc_count,get_k8s_storageclass_pv_count,set_default_k8s_ingressclass - Events where you need them —
list_k8s_event,list_k8s_deploy_event,list_k8s_pod_event, plusrestart_k8s_daemonset
Requirements
Go, and cluster credentials. This is a library rather than a published binary: you write a Go main, register your clusters and call RunMCPServer, then go build main.go. KUBECONFIG is the default source of credentials; RegisterInCluster() picks up in-cluster credentials, RegisterByPathWithID takes a kubeconfig path plus an ID, RegisterByTokenWithServerAndID takes a bearer token, API server address and cluster ID with the CA certificate as an optional register-time option, and RegisterAWSCluster takes an aws.EKSAuthConfig carrying AccessKey, SecretAccessKey, Region and ClusterName. In SSE mode kubeconfigs can instead be listed in mcp.ServerConfig or auto-discovered from a directory with LoadKubeconfigsFromDirectory. Whatever RBAC the credential carries is what the tools can do, and the set includes delete_k8s_resource, drain_k8s_node and run_command_in_k8s_pod — scope the service account to the namespaces you want reachable before you register it.
Setup effort
Follow the published steps
USE CASES
Asking what is wrong without switching contexts
Register production and staging once, then name the cluster in the call — the same session answers for both, and events come back beside the resource.
Rolling back a Deployment that went out wrong
Read the revisions, return to one of them, and confirm the rollout landed — three separate calls instead of a re-apply you have to reconstruct.
Taking a node out of service for maintenance
Check what is running on it and how loaded it is, mark it unschedulable, drain the Pods, and put it back afterwards.
Getting evidence out of a running Pod
Read the logs, list what is on its filesystem, and run a command inside the container when the logs do not say enough.
Applying a manifest you just wrote together
Hand the YAML straight to the cluster and get a per-resource result back, then remove it the same way if it was a trial.
60 tools
Listed in project code.
register_k8s_clusterunregister_k8s_clusterrestart_k8s_daemonsetlist_k8s_deploy_eventget_k8s_deployment_hpa_listrestart_k8s_deploymentrestore_k8s_deploymentget_k8s_deployment_rollout_historyundo_k8s_deployment_rolloutpause_k8s_deployment_rolloutresume_k8s_deployment_rolloutget_k8s_deployment_rollout_statusscale_k8s_deploymentstop_k8s_deploymentupdate_k8s_deployment_image_tagannotate_k8s_resourcedelete_k8s_resourcedescribe_k8s_resourceget_k8s_resourcelabel_k8s_resourcelist_k8s_resourcepatch_k8s_resourcelist_k8s_eventset_default_k8s_ingressclasscordon_k8s_nodedrain_k8s_nodeget_k8s_node_ip_usagelist_k8s_nodeget_k8s_top_nodeget_k8s_pod_count_running_on_nodeget_k8s_node_resource_usagetaint_k8s_nodeuncordon_k8s_nodeuntaint_k8s_nodelist_k8s_namespacedelete_k8s_podrun_command_in_k8s_poddescribe_k8s_podlist_k8s_pod_eventlist_files_in_k8s_podlist_pod_all_filesdelete_pod_fileget_k8s_pod_linked_envget_pod_linked_env_from_yamlget_k8s_pod_linked_servicesget_pod_linked_ingressesget_pod_linked_endpointslist_k8s_podget_k8s_pod_logsget_k8s_top_podupload_file_to_k8s_podget_k8s_pod_linked_pvget_k8s_pod_linked_pvcget_k8s_pod_resource_usageget_k8s_storageclass_pv_countget_k8s_storageclass_pvc_countset_k8s_default_storageclassapply_k8s_yamldelete_k8s_yamlBEFORE YOU INSTALL
What to know first
Tools you get
60 tools registered in the project's code. The README's tool table says 59, but seven of its rows give Go function names such as GetPodLogsTool instead of the registered names, and it omits register_k8s_cluster, unregister_k8s_cluster, list_k8s_namespace and five pod tools.
Requires
- Go toolchain (go build)
- A Kubernetes cluster and a kubeconfig (KUBECONFIG)
Where it runs
All 4 documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/weibaohui/kom
cd komEdit main.go in the checkout: it ships starting an SSE-mode example with placeholder kubeconfig paths (<YOUR_PATH_TO_CLUSTER1_KUBECONFIG>). Register your own clusters (for example kom.Clusters().RegisterByPathWithID(kubeconfigPath, "default") after callbacks.RegisterInit()) and start the server with the line the file carries commented out: mcp.RunMCPServer("kom mcp server", "0.0.1", 9096)
go build -o kom main.goPoint your MCP client at the absolute path of the kom binary you just built — the client starts it over stdio. The server reads cluster credentials from the KUBECONFIG environment variable by default.
MCP Clients
Claude Desktop, Cursor, Windsurf, Cherry Studio
{
"mcpServers": {
"k8m": {
"command": "<YOUR_PATH_TO_KOM>",
"args": []
}
}
}<YOUR_PATH_TO_KOM> is the absolute path of the binary from go build. If your kubeconfig is not in the KUBECONFIG variable your client passes on, register it by path in main.go.