Server profile

kubectl-mcp-server

kubectl-mcp-server connects assistants to Kubernetes inspection and management workflows. It covers pod diagnostics, deployments, networking, Helm, security reviews, resource analysis, and optional dashboards.

Server facts

kubectl-mcp-server

Tech

Runtime / language
pythonPython
Transports
stdio
Remote available
No
Authentication
Not specified

Activity

GitHub stars
964
Last commit
Data as of

Tags

  • Cluster Management
  • Devops
  • Helm
  • Kubectl
  • Kubernetes

Overview

kubectl-mcp-server brings Kubernetes operations into MCP conversations. The README describes a broad tool catalog for inspecting pods, logs, events, deployments, services, storage, configuration, and cluster health. Diagnostic workflows investigate crashes, pending workloads, DNS, and connectivity, while management operations can create, scale, restart, patch, or delete resources. Helm support includes release inspection, chart discovery, repositories, installation, upgrades, and rollback. Context tools help select among configured clusters, making the same interface relevant beyond a single namespace or environment.

The recommended launch uses npx, with Node.js 14 or newer listed for that path. A Python installation requires Python 3.9 or newer, and Docker examples provide stdio or SSE deployment options. Every path still needs kubectl installed and configured plus access to a Kubernetes cluster. The README also describes RBAC validation, secret masking, a non-destructive mode, and OAuth 2.1 support, rather than implying that all operations are inherently read-only. Resource and cost tools help identify idle or overprovisioned workloads. Optional dashboard dependencies add interactive views, and the catalog includes integrations for GitOps, certificates, policy engines, and backups. This breadth is useful for an assistant-led operations workflow, but actual usefulness depends on the configured cluster access and the prerequisites of whichever optional features are selected.

Install & configure

Requirements

  • Node.js 14+ for the npx method
  • kubectl installed and configured
  • Access to a Kubernetes cluster
Documented launch / install command
npx -y kubectl-mcp-server

The README recommends this npx launch for MCP clients. Python installation instead requires Python 3.9+. Optional UI features have a separate dependency extra. Docker can use stdio or --transport sse. The tool list here is a selection of explicitly named README operations, not the entire catalog.

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.

Claude Desktop configuration
{
  "mcpServers": {
    "kubectl-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kubectl-mcp-server"
      ],
      "env": {}
    }
  }
}

Read the Claude Desktop setup guide

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.

Cursor configuration
{
  "mcpServers": {
    "kubectl-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kubectl-mcp-server"
      ],
      "env": {}
    }
  }
}

Read the Cursor setup guide

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.

VS Code configuration
{
  "servers": {
    "kubectl-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "kubectl-mcp-server"
      ],
      "env": {}
    }
  }
}

Read the VS Code setup guide

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.

Windsurf configuration
{
  "mcpServers": {
    "kubectl-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kubectl-mcp-server"
      ],
      "env": {}
    }
  }
}

Read the Windsurf setup guide

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.

Claude Code configuration
{
  "mcpServers": {
    "kubectl-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "kubectl-mcp-server"
      ],
      "env": {}
    }
  }
}

Read the Claude Code setup guide

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 README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
get_podsList pods for a Kubernetes namespace.
get_logsRetrieve logs from a pod.
get_pod_eventsInspect events associated with a pod.
diagnose_pod_crashInvestigate pod failures using diagnostic information.
create_deploymentCreate a Kubernetes deployment.
scale_deploymentChange the replica count of a deployment.
kubectl_rolloutManage deployment rollout operations.
diagnose_network_connectivityInvestigate service and workload connectivity problems.
check_dns_resolutionCheck DNS behavior relevant to cluster connectivity.
audit_rbac_permissionsAnalyze Kubernetes role and permission configuration.
check_secrets_securityInspect secrets for security concerns.
helm_listList Helm releases in the cluster.
install_helm_chartInstall an application from a Helm chart.
helm_rollbackReturn a Helm release to an earlier revision.
get_current_contextReport the selected Kubernetes context.
switch_contextSelect another configured Kubernetes context.
list_contextsList configured Kubernetes contexts.
get_resource_recommendationsSuggest resource settings based on workload analysis.
get_idle_resourcesFind resources that appear idle.
get_cost_analysisAnalyze cluster resource costs.
get_overprovisioned_resourcesIdentify workloads with excessive resource allocation.
delete_resourceDelete a selected Kubernetes resource.
show_cluster_overview_uiPresent an optional interactive cluster overview.

Names, permissions, and defaults can change. Check the current upstream documentation before granting access.

Use cases

  • Investigate a crashed pod using logs and events.
  • Create, scale, or roll back deployments.
  • Inspect Helm releases and manage chart installations.
  • Review RBAC and secret-security findings.
  • Identify idle workloads and oversized resource requests.

Strengths

  • Broad coverage of inspection and mutation workflows.
  • Includes Helm and Kubernetes context operations.
  • Documents non-destructive mode and secret masking.
  • Offers npx, Python, and Docker setup paths.

Limitations

  • Needs kubectl configuration and working cluster access.
  • The tool catalog includes destructive resource operations.
  • Interactive dashboards require optional dependencies.

Frequently asked questions

Yes. The README requires kubectl to be installed and configured, with cluster access.

Yes. The README documents pip installation and a Python module launch; that path needs Python 3.9 or newer.

Yes. Release inspection, chart and repository tools, installation, upgrade, and rollback are documented.

No. The catalog includes deployment creation and resource deletion; the README separately advertises a non-destructive mode.

Yes. The documented tools list, inspect, and switch Kubernetes contexts.

Independent listing, not an affiliation or security review. Grant the least access needed and verify the upstream instructions before running code.

Related MCP servers

EdgeOne Makers MCP

Cloud & DevOps

EdgeOne Makers MCP publishes full-stack projects and gives users a public address for the result. A separate hosted connection handles lightweight HTML previews without running the package locally.

Open Source MCP Servers for AWS

Cloud & DevOps

This AWS Labs repository collects specialized MCP servers for AWS documentation, cloud development, and operational workflows. It is a suite to choose from rather than one server exposing a single fixed tool catalog.

Cloudflare MCP Server

Cloud & DevOps

Cloudflare MCP Server is a collection of product-specific remote servers for Cloudflare accounts. It brings configuration, logs, analytics, documentation, and selected management workflows into compatible AI clients.

Terraform MCP Server

Cloud & DevOps

Connect MCP assistants to Terraform Registry data and HCP Terraform or Terraform Enterprise. It supports infrastructure research, private registry access, and workspace operations with selectable tools and deployment transports.

Kubernetes MCP Server

Cloud & DevOps

Give MCP assistants direct Kubernetes and OpenShift API access. The native Go server supports resource operations, pod diagnostics, Helm releases, and Tekton tasks, with configurable restrictions and multi-cluster support.

MCP Server Kubernetes

Cloud & DevOps

MCP Server Kubernetes lets assistants inspect and manage clusters through kubectl-oriented tools. It covers resources, logs, rollouts, Helm releases, port forwarding, and diagnostics using an existing Kubernetes context.

Cloud Run MCP Server

Cloud & DevOps

Cloud Run MCP Server connects agents to application deployment and service inspection on Google Cloud Run. It offers a local credential-based setup, Gemini CLI integration, and authenticated remote operation with specific limits.