MCP Server Kubernetes
About
MCP Server Kubernetes is a Model Context Protocol server that connects to a Kubernetes cluster and allows AI assistants like Claude to manage it. It is designed for developers and operators who want to interact with their cluster via natural language.
Details
- License
- MIT license
Explore
- [x] Connect to a Kubernetes cluster
- [x] List all pods, services, deployments, nodes
- [x] Create, describe, delete a pod
- [x] List all namespaces, create a namespace
- [x] Create custom pod & deployment configs, update deployment replicas
- [x] Create services
- [x] Get logs from a pod for debugging (supports pods, deployments, jobs, and label selectors)
- [x] Support Helm v3 for installing charts
- Install charts with custom values
- Uninstall releases
- Upgrade existing releases
- Support for namespaces
- Support for version specification
- Support for custom repositories
- [x] kubectl explain and kubectl api-resources support
- [x] Get Kubernetes events from the cluster
- [x] Port forward to a pod or service
- [x] Create, list, and decribe cronjobs
- [x] Non-destructive mode for read and create/update-only access to clusters
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP Server KubernetesCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": ["mcp-server-kubernetes"]
}
}
}
The server will automatically connect to your current kubectl context. Make sure you have:
1. kubectl installed and in your PATH
2. A valid kubeconfig file with contexts configured
3. Access to a Kubernetes cluster configured for kubectl (e.g. minikube, Rancher Desktop, GKE, etc.)
4. Helm v3 installed and in your PATH (no Tiller required). Optional if you don't plan to use Helm.
You can verify your connection by asking Claude to list your pods or create a test deployment.
If you have errors open up a standard terminal and run kubectl get pods to see if you can connect to your cluster without credentials issues.
mcp-chat is a CLI chat client for MCP servers. You can use it to interact with the Kubernetes server.
npx mcp-chat --server "npx mcp-server-kubernetes"
Alternatively, pass it your existing Claude Desktop configuration file from above (Linux should pass the correct path to config):
Mac:
npx mcp-chat --config "~/Library/Application Support/Claude/claude_desktop_config.json"
Windows:
npx mcp-chat --config "%APPDATA%\Claude\claude_desktop_config.json"
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp server kubernetes": {
"mcp-server-kubernetes-kmathur": {
"command": "npx",
"args": [
"mcp-chat",
"--server",
"npx mcp-server-kubernetes"
]
}
}
}
}
McpServers
{
"mcp-server-kubernetes-kmathur": {
"command": "npx",
"args": [
"mcp-chat",
"--server",
"npx mcp-server-kubernetes"
]
}
}
MCP Server that can connect to a Kubernetes cluster and manage it.
https://github.com/user-attachments/assets/f25f8f4e-4d04-479b-9ae0-5dac452dd2ed
<a href="https://glama.ai/mcp/servers/w71ieamqrt"></a>
Usage with Claude Desktop
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": ["mcp-server-kubernetes"]
}
}
}
The server will automatically connect to your current kubectl context. Make sure you have:
1. kubectl installed and in your PATH
2. A valid kubeconfig file with contexts configured
3. Access to a Kubernetes cluster configured for kubectl (e.g. minikube, Rancher Desktop, GKE, etc.)
4. Helm v3 installed and in your PATH (no Tiller required). Optional if you don't plan to use Helm.
You can verify your connection by asking Claude to list your pods or create a test deployment.
If you have errors open up a standard terminal and run kubectl get pods to see if you can connect to your cluster without credentials issues.
Usage with mcp-chat
mcp-chat is a CLI chat client for MCP servers. You can use it to interact with the Kubernetes server.
npx mcp-chat --server "npx mcp-server-kubernetes"
Alternatively, pass it your existing Claude Desktop configuration file from above (Linux should pass the correct path to config):
Mac:
npx mcp-chat --config "~/Library/Application Support/Claude/claude_desktop_config.json"
Windows:
npx mcp-chat --config "%APPDATA%\Claude\claude_desktop_config.json"
Features
- [x] Connect to a Kubernetes cluster
- [x] List all pods, services, deployments, nodes
- [x] Create, describe, delete a pod
- [x] List all namespaces, create a namespace
- [x] Create custom pod & deployment configs, update deployment replicas
- [x] Create services
- [x] Get logs from a pod for debugging (supports pods, deployments, jobs, and label selectors)
- [x] Support Helm v3 for installing charts
- Install charts with custom values
- Uninstall releases
- Upgrade existing releases
- Support for namespaces
- Support for version specification
- Support for custom repositories
- [x] kubectl explain and kubectl api-resources support
- [x] Get Kubernetes events from the cluster
- [x] Port forward to a pod or service
- [x] Create, list, and decribe cronjobs
- [x] Non-destructive mode for read and create/update-only access to clusters
Local Development
Make sure that you have bun installed. Clone the repo & install dependencies:
git clone https://github.com/Flux159/mcp-server-kubernetes.git
cd mcp-server-kubernetes
bun install
Development Workflow
1. Start the server in development mode (watches for file changes):
bun run dev
2. Run unit tests:
bun run test
3. Build the project:
bun run build
4. Local Testing with Inspector
```bash
npx @modelcontextprotocol/inspector node dist/index.js
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



