Server facts
MCP Server Kubernetes
Project
- Author
- Flux159
- Repository
- github.com/Flux159/mcp-server-kubernetes
- License
- MIT
- Category
- Cloud & DevOps
Tech
- Runtime / language
- node
- Transports
- stdio
- Remote available
- No
- Authentication
- Not specified
Activity
- GitHub stars
- 1,600
- Last commit
- Data as of
Tags
- Cluster Management
- Helm
- Kubectl
- Kubernetes
- Observability
Overview
MCP Server Kubernetes connects an assistant to a Kubernetes cluster using an existing kubectl configuration. Its interface covers listing and describing resources, reading logs, applying manifests, creating objects, patching fields, scaling deployments, and managing rollouts. Context-management tools let users inspect or switch the selected cluster context. Other capabilities include running commands in pods, forwarding ports, maintaining nodes, and installing or upgrading Helm charts. A diagnostic prompt guides an assistant through identifying relevant pods, gathering evidence, and proposing remediation based on a keyword and optional namespace.
The documented prerequisites are kubectl on the executable path, a valid kubeconfig, and access to a cluster. Helm version three is optional unless chart operations are needed. The server normally loads the standard kubeconfig location and connects through the current context. An optional non-destructive mode removes designated destructive tools, but still permits creation and modification, so it should not be mistaken for read-only access. Secret values are masked in secret-get commands; the README explicitly excludes logs from that protection. Optional OpenTelemetry instrumentation traces tool calls, durations, errors, and Kubernetes context, exporting to compatible OTLP backends. Local client configuration uses npx, with examples for several assistants and editors. A Claude Desktop extension and development workflows are also documented.
Install & configure
Requirements
- Node.js and npx
- kubectl on PATH
- A valid kubeconfig with cluster access
- Helm v3 on PATH for Helm operations
npx mcp-server-kubernetesLoads the standard kubeconfig and current kubectl context by default. Set ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS to true to disable designated destructive operations; this still permits creation and updates. Telemetry is optional and off by default.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-server-kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
],
"env": {}
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-server-kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
],
"env": {}
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"mcp-server-kubernetes": {
"type": "stdio",
"command": "npx",
"args": [
"mcp-server-kubernetes"
],
"env": {}
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-server-kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
],
"env": {}
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-server-kubernetes": {
"type": "stdio",
"command": "npx",
"args": [
"mcp-server-kubernetes"
],
"env": {}
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository tool metadata and repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| cleanup | Remove resources managed by the server. |
| kubectl_get | Retrieve Kubernetes objects by type, name, and optional namespace. |
| kubectl_describe | Inspect detailed information about selected Kubernetes objects. |
| kubectl_apply | Apply a YAML manifest supplied as text or a file. |
| kubectl_delete | Delete resources selected by name, labels, type, or manifest. |
| kubectl_create | Create resources from files or supported creation subcommands. |
| kubectl_logs | Read logs from workloads such as pods, deployments, and jobs. |
| kubectl_scale | Adjust deployment replica counts. |
| kubectl_patch | Change resource fields through supported patch formats. |
| kubectl_rollout | Control rollouts for supported workload resources. |
| kubectl_context | List, inspect, or change the current Kubernetes context. |
| kubectl_reconnect | Rebuild API clients to refresh network connections and DNS after cluster changes. |
| explain_resource | Read documentation for a Kubernetes resource or field. |
| install_helm_chart | Install a Helm chart using standard or template-based methods. |
| upgrade_helm_chart | Update an existing Helm release. |
| uninstall_helm_chart | Remove a Helm release. |
| node_management | Cordon, drain, or uncordon cluster nodes. |
| port_forward | Expose a resource port through a local forwarded port. |
| stop_port_forward | Terminate an active port-forwarding process. |
| exec_in_pod | Run an executable and argument array in a container without shell interpretation. |
| list_api_resources | Enumerate resource APIs supported by the cluster. |
| kubectl_generic | Run a kubectl command using supplied arguments and flags. |
| ping | Check whether the connection remains responsive. |
| cleanup_pods | Clean up pods in documented problematic or completed states. |
| helm_template_apply | Use template-based Helm installation to work around authentication issues. |
| helm_template_uninstall | Use template-based Helm removal to work around authentication issues. |
Names, permissions, and defaults can change. Check the current upstream documentation before granting access.
Use cases
- Inspect pods and logs while diagnosing workload failures.
- Apply manifests and manage deployment rollouts from an assistant.
- Install or upgrade Helm releases with custom values.
- Trace assistant-driven cluster operations through an OTLP backend.
Strengths
- Covers routine kubectl work and advanced cluster operations.
- Uses existing kubeconfig contexts.
- Provides a diagnostic prompt and opt-in distributed tracing.
- Offers a mode that disables designated destructive tools.
Limitations
- Requires working cluster credentials and local kubectl.
- Non-destructive mode still allows resource changes.
- Secret masking does not cover log output.
Frequently asked questions
Independent listing, not an affiliation or security review. Grant the least access needed and verify the upstream instructions before running code.