# k8s-mcp-server

> k8s-mcp-server is an open-source MCP server for developer tools. MCP server that lets AI assistants inspect and manage Kubernetes clusters and Helm. It is available on CLI, Self-hosted, Linux, macOS, Windows and VS Code.

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

## About

Connects AI clients to one or more Kubernetes clusters through the Model Context Protocol, so an assistant can read cluster state and, when allowed, change it. Requests cover listing and describing resources, pulling pod logs, checking node and pod CPU and memory usage, reading events, and applying or deleting manifests from YAML or JSON.

Cluster access is resolved from a kubeconfig content variable, an API server URL with a bearer token, the in-cluster service account, or a local kubeconfig file, in that order. Helm releases can be listed, inspected, rolled back and installed as well. A read-only flag disables every write operation, including Helm installs and upgrades, and separate flags turn off either the Kubernetes or the Helm tool set.

The server runs over stdio for desktop assistants, or over SSE and streamable HTTP for remote clients, where a bearer token is mandatory. It is aimed at platform engineers and developers who want an assistant to troubleshoot workloads or review cluster health without leaving their editor.

## Features

- **Resource discovery and listing:** Enumerates the API resources a cluster serves and lists instances of any kind, filtered by namespace or label selector.
- **Pod logs and events:** Fetches logs from a named pod or container and retrieves events for a namespace or a specific resource.
- **CPU and memory metrics:** Reports resource usage for individual nodes and pods.
- **Manifest apply and delete:** Creates or updates resources from JSON or YAML manifests and deletes resources by kind, name and namespace.
- **Helm release management:** Lists, inspects, installs, upgrades, rolls back and uninstalls Helm releases.
- **Read-only operation mode:** A startup flag blocks all cluster-changing tools so the assistant can only observe.
- **Flexible transports and auth:** Runs over stdio, SSE or streamable HTTP, with several ways to supply cluster credentials.

## Good for

- Asking an AI assistant to explain why a pod is crash-looping using its logs and events
- Checking CPU and memory pressure on specific nodes or pods during an incident
- Restarting a deployment or StatefulSet through a conversational request
- Reviewing Helm release history and rolling back a bad upgrade
- Giving a monitoring assistant read-only access to inspect cluster state

## Tools

From the tool list in its README, going by the names, 2 of 20 tools delete data and 2 change data; 5 names don't say. From the server's own tool labels and tool names; not verified by us.

- `getAPIResources` (name suggests: reads): Retrieves all available API resources in the Kubernetes cluster.
- `listResources` (name suggests: reads): Lists all instances of a specific resource type.
- `getResource` (name suggests: reads): Retrieves detailed information about a specific resource.
- `describeResource` (name suggests: reads): Describes a resource, similar to kubectl describe.
- `getPodsLogs` (name suggests: reads): Retrieves the logs of a specific pod.
- `getNodeMetrics` (name suggests: reads): Retrieves resource usage metrics for a specific node.
- `getPodMetrics` (name suggests: reads): Retrieves CPU and memory metrics for a specific pod.
- `getEvents` (name suggests: reads): Retrieves events for a specific namespace or resource.
- `createOrUpdateResource` (name suggests: changes): Creates a new resource or updates an existing one from a JSON manifest.
- `createResourceYAML` (name suggests: changes): Creates or updates a resource from a YAML manifest.
- `rolloutRestart`: Triggers a rolling restart of a resource that supports pod template annotations.
- `deleteResource` (name suggests: deletes): Deletes a specific resource from the cluster.
- `getIngresses` (name suggests: reads): Retrieves ingress resources, optionally filtered by host.
- `helmInstall`: Installs a Helm chart to the cluster.
- `helmUpgrade`: Upgrades an existing Helm release.
- `helmList` (name suggests: reads): Lists Helm releases in the cluster or a namespace.
- `helmGet` (name suggests: reads): Gets details of a Helm release.
- `helmHistory`: Gets the revision history of a Helm release.
- `helmRollback`: Rolls a Helm release back to a previous revision.
- `helmUninstall` (name suggests: deletes): Uninstalls a Helm release.

## FAQ

### Can k8s-mcp-server run without write access to the cluster?

Yes. The --read-only flag disables resource creation and updates and all Helm install, upgrade, rollback and repository-add tools.

### How does k8s-mcp-server find cluster credentials?

It checks in order: a KUBECONFIG_DATA environment variable, a KUBERNETES_SERVER and KUBERNETES_TOKEN pair, the in-cluster service account token, then a kubeconfig file at KUBECONFIG or ~/.kube/config.

### Which transports are supported?

Stdio for local clients, plus SSE and streamable HTTP for remote use. HTTP modes require the MCP_AUTH_TOKEN environment variable and bind to loopback by default.

### Is k8s-mcp-server free to use?

The repository is MIT licensed and can be built and run from source or pulled as a Docker image.

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

The closest alternatives to k8s-mcp-server are mcp-k8s, K8s MCP Server (Go), kubectl-mcp-server, mcp-k8s-eye and mcp-k8s-go.

## Where this comes from

- Description: written from the project's README.

## Alternatives

- [mcp-k8s](https://ai-powered.com/mcp/mcp-k8s): mcp-k8s is an open-source MCP server for cloud and infrastructure.
- [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.
- [kubectl-mcp-server](https://ai-powered.com/mcp/kubectl-mcp-server): kubectl-mcp-server is an open-source MCP server for cloud and infrastructure.
- [mcp-k8s-eye](https://ai-powered.com/mcp/mcp-k8s-eye): mcp-k8s-eye is an open-source MCP server for developer tools.
- [mcp-k8s-go](https://ai-powered.com/mcp/mcp-k8s-go): mcp-k8s-go is an open-source MCP server for cloud and infrastructure.
- [Helm MCP](https://ai-powered.com/mcp/helm-mcp-2): Helm MCP is an open-source MCP server for cloud and infrastructure.
- [k8m](https://ai-powered.com/mcp/k8m): k8m is an open-source MCP server for cloud and infrastructure.
- [Helm MCP](https://ai-powered.com/mcp/helm-mcp): Helm MCP is an open-source MCP server for cloud and infrastructure.

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