Kubernetes MCP Server
Unified kubectl and Helm v3 MCP server for cluster discovery, resource inspection, deployment rollouts, and OpenTelemetry tracing.
About this Server
Kubernetes MCP Server (`mcp-server-kubernetes`) provides coding agents with complete, secure access to Kubernetes clusters and Helm v3 charts. It wraps kubectl commands for listing, describing, creating, patching, and scaling resources, inspecting pod logs, managing contexts, cordoning/draining nodes, cleaning problematic pods, running k8s-diagnose troubleshooting flows, and exporting OpenTelemetry traces.
Direct low-latency RPC protocol communication with structured JSON schemas.
Restricted capability bounds to prevent accidental modifications or leakage.
Security & Best Practices
When to Use (and When Not To)
- •Troubleshooting crashing pods, failed deployments, and viewing cluster events directly in your editor
- •Scaling workloads, updating Helm release configurations, and applying Kubernetes YAML manifests
- •Running automated k8s-diagnose incident investigations without leaving your AI assistant
- •Local Docker container sandbox orchestration (use Docker MCP Gateway instead)
- •Relational database query tuning and snapshot rollbacks (use Rowsafe MCP instead)
- •Agent rules and markdown steering file linting (use Asitis Agent Tools instead)
Install & Setup
claude mcp add kubernetes -- npx -y mcp-server-kubernetesExposed Tools & Endpoints
10 toolsFunctions your AI agent can invoke via this Model Context Protocol server
Lists or retrieves Kubernetes resources (pods, services, deployments, configmaps) in standard or JSON/YAML format.
Shows detailed resource status, events, and configuration attributes for troubleshooting.
Streams or dumps container logs for a pod with tail, previous, and container selection.
Applies a configuration manifest from YAML/JSON to the connected Kubernetes cluster.
Scales replica counts for deployments, replica sets, or stateful sets.
Manages rollout status, history, pauses, resumes, and restarts for deployments.
Lists, retrieves, or switches the active kubectl cluster context.
Installs or upgrades Helm v3 charts with custom values and repository targets.
Forwards local ports to a Kubernetes pod or service for temporary debugging.
Cleans up problematic pods stuck in Evicted, Error, ImagePullBackOff, or CrashLoopBackOff states.