Kubernetes MCP Server

v0.0.62Cloud Servicesstable

A Model Context Protocol (MCP) server that provides safe, read-only access to Kubernetes resources for debugging and inspection. Built with security in mind, it offers comprehensive cluster visibility without modification capabilities.

containerscontextkuberneteskubernetes-mcpmcp
Share:
1,609
Stars
0
Downloads
0
Weekly
0/5

What is Kubernetes MCP Server?

Kubernetes MCP Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server that provides safe, read-only access to kubernetes resources for debugging and inspection. built with security in mind, it offers comprehensive cluster visibility w...

A Model Context Protocol (MCP) server that provides safe, read-only access to Kubernetes resources for debugging and inspection. Built with security in mind, it offers comprehensive cluster visibility without modification capabilities.

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • cleanup
  • kubectl_get
  • kubectl_describe
  • kubectl_apply
  • kubectl_delete

Use Cases

Safe read-only Kubernetes resource access
Cluster debugging and inspection
containers

Maintainer

LicenseApache-2.0
Languagego
Versionv0.0.62
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y kubernetes-mcp-server

PIP

pip install kubernetes-mcp-server

Manual Installation

npx -y kubernetes-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Kubernetes MCP Server

Kubernetes MCP Server is a Go-based Model Context Protocol server that gives AI assistants direct access to Kubernetes cluster resources through the Kubernetes API — no kubectl binary required. It exposes toolsets for core operations (pods, logs, exec, events, namespaces), Helm chart management, Tekton pipelines, KubeVirt VMs, and Kiali service mesh metrics, and automatically discovers cluster configuration from the default kubeconfig or in-cluster service accounts. Platform engineers and SREs use it to let AI assistants troubleshoot pod failures, inspect deployments, run Helm operations, and debug cluster state through natural language without switching to a terminal.

Prerequisites

  • A running Kubernetes cluster with kubectl access configured (kubeconfig at ~/.kube/config or via KUBECONFIG env var)
  • Node.js 18+ for npx-based installation, OR Python 3.8+ for pip-based installation, OR a native binary download
  • Appropriate RBAC permissions in the target Kubernetes cluster for the operations you want to perform
  • An MCP-compatible AI client: Claude Desktop, Cursor, or similar
1

Verify your Kubernetes cluster access

Confirm that kubectl can reach your cluster before configuring the MCP server. The server uses the same kubeconfig that kubectl uses.

kubectl cluster-info
kubectl get nodes
2

Add the Kubernetes MCP server to your client configuration

Add the server to your MCP client config using npx. The server automatically reads your kubeconfig from the default location (~/.kube/config).

{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": ["-y", "kubernetes-mcp-server@latest"]
    }
  }
}
3

Use a custom kubeconfig path (optional)

If your kubeconfig is not at the default location, pass it explicitly with the --kubeconfig flag.

{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": ["-y", "kubernetes-mcp-server@latest", "--kubeconfig", "/path/to/your/kubeconfig"]
    }
  }
}
4

Restart your MCP client

Restart Claude Desktop or reload the editor MCP extension. The server will connect to your cluster and expose toolsets for pods, services, deployments, Helm, Tekton, and more.

5

Inspect and manage cluster resources through the AI assistant

Ask your AI to list pods, fetch logs, describe failing deployments, switch kubeconfig contexts, or run Helm operations. All operations use your existing RBAC permissions.

Kubernetes MCP Server Examples

Client configuration

Claude Desktop config to run the Kubernetes MCP server via npx with automatic kubeconfig detection.

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

Prompts to try

These prompts demonstrate the server's pod debugging, Helm, and cluster inspection capabilities.

- "List all pods in the production namespace and show me any that are not in Running state"
- "Get the last 100 log lines from the api-server pod in the default namespace"
- "Describe the failing deployment 'checkout-service' and tell me what's wrong"
- "Switch to the staging cluster context and list all Helm releases installed there"
- "Show me all Kubernetes events in the kube-system namespace from the last 10 minutes"

Troubleshooting Kubernetes MCP Server

Server cannot connect to the cluster — kubeconfig not found

Verify that ~/.kube/config exists and is valid with 'kubectl cluster-info'. If using a non-default path, pass '--kubeconfig /path/to/config' in the args array of your MCP config, or set the KUBECONFIG environment variable in the env block.

Permission denied errors when fetching resources or logs

The server operates with the RBAC permissions of the credentials in your kubeconfig. Create a ClusterRole with the required get/list/watch permissions and bind it to your user or service account. For read-only use, the pre-built 'view' ClusterRole is sufficient for most tools.

npx takes too long to start or fails with network errors

The first run downloads the package. For air-gapped or slow environments, use the Python pip alternative ('pip install kubernetes-mcp-server' then run 'kubernetes-mcp-server' as the command), or download a native binary from the GitHub releases page and reference its absolute path in the config.

Frequently Asked Questions about Kubernetes MCP Server

What is Kubernetes MCP Server?

Kubernetes MCP Server is a Model Context Protocol (MCP) server that model context protocol (mcp) server that provides safe, read-only access to kubernetes resources for debugging and inspection. built with security in mind, it offers comprehensive cluster visibility without modification capabilities. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Kubernetes MCP Server?

Install via npm with the command: npx -y kubernetes-mcp-server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Kubernetes MCP Server?

Kubernetes MCP Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Kubernetes MCP Server free to use?

Yes, Kubernetes MCP Server is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Kubernetes MCP Server?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides