MCP Kubernetes Server is an MCP server that provides tools for managing and inspecting Kubernetes clusters directly through Large Language Models. Built with Python and wrapping standard kubectl operations, it connects LLM interfaces to active Kubernetes environments using local cluster configurations. DevOps engineers, platform teams, and site reliability engineers use this server to interact with containerized workloads using natural conversational prompts instead of manually constructing command-line syntax. The server exposes tools for querying cluster states, listing resources across namespaces, fetching container logs, and inspecting cluster events. It also enables administrators to modify cluster states by deploying applications, scaling replica counts, updating container image versions, adjusting resource labels and annotations, configuring port forwarding, and removing workloads. By establishing a structured, type-safe communication layer, the server translates model tool calls into precise cluster commands while relying on existing Kubernetes authentication and access controls.
Category: Cloud & Infrastructure
Tags: cluster-management, containers, k8s, kubectl, kubernetes
kubectl is configured with cluster access. 2. Clone the repository into your local directory: git clone https://github.com/abhijeetka/mcp-k8s-server ~/mcp/mcp-k8s-server 3. Add the server entry to your Claude Desktop configuration file (claude_desktop_config.json): json { "mcpServers": { "Kubernetes": { "command": "uv", "args": [ "--directory", "~/mcp/mcp-k8s-server", "run", "kubernetes.py" ] } } } 4. Alternatively, install automatically via Smithery using: npx -y @smithery/cli install @abhijeetka/mcp-k8s-server --client claude 5. Restart your Claude Desktop client to start managing your cluster.Part of MCP Servers
You can configure it in Claude Desktop by pointing to the repository's kubernetes.py script using uv, or install it automatically through Smithery with the command npx -y @smithery/cli install @abhijeetka/mcp-k8s-server --client claude. You must have Python 3.x and an active kubectl configuration.
It allows language models to run common kubectl operations on a cluster. Supported actions include listing cluster resources, creating and scaling deployments, modifying container images, streaming pod logs, reading namespace events, managing labels or annotations, and handling port forwarding.
It works with Claude Desktop and any client that supports the Model Context Protocol standard. Automated installation is supported specifically for Claude Desktop via Smithery, but any client capable of launching Python scripts can run it.
Yes, it is an open-source project hosted on GitHub, allowing users to inspect the implementation, report issues, and submit pull requests to expand its tool capabilities.
No, it wraps your local kubectl setup and relies on your existing cluster access controls. All operations are executed within the authenticated context and permissions granted to your configured Kubernetes user.