k8s-mcp-server is a production-ready Kubernetes diagnostics and cluster observability MCP server designed for AI agents. It is based on the Model Context Protocol (MCP), enabling AI agents to directly debug, analyze, and diagnose Kubernetes clusters.
Purpose The server is used to allow AI agents to safely inspect Kubernetes cluster status, helping troubleshoot Pod crashes, check Ingress routing, and analyze cluster-wide warning events. It is positioned as an automated, read-only diagnostic tool, suitable for scenarios that need to obtain cluster information without modifying the cluster.
Main capabilities
- Provides automated, read-only diagnostic tools for inspecting Kubernetes clusters.
- Supports AI agents in troubleshooting Pod crashes.
- Supports checking Ingress routing.
- Supports analyzing cluster-wide warning events.
- Strictly read-only: only performs GET and LIST operations.
- Zero secret exposure: Secrets and ConfigMap are not inspected or exposed to the LLM context.
- Flexible authentication: supports standard ~/.kube/config contexts or the ServiceAccount of a Pod within the cluster.
Usage Before use, the following conditions are required:
- An accessible active Kubernetes cluster (via ~/.kube/config or an in-cluster ServiceAccount).
- Read-only RBAC permissions: get and list permissions for the core and networking API groups.
When configuring in Claude Desktop, add the corresponding configuration to claude_desktop_config.json. The specific configuration code content is not provided in the material.
Applicable scenarios
- AI agents troubleshooting Kubernetes clusters.
- Diagnosing Pod crash issues.
- Checking Ingress routing configuration.
- Analyzing cluster-wide warning events.
- Cluster observability scenarios that require read-only access and no secret exposure.
Limitations
- Strictly read-only, only supports GET and LIST operations, and cannot modify the cluster.
- Secrets and ConfigMap are not inspected or exposed to the LLM context.
- Requires get and list read-only RBAC permissions for the core and networking API groups.
- Specific installation commands, configuration code, supported Kubernetes versions, complete tool list, and other materials are not yet provided.
The project uses the MIT license and is built by Akkireddy Challa (Platform Engineer at Telia, Stockholm).