Kubernetes MCP Server

Manage Your Kubernetes Cluster with k8s mcp-server

Remote serverstreamable-httpGo

What is the Kubernetes MCP server?

Most cloud and infrastructure work still happens through a UI a human drives. Kubernetes MCP server moves it into the conversation instead. 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

Getting it running

Because this one is hosted, setup is mostly authentication — you point your client at the endpoint and approve access. Nothing runs on your machine, so there is no runtime to keep patched.

The tools it exposes

The server publishes 3 tools. What each one is for:

  • KUBERNETES_CA_CERT — CA certificate content (base64-encoded or PEM format)
  • KUBERNETES_CA_CERT_PATH — Path to CA certificate file
  • KUBERNETES_INSECURE — Set to "true" to skip TLS verification (not recommended for production)

What it needs from you

Configuration is passed through the environment: KUBECONFIG_DATA, KUBERNETES_SERVER, KUBERNETES_TOKEN, KUBERNETES_CA_CERT_PATH, KUBECONFIG. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

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

Things to watch

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How it compares

Plenty of cloud and infrastructure servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Kubernetes's toolset — KUBERNETES_CA_CERT, KUBERNETES_CA_CERT_PATH, KUBERNETES_INSECURE — is a fair guide to whether it matches your workflow. It is maintained by reza-gholizade; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
KUBERNETES_CA_CERTCA certificate content (base64-encoded or PEM format)
KUBERNETES_CA_CERT_PATHPath to CA certificate file
KUBERNETES_INSECURESet to "true" to skip TLS verification (not recommended for production)

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`.