# k8s-mcp-server

> k8s-mcp-server is an open-source MCP server for cloud and infrastructure. Read-only Kubernetes diagnostics for AI agents: pods, logs, events and ingresses. It is available on CLI, Self-hosted, Linux, macOS and Windows.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/akkireddy-challa/k8s-mcp-server
- **GitHub stars:** 0
- **License:** MIT
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

Gives AI assistants a set of read-only views into a Kubernetes cluster so they can investigate problems without changing anything. The server reports node readiness and versions, flags pods stuck in abnormal phases or restart loops, pulls container logs with tail limits, and groups warning events such as failed scheduling and mount errors.

It connects through an existing kubeconfig or an in-cluster ServiceAccount and only issues get and list requests. Secrets and config maps are excluded from what reaches the model, which keeps credentials out of the conversation.

It suits platform and SRE engineers who want an assistant to triage crashes, routing problems or scheduling failures from a chat window, and it runs locally with Python 3.11 or later.

## Features

- **Node health overview:** Lists nodes with readiness state, roles and kubelet version.
- **Pod diagnostics:** Surfaces abnormal pod phases, restart loops and CrashLoopBackOff states.
- **Container log retrieval:** Fetches stdout and stderr with tail limits and crash-focused inspection.
- **Warning event aggregation:** Groups FailedScheduling, FailedMount and BackOff events across the cluster.
- **Ingress audit:** Reviews HTTP routing rules, host headers and TLS certificates.
- **Read-only by design:** Restricted to get and list operations and kept away from secrets.

## Good for

- Triage a crash-looping deployment from a chat with an AI assistant
- Find why pods are stuck in pending due to scheduling or volume mount failures
- Review recent cluster warning events in one summary
- Check ingress host and TLS configuration when traffic fails to route

## Tools

From the tool list in its README, going by the names, all 5 tools only read data. From the server's own tool labels and tool names; not verified by us.

- `get_cluster_nodes` (name suggests: reads): Lists nodes, readiness states, roles, and kubelet versions.
- `get_pod_diagnostics` (name suggests: reads): Detects abnormal pod phases, restart loops, and CrashLoopBackOffs.
- `get_pod_logs` (name suggests: reads): Retrieves container stdout/stderr logs with tail limits and crash inspection.
- `list_warning_events` (name suggests: reads): Aggregates FailedScheduling, FailedMount, and BackOff warning events.
- `list_ingresses` (name suggests: reads): Audits HTTP routing rules, host headers, and TLS certificates.

## FAQ

### Can the server change anything in my cluster?

No. It is described as strictly read-only and only performs GET and LIST operations.

### How does k8s-mcp-server authenticate to Kubernetes?

It uses a standard ~/.kube/config context or an in-cluster pod ServiceAccount.

### Are secrets exposed to the model?

No. Secrets and config maps are said to never be inspected or surfaced to the LLM context.

### What do I need to run k8s-mcp-server?

Python 3.11 or later, cluster access, and read-only RBAC permissions for core and networking API groups.

### Is k8s-mcp-server free?

Yes. k8s-mcp-server is open source, so you can use and self-host it for free.

### What are the best alternatives to k8s-mcp-server?

The closest alternatives to k8s-mcp-server are K8s MCP Server (Go), Kubernetes Troubleshoot, mcp-k8s-eye, MCP Kubernetes and MCP Openshift.

## Where this comes from

- Description: written from the project's README.

## Alternatives

- [K8s MCP Server (Go)](https://ai-powered.com/mcp/k8s-mcp-server-go): K8s MCP Server (Go) is an open-source MCP server for developer tools.
- [Kubernetes Troubleshoot](https://ai-powered.com/mcp/kubernetes-troubleshoot): Kubernetes Troubleshoot is an open-source MCP server for developer tools.
- [mcp-k8s-eye](https://ai-powered.com/mcp/mcp-k8s-eye): mcp-k8s-eye is an open-source MCP server for developer tools.
- [MCP Kubernetes](https://ai-powered.com/mcp/mcp-kubernetes): MCP Kubernetes is an open-source MCP server for developer tools.
- [MCP Openshift](https://ai-powered.com/mcp/mcp-openshift): MCP Openshift is an open-source MCP server for cloud and infrastructure.
- [mcp-k8s-go](https://ai-powered.com/mcp/mcp-k8s-go): mcp-k8s-go is an open-source MCP server for cloud and infrastructure.
- [k8s AIops](https://ai-powered.com/mcp/k8s-aiops): k8s AIops is an open-source MCP server for developer tools.
- [mcp-k8s](https://ai-powered.com/mcp/mcp-k8s): mcp-k8s is an open-source MCP server for cloud and infrastructure.

---
Source: https://ai-powered.com/mcp/k8s-mcp-server-2
