Provides Kubernetes resource management and Helm operations via MCP for easy automation and LLM integration.
Configuration
View docs{
"mcpServers": {
"silenceper-mcp-k8s": {
"url": "http://localhost:8080/sse"
}
}
}You run an MCP server that lets you manage Kubernetes resources and Helm operations through a standardized MCP protocol. It connects to your cluster via kubeconfig, exposes CRUD capabilities for native and custom resources, and provides Helm release and repository management. This makes it easy to drive Kubernetes tasks from MCP clients, including language models and automation tools, with fine-grained control over what actions are allowed.
Connect to your cluster using either a local, stdio-based setup or a remote SSE HTTP endpoint. In stdio mode, you run the MCP server locally and connect through standard I/O. In SSE mode, you expose an HTTP endpoint that MCP clients can call.
Prerequisites: you need a Go toolchain to build from source or you can download a prebuilt binary. Ensure you have access to a Kubernetes cluster and a kubeconfig file.
# Option 1: Direct download and run (prebuilt binary)
# Download the appropriate binary for your platform, then run it with your kubeconfig
# Option 2: Build from source
# Install Go if you haven’t already
# Then clone the repository and build the binary
go install github.com/silenceper/mcp-k8s/cmd/mcp-k8s@latest
```} ,{Configuration and operation modes are described below. You can run in stdio mode for local development, or in SSE mode to expose a HTTP endpoint for remote clients.
{
"mcpServers": {
"mcp-k8s": {
"url": "http://localhost:8080/sse",
"args": []
}
}
}SSE mode accepts the following flags to enable or disable operations. The server can be started with a kubeconfig path and with granular controls for create, delete, update, list, and Helm actions.
# SSE mode start example
./bin/mcp-k8s -kubeconfig=/path/to/kubeconfig \
-transport=sse -port=8080 -host=localhost \
-enable-create -enable-delete -enable-list -enable-update \
-enable-helm-install -enable-helm-upgradeWrite operations are controlled by independent configuration switches. RBAC is used so the Kubernetes client has only the permissions it needs. Inputs are validated to prevent injection, and Helm actions follow the same security principles with read operations enabled by default and write operations off by default.
Query all supported Kubernetes API resource types present in the cluster, including built-in resources and CRDs.
Retrieve detailed information about a specific Kubernetes resource.
List all resources of a given type, with optional filtering.
Create new Kubernetes resources. This operation can be enabled or disabled individually.
Update existing Kubernetes resources. This operation can be enabled or disabled individually.
Delete Kubernetes resources. This operation can be enabled or disabled individually.
List all Helm releases installed in the cluster.
Get detailed information about a specific Helm release.
Install a Helm chart into the cluster. This operation can be enabled or disabled.
Upgrade an existing Helm release.
Uninstall a Helm release from the cluster.
List configured Helm repositories.
Add a new Helm repository to the configuration.
Remove an existing Helm repository from the configuration.