# K8s MCP Server (Go) [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/kaneg/k8s-mcp-go  
**GitHub Stars:** 2  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/k8s-mcp-server-go

## Description
Safe, read-only-by-default K8s access for AI agents with permission modes.

## Tools
Capabilities this server exposes over MCP:

- **get_server_info** — Show server version, mode, Kubernetes config source, and runtime details
- **resolve_workload** — Resolve an app/workload name to matching resources and suggested next tools
- **list_pods** — List pods; supports `all_namespaces=true
- **get_pod** — Get pod details
- **get_pod_logs** — Get pod logs
- **list_deployments** — List deployments; supports `all_namespaces=true
- **get_deployment** — Get deployment details
- **list_statefulsets** — List StatefulSets; supports `all_namespaces=true
- **get_statefulset** — Get StatefulSet details
- **list_services** — List services; supports `all_namespaces=true
- **get_service** — Get service details
- **list_configmaps** — List ConfigMaps; supports `all_namespaces=true
- **get_configmap** — Get ConfigMap data
- **list_secrets** — List Secrets (keys only); supports `all_namespaces=true
- **get_secret** — Get Secret metadata and keys
- **list_pvc** — List PersistentVolumeClaims; supports `all_namespaces=true
- **list_ingress** — List Ingress resources; supports `all_namespaces=true
- **list_jobs** — List Jobs; supports `all_namespaces=true
- **top_nodes** — Current node CPU and memory usage
- **top_pods** — Current pod CPU and memory usage
- **list_nodes** — List cluster nodes
- **list_namespaces** — List namespaces
- **get_cluster_overview** — Cluster health summary
- **list_events** — List events
- **scale_deployment** — Scale deployment replicas
- **restart_deployment** — Rolling restart a deployment
- **restart_statefulset** — Rolling restart a statefulset
- **set_image** — Update container image
- **get_rollout_status** — Check rollout progress
- **create_namespace** — Create a new namespace
- **patch_deployment** — Apply strategic merge patch
- **delete_pod** — Delete a pod
- **delete_deployment** — Delete a deployment
- **delete_statefulset** — Delete a StatefulSet and its pods
- **delete_daemonset** — Delete a DaemonSet and its pods
- **delete_resource** — Delete a resource without a dedicated delete tool
- **delete_namespace** — Delete a namespace and all resources
- **apply_yaml** — Apply arbitrary YAML manifest

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "k8s-mcp-server-go": {
    "url": "https://claudemarketplaces.com/mcp/kaneg/k8s-mcp-go"
  }
}
```

## Documentation

## What K8s MCP Server (Go) MCP server does

K8s MCP Server (Go) MCP server exposes Kubernetes cluster operations through MCP while separating inspection from mutation. Its default readonly mode supports diagnosis and exploration without allowing workload changes. The server can inspect pods, deployments, StatefulSets, services, ConfigMaps, Secrets, PersistentVolumeClaims, Ingress resources, Jobs, nodes, namespaces, events, logs, and current CPU and memory usage.

The server also provides workload-oriented helpers. `resolve_workload` maps an application or workload name to matching resources and suggests follow-up tools, while `get_cluster_overview` summarizes cluster health. These capabilities suit incident investigation, deployment troubleshooting, and resource-usage checks from an AI client.

## How it works

K8s MCP Server (Go) MCP server selects an authorization boundary at startup. `readonly` is the default and exposes inspection tools only. `readwrite` adds controlled actions such as scaling deployments, restarting deployments or StatefulSets, changing container images, checking rollout progress, creating namespaces, and patching deployments. `dangerous` enables destructive operations and arbitrary YAML application, including resource and namespace deletion.

The MCP client launches the server using the installed binary and a mode argument, for example `-mode=readonly`. Requests are then translated into Kubernetes API operations rather than unrestricted shell access. The server reports its version, selected mode, Kubernetes configuration source, and runtime details through `get_server_info`.

## Setup and configuration

Install either an MCPB bundle from the project releases or a platform-specific native binary. MCPB-compatible clients can install the bundle directly. For a manual setup, place the binary on the system path and register it as the command for an MCP server entry. The supplied examples show configurations for Claude Desktop and Cursor.

Kubernetes credentials are selected in this order:

- `KUBECONFIG`, when explicitly set
- In-cluster ServiceAccount configuration
- `~/.kube/config` outside a cluster

An explicitly set but unloadable `KUBECONFIG` produces an error instead of falling back to another source. In-cluster operation uses the mounted ServiceAccount token, allowing projected token rotation to continue working.

## Tools and capabilities

Readonly tools cover resource listing and detail retrieval, pod logs, ConfigMap data, Secret metadata and keys, cluster overview, events, node and pod metrics, and workload resolution. List operations for several resource types support `all_namespaces=true`.

Readwrite tools cover deployment scaling, deployment and StatefulSet restarts, image updates, rollout checks, namespace creation, and deployment patches. Dangerous tools cover deleting pods, deployments, StatefulSets, DaemonSets, other resources, or namespaces, as well as applying arbitrary YAML manifests.

## Limitations and notes

The default mode does not modify workloads or delete resources. Readwrite mode remains narrower than full cluster control, while dangerous mode should be enabled only when unrestricted mutation is intentional. Secret listing returns keys only, and secret retrieval returns metadata and keys rather than secret values.

K8s MCP Server (Go) MCP server requires usable Kubernetes credentials and permissions for the requested API operations. The server does not replace Kubernetes RBAC; the selected mode controls which MCP tools are available, while the cluster identity still determines what those tools can do.

_Full upstream README: https://allmcps.com/mcp/k8s-mcp-server-go/readme_

