What akkireddy-challa/k8s-mcp-server does
The akkireddy-challa/k8s-mcp-server MCP server gives AI agents a read-only view of selected Kubernetes cluster data. It is aimed at diagnosis rather than deployment or administration: agents can examine node status, identify unhealthy pods, retrieve recent container output, review warning events, and inspect ingress configuration.
The server does not inspect or expose Secrets or ConfigMaps. Its security model limits Kubernetes operations to GET and LIST, so the documented capabilities do not include creating, updating, deleting, or scaling resources.
How it works
The process uses the Kubernetes client configuration available in the execution environment. For a local setup, that can be the usual kubeconfig file and context. When running inside Kubernetes, it can use the pod’s ServiceAccount instead. The cluster identity must have read-only RBAC permissions for the relevant core and networking API groups.
An MCP-compatible client starts the Python server and presents its diagnostic functions to an AI agent. The agent can then request information by resource type and use the returned data to investigate symptoms such as repeated pod restarts, crash loops, failed scheduling, mount errors, or ingress routing problems.
Setup and configuration
The documented prerequisites are Python 3.11 or newer, access to an active Kubernetes cluster, and read-only permissions allowing GET and LIST operations. Installation consists of cloning the repository, installing the requirements file, and starting server.py:
git clone https://github.com/akkireddy-challa/k8s-mcp-server.git
cd k8s-mcp-server
pip install -r requirements.txt
python server.py
For Claude Desktop, add a server entry whose command is python and whose argument points to the repository’s server.py. The example configuration sets KUBECONFIG to the local kubeconfig path. That variable is useful when the desired configuration is not being selected by the default environment; the README also supports in-cluster ServiceAccount authentication.
Tools and capabilities
The akkireddy-challa/k8s-mcp-server tool set includes:
get_cluster_nodes: lists nodes with readiness, roles, and kubelet version details.
get_pod_diagnostics: identifies abnormal pod phases, restart loops, and CrashLoopBackOff conditions.
get_pod_logs: retrieves container standard output and error logs, with tail limits and crash investigation support.
list_warning_events: gathers warning events such as FailedScheduling, FailedMount, and BackOff.
list_ingresses: reviews HTTP routing rules, host headers, and TLS certificates.
Together, these functions support first-pass troubleshooting across infrastructure, workloads, observability, diagnostics, and networking without granting write access.
Limitations and notes
The server is explicitly read-only and is not documented as an interface for applying manifests or changing cluster state. Its access depends on the Kubernetes credentials and RBAC permissions supplied at runtime. The README specifies Kubernetes v1.30+ and Python 3.11+ badges, but does not describe behavior for older versions. Claude Desktop is the only client configuration documented in the provided material; support for other clients is not established here.