Home / Servers

mcp-server-kubernetes

by Flux159

MCP Server Kubernetes

CI Language Kubernetes Docker Stars Issues PRs Welcome Last Commit

<p align="center"> <img src="https://raw.githubusercontent.com/Flux159/mcp-server-kubernetes/refs/heads/main/icon.png" width="200"> </p>

MCP Server that can connect to a Kubernetes cluster and manage it. Supports loading kubeconfig from multiple sources in priority order.

https://github.com/user-attachments/assets/f25f8f4e-4d04-479b-9ae0-5dac452dd2ed

Installation & Usage

Prerequisites

Before using this MCP server with any tool, make sure you have:

  1. kubectl installed and in your PATH
  2. A valid kubeconfig file with contexts configured
  3. Access to a Kubernetes cluster configured for kubectl (e.g. minikube, Rancher Desktop, GKE, etc.)
  4. Helm v3 installed and in your PATH (no Tiller required). Optional if you don't plan to use Helm.

You can verify your connection by running kubectl get pods in a terminal to ensure you can connect to your cluster without credential issues.

By default, the server loads kubeconfig from ~/.kube/config. For additional authentication options (environment variables, custom paths, etc.), see ADVANCED_README.md.

Claude Code

Add the MCP server to Claude Code using the built-in command:

claude mcp add kubernetes -- npx mcp-server-kubernetes

This will automatically configure the server in your Claude Code MCP settings.

Codex

Add the MCP server to Codex CLI using the built-in command:

codex mcp add kubernetes -- npx mcp-server-kubernetes

This registers the server globally in ~/.codex/config.toml and makes its tools available in all Codex sessions.

Claude Desktop

Add the following configuration to your Claude Desktop config file:

{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": ["mcp-server-kubernetes"]
    }
  }
}

Claude Desktop Connector via mcpb

MCP Server Kubernetes is also available as a mcpb (formerly dxt) extension. In Claude Desktop, go to Settings (Cmd+, on Mac) -> Extensions -> Browse Extensions and scroll to find mcp-server-kubernetes in the modal. Install it & it will install & utilize kubectl via command line & your kubeconfig.

To manually install, you can also get the .mcpb by going to the latest Release and downloading it.

VS Code

Install Kubernetes MCP in VS Code

For VS Code integration, you can use the MCP server with extensions that support the Model Context Protocol:

  1. Inst

Related servers

n8n

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

NOASSERTION198,904

@modelcontextprotocol/server-everything

Official

by modelcontextprotocol

MCP server that exercises all the features of the MCP protocol

89,105

@modelcontextprotocol/server-filesystem

Official

by modelcontextprotocol

MCP server for filesystem access

SEE LICENSE IN LICENSE89,105

mcp-server-fetch

Official

by modelcontextprotocol

A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

89,105