Get the FREE Ultimate OpenClaw Setup Guide →

kubernetics

A Model Context Protocol (MCP) server that provides Kubernetes cluster introspection tools. It exposes various helper functions like listing pods, namespaces, node details, and more via MCP tools.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ddjain-kubernetics-mcp-server node <FULL PATH OF BUILD>/kubernetics-server/build/index.js \
  --env KUBECONFIG="Path to kubeconfig file (optional if cluster config is in default location)" \
  --env KUBE_CONTEXT="Optional: Kubernetes context to use"

How to use

This MCP server provides Kubernetes cluster introspection utilities exposed as MCP-compatible tools. It enables you to list pods across all namespaces, list pods within a specific namespace, enumerate namespaces, describe a particular pod, fetch sorted events for a namespace, and retrieve node resource usage and node metadata such as taints and labels. Tools are designed to be invoked by an MCP client (for example Claude or another client) that can call the MCP endpoints and display structured results. Use the tool names listed under Available Tools to perform targeted queries against your Kubernetes cluster. For example, you can request get-kubernetics-all-pods-detail to see all pods, or describe-kubernetics-pod with a specific pod name and namespace to obtain a detailed pod description.

How to install

Prerequisites:

  • Node.js (LTS) and npm installed on your machine
  • Access to a Kubernetes cluster (kubectl configured via kubeconfig)
  • Optional: claude-desktop (if you intend to integrate via Claude) or any MCP client that can consume MCP tools

Installation steps:

  1. Clone the repository: git clone <repository-url> cd mcp-kubernetics

  2. Install dependencies: npm install

  3. Build the project: npm run build This will generate a build folder containing index.js

  4. Start the server (example): node <path-to-built-index>/index.js Ensure you point to the built index.js in the build directory (as referenced in the mcp_config).

  5. Verify:

    • The server should expose MCP tools such as get-kubernetics-namespaces, get-kubernetics-all-pods-detail, describe-kubernetics-pod, etc., which you can call from your MCP client.

Note: If you use Claude or another GUI client, configure the path accordingly in your client to point to the built index.js as shown in the repository README.

Additional notes

Tips and common issues:

  • Ensure your kubeconfig is accessible and has appropriate permissions to list pods, namespaces, and node details.
  • If running inside a cluster, you may need to adapt environment variables or mount a kubeconfig into the container if you deploy via Docker or in a cloud environment.
  • The server exposes a set of tools with descriptive names prefixed by get-kubernetics- or describe-kubernetics-. Use these to request specific data from the cluster.
  • If you encounter network or authentication errors, verify that the KUBECONFIG path is correct or set KUBECONFIG/ KUBE_CONTEXT appropriately in the environment variables of the running process.
  • When integrating with Claude, follow the example configuration in the README to reference the built index.js path exactly, replacing <FULL PATH OF BUILD> with your system-specific absolute path.

Related MCP Servers

Sponsor this space

Reach thousands of developers