Kubernetes MCP Server

Manage Your Kubernetes Cluster with k8s mcp-server

Remote serverstreamable-httpGo

What is the Kubernetes MCP Server?

Manage Your Kubernetes Cluster with k8s mcp-server

The short version

A Kubernetes Model Context Protocol (MCP) server that provides tools for interacting with Kubernetes clusters through a standardized interface.

  • API Resource Discovery — Get all available API resources in your Kubernetes cluster
  • Resource Listing — List resources of any type with optional namespace and label filtering
  • Resource Details — Get detailed information about specific Kubernetes resources
  • Resource Description — Get comprehensive descriptions of Kubernetes resources, similar to kubectl describe
  • Pod Logs — Retrieve logs from specific pods (optionally from a specific container, or all containers if unspecified)
  • Node Metrics — Get resource usage metrics for specific nodes

What it needs from you

  • Go 1.23 or later - Access to a Kubernetes cluster - kubectl configured with appropriate cluster access

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Kubernetes MCP Server

{
  "mcpServers": {
    "k8s-mcp-server-reza-gholizade": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "ginnux/k8s-mcp-server"],
      "env": {
        "KUBECONFIG_DATA": "your-value",
        "KUBERNETES_SERVER": "your-value",
        "KUBERNETES_TOKEN": "your-value",
        "KUBERNETES_CA_CERT_PATH": "your-value",
        "KUBECONFIG": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Go 1.23 or later - Access to a Kubernetes cluster - kubectl configured with appropriate cluster access
VariableDescriptionRequired
KUBECONFIG_DATAConfiguration value read at startup.Optional
KUBERNETES_SERVERConfiguration value read at startup.Optional
KUBERNETES_TOKENCredential the server authenticates with.Yes
KUBERNETES_CA_CERT_PATHFilesystem location the server is allowed to use.Optional
KUBECONFIGConfiguration value read at startup.Optional

Example prompts to try

  • “Use Kubernetes to KUBERNETES CA CERT.”
  • “Use Kubernetes to KUBERNETES CA CERT PATH.”
  • “Use Kubernetes to KUBERNETES INSECURE.”

Frequently asked questions

The server supports four methods, tried in priority order: (1) kubeconfig content from the `KUBECONFIG_DATA` environment variable, (2) API server URL (`KUBERNETES_SERVER`) and bearer token (`KUBERNETES_TOKEN`), (3) in-cluster service account (automatically detected), and (4) default kubeconfig file at `~/.kube/config` or custom path via `KUBECONFIG`.