mcp-kubernetes-server
@feiskyer
About mcp-kubernetes-server
A Model Context Protocol (MCP) server that enables AI assistants to interact with Kubernetes clusters. It serves as a bridge between AI tools (like Claude, Cursor, and GitHub Copilot) and Kubernetes, translating natural language requests into Kubernetes operations and returning t
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"kubernetes": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--mount",
"type=bind,src=/home/username/.kube/config,dst=/home/mcp/.kube/config",
"ghcr.io/feiskyer/mcp-kubernetes-server"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is mcp-kubernetes-server?
mcp-kubernetes-server is a Model Context Protocol (MCP) server that enables AI assistants to interact with Kubernetes clusters. It translates natural language requests from AI assistants into kubectl commands or direct Kubernetes API calls, executing them against the target cluster and returning structured responses.
How to use mcp-kubernetes-server?
Install via Docker or uvx. Configure in the mcpServers section of your AI client (Claude Desktop, Cursor, ChatGPT Copilot, GitHub Copilot). Provide a valid kubeconfig either via the KUBECONFIG environment variable (uvx) or by mounting the file into the container (Docker). Ensure kubectl, helm, and Python ≥3.11 (for uvx) are installed. Run with optional command-line flags to disable specific operations or change transport (stdio, sse, streamable-http).
Key features of mcp-kubernetes-server
- Executes arbitrary kubectl and helm commands.
- Provides read tools for resources, logs, events, APIs, and CRDs.
- Offers write tools for create, apply, expose, scale, and rollout operations.
- Supports disabling kubectl, helm, write, or delete operations.
- Provides RBAC check tools (
k8s_auth_can_i,k8s_auth_whoami). - Supports multiple transports: stdio, SSE, and streamable HTTP.
Use cases of mcp-kubernetes-server
- Query cluster status and resource states via natural language.
- Diagnose pod issues by inspecting logs, events, and resource descriptions.
- Manage deployments (scale, rollout, set images, environment variables).
- Perform administrative tasks like cordoning nodes or checking RBAC permissions.
- Automate cluster operations through AI assistants in CI/CD pipelines.
FAQ from mcp-kubernetes-server
What prerequisites are needed to run mcp-kubernetes-server?
A working Kubernetes cluster, a valid kubeconfig file, kubectl and helm installed in the system PATH, and Python ≥3.11 if using uvx (not required for Docker).
How do I configure the kubeconfig?
Set the KUBECONFIG environment variable to the path of your kubeconfig file, or when using Docker mount the kubeconfig file to /home/mcp/.kube/config.
Can I disable write or delete operations?
Yes, use the --disable-write flag to block all write operations or --disable-delete to block deletions. Similarly, --disable-kubectl and --disable-helm disable those command executers.
What transport mechanisms are supported?
mcp-kubernetes-server supports three transports: stdio (default for uvx), sse, and streamable-http. Use the --transport flag to choose, and specify --host/--port for the server transports.
Which AI assistants are compatible?
The server works with any AI client that supports the Model Context Protocol, including Claude Desktop, Cursor, ChatGPT Copilot, and GitHub Copilot.
More Cloud & Infrastructure MCP servers
🐋 Docker MCP server
ckreilingMCP server for Docker
Terraform MCP Server
hashicorpThe Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.
Supabase MCP Server
supabase-communityConnect Supabase to your AI assistants
GCP MCP
eniayomiA Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your Google Cloud Platform environment. This allows for natural language querying and management of your GCP resources during conversations.
container-use
aluzzardiDevelopment environments for coding agents. Enable multiple agents to work safely and independently with your preferred stack.
Comments