# K8sCortex - Kubernetes MCP Server

Production-grade MCP server for Kubernetes — 75 tools across GKE, AKS, EKS, OpenShift and Minikube with RBAC, audit logging, GitOps (ArgoCD + Flux), and multi-cluster support

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y smithery mcp add apatil0431/k8scortex-mcp

# Browse available tools
npx -y smithery tool list apatil0431/k8scortex-mcp

# Get full schema for a tool
npx -y smithery tool get apatil0431/k8scortex-mcp list_pods

# Call a tool
npx -y smithery tool call apatil0431/k8scortex-mcp list_pods '{}'
```

## Direct MCP Connection

Endpoint: `https://k8scortex-mcp--apatil0431.run.tools`

## Tools (75)

- `list_pods` — Lists pods in a specific namespace.
- `get_pod_logs` — Retrieves logs for a specific pod.
- `describe_pod` — Shows detailed pod status including container states, conditions, resource settings, and recent events.
- `describe_deployment` — Shows details of a deployment.
- `list_nodes` — Lists cluster nodes.
- `list_statefulsets` — Lists StatefulSets in a specific namespace.
- `describe_statefulset` — Shows details of a StatefulSet.
- `list_daemonsets` — Lists DaemonSets in a specific namespace.
- `describe_daemonset` — Shows details of a DaemonSet.
- `scale_deployment` — Scales replicas for a deployment.
- `rollout_status` — Checks deployment rollout status (complete, in-progress, or stalled).
- `rollout_undo` — Rolls a deployment back to the previous ReplicaSet template.
- `restart_pod` — Deletes a pod to force a restart. Usually managed by a deployment/replicaset.
- `get_configmap` — Reads data from a ConfigMap.
- `describe_namespace_quota` — Reads resource quotas for a namespace.
- `list_events` — Lists recent cluster events for a namespace.
- `list_persistent_volume_claims` — Lists PersistentVolumeClaims in a specific namespace with binding and capacity details.
- `get_effective_permissions` — Evaluates effective Kubernetes API permissions for a ServiceAccount using SubjectAccessReview checks.
- `get_hpa_status` — Retrieves Horizontal Pod Autoscaler metrics and status.
- `list_warning_events` — Filters cluster events for warnings in a namespace.
- `get_node_pressure` — Analyzes node resource pressure for a specific node.
- `list_clusters` — Lists all registered Kubernetes clusters managed by KubeNexus.
- `get_cluster_info` — Returns API server URL, Kubernetes version, node count, and cloud metadata for a given cluster.
- `list_jobs` — Lists Jobs in a specific namespace.
- `create_job` — Creates a new Job. Use either basic configuration or provide a raw YAML manifest.
- `list_cronjobs` — Lists CronJobs in a specific namespace.
- `suspend_cronjob` — Suspends an active CronJob.
- `resume_cronjob` — Resumes a suspended CronJob.
- `create_configmap` — Creates a new ConfigMap. Use either basic key-value data or provide a raw YAML manifest.
- `update_configmap` — Updates an existing ConfigMap by patching its data.
- `create_secret` — Creates a new Opaque Secret. Use either basic stringData or provide a raw YAML manifest. stringData values will be base…
- `update_secret` — Updates an existing Secret by patching its stringData. KNOWN LIMITATION: The Kubernetes API never returns stringData on…
- `create_deployment` — Creates a new Deployment. Use either basic configuration or provide a raw YAML manifest.
- `delete_deployment` — Deletes an existing Deployment.
- `create_namespace` — Creates a new Kubernetes Namespace.
- `delete_namespace` — Deletes an existing Kubernetes Namespace.
- `create_horizontal_pod_autoscaler` — Creates an HPA for a Deployment. Use either basic configuration or provide a raw YAML manifest.
- `create_service` — Creates a new Service. Use either basic configuration or provide a raw YAML manifest.
- `list_ingresses` — Lists Ingress resources in a namespace.
- `get_service_endpoints` — Shows endpoint addresses backing a Service.
- `update_ingress` — Updates an existing Ingress. Merges new rules or annotations into the existing Ingress.
- `create_network_policy` — Creates a new NetworkPolicy. Use either basic configuration or provide a raw YAML manifest.
- `set_resource_limits` — Sets CPU and Memory requests and limits for a specific container in a Deployment.
- `get_resource_recommendations` — Suggests optimal resource requests/limits based on current metrics heuristically.
- `get_cluster_resource_utilisation` — Returns CPU and Memory usage vs capacity across all nodes.
- `cordon_node` — Marks a node as unschedulable.
- `uncordon_node` — Marks a node as schedulable.
- `drain_node` — Cordons the node and evicts/deletes non-daemonset pods.
- `taint_node` — Adds a taint to a node.
- `remove_taint` — Removes a specific taint from a node by key.
- `get_gitops_app_status` — Gets the health and sync status of an ArgoCD Application or Flux Kustomization.
- `get_gitops_diff` — Gets out-of-sync resources (ArgoCD) or managed resource inventory with revision drift (Flux Kustomization).
- `sync_gitops_app` — Forces a sync/reconciliation of an ArgoCD Application, Flux Kustomization, or Flux HelmRelease.
- `compare_clusters` — Compares the running version/state of an application across two clusters.
- `list_flux_kustomizations` — Lists all Flux Kustomizations in a namespace with their ready/suspended/revision status.
- `list_flux_helm_releases` — Lists all Flux HelmReleases in a namespace with chart name, version, and ready/suspended status.
- `get_flux_helm_release` — Gets detailed status of a Flux HelmRelease including chart version, values, and condition history.
- `list_flux_sources` — Lists Flux source objects (GitRepository, HelmRepository, OCIRepository, Bucket) with their URL, ref, and ready status.
- `suspend_flux_resource` — Suspends reconciliation of a Flux Kustomization or HelmRelease to pause automated deployments.
- `resume_flux_resource` — Resumes reconciliation of a suspended Flux Kustomization or HelmRelease.
- `list_flux_alerts` — Lists Flux Notification Alert objects showing which events trigger which providers.
- `list_k8s_resources` — Generic read: list Kubernetes resources by group/version/resource.
- `get_k8s_resource` — Generic read: get a single Kubernetes resource by group/version/resource/name.
- `list_node_pools` — Groups nodes by managed-cloud node pool labels (AKS/EKS/GKE) and reports pool health.
- `get_node_pool_detail` — Returns detailed node, spot/preemptible, and optional metrics view for a specific node pool.
- `get_workload_identity_config` — Returns workload identity annotation configuration for a ServiceAccount (AKS/EKS/GKE conventions).
- `validate_workload_identity` — Validates identity chain from ServiceAccount annotation to pods using that ServiceAccount.
- `list_pod_disruption_budgets` — Lists PodDisruptionBudgets in a namespace with budget satisfaction status.
- `get_pdb_status` — Returns detailed status and covered pods for a PodDisruptionBudget.
- `list_vpas` — Lists VerticalPodAutoscaler objects in a namespace and their update mode/recommendation state.
- `get_vpa_recommendation` — Returns VPA recommendation lower/target/upper bounds for a workload when available.
- `list_storage_classes` — Lists StorageClasses and indicates default class.
- `get_storage_class` — Returns details for a specific StorageClass.
- `get_addon_health` — Checks health of common kube-system addons (CoreDNS, metrics-server, kube-proxy, CNI).
- `list_limit_ranges` — Lists LimitRange objects in a namespace and default resource constraints.

```bash
# Get full input/output schema for a tool
npx -y smithery tool get apatil0431/k8scortex-mcp <tool-name>
```
