Kubernetes MCP Server
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.
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
Maintainer
Works with
Installation
NPM
npx -y kubernetes-mcp-serverPIP
pip install kubernetes-mcp-serverManual Installation
npx -y kubernetes-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 nodesAdd 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"]
}
}
}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"]
}
}
}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.
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.
Kubernetes MCP Server Alternatives — Similar Cloud Services Servers
Looking for alternatives to Kubernetes MCP Server? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
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.
Set Up Kubernetes MCP Server in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.