Kubernetes MCP Server

Manage pods, services, deployments, and logs from your AI assistant

By Flux159 (community) community backend monitoring cloud

The Kubernetes MCP Server connects Claude and other MCP-compatible agents to your Kubernetes cluster using your local kubectl configuration. List and describe pods and services, tail container logs, create deployments, and delete resources — all from a natural-language conversation. The server reads your current kubectl context from ~/.kube/config, so it targets whichever cluster you're already pointed at.

Installation & Configuration

Requires kubectl to be installed and configured with at least one cluster context. Add this block to your claude_desktop_config.json:

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

No environment variables are required. The server automatically reads ~/.kube/config and uses the current context. To switch clusters, run kubectl config use-context <context-name> before starting Claude Desktop.

Config file location:

Available Tools (7)

Use Cases

Gotchas

Security Note

This server runs with the full permissions of your current kubectl context. If your context has cluster-admin rights, Claude can delete any resource in any namespace. Use a dedicated kubeconfig with a limited-scope ServiceAccount for production clusters. For read-only access, bind the ServiceAccount to the built-in view ClusterRole.

Source & Documentation

GitHub Repository: https://github.com/Flux159/mcp-server-kubernetes

Protocol: Model Context Protocol (MCP) — modelcontextprotocol.io

MCP Setup Pack — $15
20 ready-to-paste server configs + installer + doctor script
Get the Pack →
← Back to MCP Server Directory