kubernetes-mcp
Provides Helm lifecycle management, including listing releases, installing, upgrading, rolling back, uninstalling releases, getting values, viewing revision history, showing default chart values, and managing chart repositories.
Provides comprehensive management of Kubernetes clusters, including pods, deployments, services, configmaps, secrets, events, logs, exec, port-forwarding, manifest apply/delete, nodes, workloads, storage, ingress, batch jobs, rollouts, RBAC, kubeconfig contexts, metrics, HPAs, and CRDs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kubernetes-mcpList all pods in the default namespace"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
kubernetes-mcp
A Model Context Protocol server that gives Claude (or any MCP client) full access to a Kubernetes cluster and Helm. Exposes 73 tools covering pods, deployments, services, config, secrets, events, logs, exec, port-forwarding, manifest apply/delete, Helm lifecycle management, nodes, workloads, storage, ingress, batch jobs, rollouts, RBAC, kubeconfig contexts, metrics, HPAs, and CRDs.
Prerequisites
Related MCP server: mcp-kubernetes-server
Installation
git clone https://github.com/Stonepusher/kubernetes-mcp.git
cd kubernetes-mcp
npm install
npm run buildUsage with Claude Code
A .mcp.json is included in the repo root. When you open the project directory in Claude Code the kubernetes server is registered automatically. Run /mcp inside Claude Code to confirm it is active, then talk to Claude naturally:
"List all pods in the default namespace" "Scale the echo-server deployment to 3 replicas" "Show me the logs from the nginx pod" "Install bitnami/nginx as my-release in the staging namespace" "What CRDs are installed in this cluster?" "Show me all ClusterRoles and their rule counts"
Manual registration
To register the server globally (outside this directory) add the following to your Claude Code MCP settings:
{
"mcpServers": {
"kubernetes": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/kubernetes-mcp/dist/index.js"]
}
}
}Tools
Kubernetes — core resources
Tool | Description |
| List all namespaces |
| List pods in a namespace (optional label selector) |
| Get full details of a pod |
| List deployments in a namespace |
| Get full details of a deployment |
| Scale a deployment to N replicas |
| List services in a namespace |
| Get full details of a service |
| List ConfigMaps in a namespace |
| Get a ConfigMap including its data |
| List Secrets in a namespace (names/types only) |
| Get a Secret (values are base64-encoded) |
| Get events in a namespace, optionally filtered by object name |
Kubernetes — operations
Tool | Description |
| Stream or tail logs from a pod container |
| Execute a command inside a running pod |
| Start a local port-forward tunnel to a pod |
| List active port-forward sessions |
| Stop a port-forward session |
| Apply a YAML/JSON manifest ( |
| Delete resources defined in a manifest |
| Delete any resource by type, name, and namespace (no manifest needed) |
Kubernetes — nodes
Tool | Description |
| List all nodes with status, roles, and version info |
| Get full details of a node |
| Cordon a node to prevent new pod scheduling |
| Uncordon a node to re-enable pod scheduling |
| Drain a node by evicting all pods |
Kubernetes — workloads
Tool | Description |
| List DaemonSets in a namespace |
| Get full details of a DaemonSet |
| List StatefulSets in a namespace |
| Get full details of a StatefulSet |
Kubernetes — batch
Tool | Description |
| List Jobs in a namespace |
| Get full details of a Job |
| List CronJobs in a namespace |
| Get full details of a CronJob |
| Suspend a CronJob to stop it scheduling new Jobs |
| Resume a suspended CronJob |
Kubernetes — rollouts
Tool | Description |
| Trigger a rolling restart of a Deployment, DaemonSet, or StatefulSet |
| Check rollout status and wait for completion |
| Roll back to a previous revision |
Kubernetes — storage
Tool | Description |
| List all PersistentVolumes |
| Get full details of a PersistentVolume |
| List PersistentVolumeClaims in a namespace |
| Get full details of a PersistentVolumeClaim |
| List all StorageClasses |
| Get full details of a StorageClass |
Kubernetes — networking
Tool | Description |
| List Ingresses in a namespace |
| Get full details of an Ingress |
Kubernetes — autoscaling
Tool | Description |
| List HorizontalPodAutoscalers in a namespace |
| Get full details of a HorizontalPodAutoscaler |
Kubernetes — RBAC
Tool | Description |
| List all ClusterRoles |
| Get full details of a ClusterRole |
| List all ClusterRoleBindings |
| Get full details of a ClusterRoleBinding |
| List Roles in a namespace |
| Get full details of a Role |
| List RoleBindings in a namespace |
| Get full details of a RoleBinding |
Kubernetes — custom resources
Tool | Description |
| List all CustomResourceDefinitions |
| Get full details of a CustomResourceDefinition |
Kubernetes — contexts & metrics
Tool | Description |
| List all kubeconfig contexts and show which is active |
| Switch the active kubeconfig context |
| Show CPU/memory usage for all nodes (requires metrics-server) |
| Show CPU/memory usage for pods in a namespace (requires metrics-server) |
Helm
Tool | Description |
| List releases (single namespace or all) |
| Install a chart |
| Upgrade (or install) a release |
| Roll back a release to a previous revision |
| Uninstall a release |
| Get values for an installed release |
| Get revision history of a release |
| Show default values for a chart before installing |
| Add a Helm chart repository |
| Update local Helm repository cache |
Development
npm run build # compile TypeScript → dist/index.js via esbuild
npm run dev # rebuild on file changes
npm run typecheck # tsc --noEmit (type-check only, no emit)
npm test # smoke test — exercises all 73 tools against a live clusterSmoke test
npm test runs test/smoke-test.mjs, which spawns the MCP server over stdio and exercises all read-only tools against the currently configured cluster. It discovers real resource names dynamically (no hardcoded names) and skips dependent tests gracefully when resources are not found. Write operations (k8s_rollout_restart, k8s_use_context, etc.) are hard-skipped.
Kubernetes MCP Server — Smoke Test
==================================================
── Phase 1: Handshake ──────────────────────────────────────
[PASS] initialize — serverInfo.name === "kubernetes"
── Phase 2: Tool inventory ─────────────────────────────────
[PASS] tools/list — count === 73
── Phase 3: Tool assertions ────────────────────────────────
[PASS] k8s_list_namespaces — returns non-empty array
[PASS] k8s_list_pods — non-empty array in kube-system
...
==================================================
Results (7.3s elapsed)
Passed : 55
Failed : 0
Skipped: 10Build notes
@kubernetes/client-node v1.x ships ~54 MB of generated TypeScript types that OOM the TypeScript compiler. The project uses esbuild to bundle to a single CJS file (dist/index.js) without type-checking overhead. Use npm run typecheck separately if you need full type validation.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Stonepusher/kubernetes-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server