Kubernetes Read Only MCP Server
About
A read-only MCP server that gives Claude access to Kubernetes clusters. Built in Go, it communicates over stdio using the MCP protocol and is designed for safe, production‑grade debugging.
Details
- Author
- your-ko
- Downloads
- 303
- Categories
- Cloud Service, AI
Jump to
- Read‑only operations: get, describe, logs, top only – no mutations.
- Secret values are masked before being sent to the model.
- Token‑efficient responses include only relevant fields, not raw API objects.
- Every response includes the active context and cluster name.
- Locks to the active kubeconfig context at startup; no runtime context switching.
- Runs as a local binary or Docker container with no extra infrastructure.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Kubernetes Read Only MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Build the binary with make build or pull the Docker image from ghcr.io/your-ko/mcp-k8s-ro. Add it as a stdio MCP server in your Claude Desktop or CLI configuration, pointing to a kubeconfig file via the KUBECONFIG environment variable.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"kubernetes read only mcp server": {
"k8s": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v",
"${HOME}/.kube:/root/.kube:ro",
"ghcr.io/your-ko/mcp-k8s-ro:latest"
]
}
}
}
}
McpServers
{
"k8s": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v",
"${HOME}/.kube:/root/.kube:ro",
"ghcr.io/your-ko/mcp-k8s-ro:latest"
]
}
}
mcp-k8s-ro
A read-only MCP server that gives Claude access to Kubernetes clusters. Built in Go, it communicates over stdio using the MCP protocol.
Design
- Read-only — only get, describe, logs, and top style operations. No create, update, or delete. If a mutating operation is needed, the server prints the equivalent kubectl command for you to run manually. Safe to use while on-call at night: Claude can never accidentally mutate your cluster, even under prompt fatigue.
- Secret-safe — secret values are masked before being sent to the model, so your secrets cannot leak due to misconfiguration or prompt injection.
- Token-efficient — responses include only relevant fields (name, status, restarts, etc.) rather than raw Kubernetes API objects, keeping context usage low.
- Cluster-aware — every response includes the active context and cluster name, so Claude always knows which cluster it is talking to.
- Context-pinned — the server locks to the active kubeconfig context at startup. Switching contexts in another terminal has no effect on the running server.
- No extra infra — runs as a local binary or Docker container, connects to whatever kubeconfig context is active at startup.
Redacted fields
| Object/Field | Reason |
|--------------------------------------------------------|----------------------------------------------------------|
| Secret.data | Secret leak prevention |
| Secret.stringData | Secret leak prevention |
| CertificateSigningRequest.spec.request | Large base64 PEM blob, no diagnostic value, saves tokens |
| Certificate (cert-manager) .spec.keystores | Cert chain PEM blobs, no diagnostic value, saves tokens |
| Certificate (cert-manager) status.conditions[].message | Cert chain PEM blobs, no diagnostic value, saves tokens |
| *.managedFields | No diagnostic value, saves tokens |
Tools
| Tool | Description |
|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| k8s_list_resources | List any resource type by name — pods, deployments, CRDs, etc. Accepts optional namespace filter. Returns name, status, readiness, restarts, node, IP, and more depending on resource kind. |
| k8s_describe_resource | Return the full YAML of a single resource. Secret data is masked. |
| k8s_list_resource_types | List all available resource types via the discovery API. Accepts optional API group filter. |
| k8s_get_logs | Fetch pod logs. Supports container selector, tail lines, and --previous for crashed containers. |
| k8s_get_events | List Kubernetes events for a namespace or the whole cluster, sorted by most recent. |
| k8s_top_pods | CPU and memory usage per pod, with per-container breakdown. Requires metrics-server. |
| k8s_top_nodes | CPU and memory usage per node, with percentage of allocatable capacity. Requires metrics-server. |
Configuration
| Environment variable | Default | Description |
|----------------------|------------------|-------------------------|
| KUBECONFIG | ~/.kube/config | Path to kubeconfig file |
Usage with Claude
Binary
Build the binary and add it to your Claude Desktop or claude CLI configuration:
```bash
make build
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.

