
k8s-mcp-server
Read-only Kubernetes diagnostics for AI agents: pods, logs, events and ingresses
The repository was last updated 84 days ago and is published under MIT.
k8s-mcp-server is an open-source MCP server for cloud and infrastructure. It is available on CLI, Self-hosted, Linux, macOS and Windows.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted, Linux
- What it can do
- Read-only
- GitHub stars
- 0
- Last commit
Similar MCP servers
About k8s-mcp-server
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.
Tools this server provides (5)
Taken from the project documentation; the running server may differ.
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_nodesName suggests: reads
- Lists nodes, readiness states, roles, and kubelet versions.
- get_pod_diagnosticsName suggests: reads
- Detects abnormal pod phases, restart loops, and CrashLoopBackOffs.
- get_pod_logsName suggests: reads
- Retrieves container stdout/stderr logs with tail limits and crash inspection.
- list_warning_eventsName suggests: reads
- Aggregates FailedScheduling, FailedMount, and BackOff warning events.
- list_ingressesName suggests: reads
- Audits HTTP routing rules, host headers, and TLS certificates.
What it does
- 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
Pricing
Open source
Free and MIT licensed.
More servers for the same service
k8s-mcp-server 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.

