
k8s-mcp-server
MCP server that lets AI assistants inspect and manage Kubernetes clusters and Helm
The repository was last updated yesterday and is published under MIT.
k8s-mcp-server is an open-source MCP server for developer tools. It is available on CLI, Self-hosted, Linux, macOS, Windows and VS Code.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted, Linux
- What it can do
- Can delete data (2 tools)
- GitHub stars
- 191
- Last commit
Similar MCP servers
About k8s-mcp-server
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.
Tools this server provides (20)
Taken from the project documentation; the running server may differ.
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.
- getAPIResourcesName suggests: reads
- Retrieves all available API resources in the Kubernetes cluster.
- listResourcesName suggests: reads
- Lists all instances of a specific resource type.
- getResourceName suggests: reads
- Retrieves detailed information about a specific resource.
- describeResourceName suggests: reads
- Describes a resource, similar to kubectl describe.
- getPodsLogsName suggests: reads
- Retrieves the logs of a specific pod.
- getNodeMetricsName suggests: reads
- Retrieves resource usage metrics for a specific node.
- getPodMetricsName suggests: reads
- Retrieves CPU and memory metrics for a specific pod.
- getEventsName suggests: reads
- Retrieves events for a specific namespace or resource.
- createOrUpdateResourceName suggests: changes
- Creates a new resource or updates an existing one from a JSON manifest.
- createResourceYAMLName suggests: changes
- Creates or updates a resource from a YAML manifest.
- rolloutRestart
- Triggers a rolling restart of a resource that supports pod template annotations.
- deleteResourceName suggests: deletes
- Deletes a specific resource from the cluster.
- getIngressesName suggests: reads
- Retrieves ingress resources, optionally filtered by host.
- helmInstall
- Installs a Helm chart to the cluster.
- helmUpgrade
- Upgrades an existing Helm release.
- helmListName suggests: reads
- Lists Helm releases in the cluster or a namespace.
- helmGetName 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.
- helmUninstallName suggests: deletes
- Uninstalls a Helm release.
What it does
- 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
Pricing
Open source
More servers for the same service
k8s-mcp-server 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.


