Releases: rohitg00/kubectl-mcp-server
v1.23.1 - Code Optimization & Security Fixes
Changes
Security Fixes
- Fixed
os.system()command injection innetworking.pyport-forward — replaced withsubprocess.Popenusing list args - Fixed temp file leak in
kubectl_apply— wrappedos.unlinkintry/finally - Fixed
command.split()inkind_node_exec— replaced withshlex.split() - Added non-destructive guard to
exec_in_podandport_forward - Restricted
kubectl_genericallowlist —configlimited to safe subcommands,authlimited tocan-i - Fixed hardcoded version string in HTTP handler
DRY Consolidation
- Consolidated
_get_kubectl_context_argsfrom 10 duplicate implementations to single source ink8s_config.py - Extracted shared Helm repo add/update helper
- Created
_cli_utils.pywith cached CLI availability checks and common subprocess runner - Standardized non-destructive mode patterns across all tool files
Dead Code Removal
- Removed unused imports across 7 files
- Removed unused
check_safety_modedecorator andis_operation_allowedfunction fromsafety.py - Removed auto-pip-install antipattern from
mcp_server.py
Code Quality
- Fixed bare
except:clauses innetworking.pyandcost.py - Fixed
Nonevalues in pod recommendations list - Proper exception chaining with
from errin FastMCP import - Updated test suite: 469 tests passing
Install
pip install kubectl-mcp-server==1.23.1
# or
npx kubectl-mcp-server@1.23.1v1.23.0
Fix: In-Cluster Kubernetes Config
Resolves the HTTPConnectionPool(host='localhost', port=80): Max retries exceeded error when the server is deployed inside a Kubernetes cluster (#61).
What Changed
- Fixed config loading —
_patched_load_kube_configno longer short-circuits calls with explicit arguments (config_file, context, client_configuration), which was preventing the kubernetes client from loading the correct API server address - In-cluster fallback — The kubeconfig provider now automatically falls back to in-cluster config when no kubeconfig file exists in the container
- Actionable errors — Raises
ProviderErrorwith clear remediation steps when neither kubeconfig nor in-cluster config is available, instead of silently falling back tolocalhost:80 - Deployment manifest — Added
MCP_K8S_PROVIDER=in-clusterandKUBERNETES_SERVICE_PORT=443env vars
Deployment
For in-cluster deployments, ensure these env vars are set:
env:
- name: MCP_K8S_PROVIDER
value: "in-cluster"
- name: KUBERNETES_SERVICE_HOST
value: "kubernetes.default.svc"
- name: KUBERNETES_SERVICE_PORT
value: "443"Reference manifests: deploy/kubernetes/
Install
pip install kubectl-mcp-server==1.23.0
# or
npx kubectl-mcp-server@1.23.0
# or
docker pull rohitghumare64/kubectl-mcp-server:1.23.0v1.22.0 - kubectl-mcp-app Interactive UI Dashboards
What's New
kubectl-mcp-app - 8 Interactive UI Dashboards
Added a standalone npm package kubectl-mcp-app that provides beautiful, interactive UI dashboards for Kubernetes management using the MCP ext-apps SDK.
Installation:
# Via npm
npm install -g kubectl-mcp-app
# Or via npx (no install)
npx kubectl-mcp-appClaude Desktop Configuration:
{
"mcpServers": {
"kubectl-app": {
"command": "npx",
"args": ["kubectl-mcp-app"]
}
}
}8 Interactive UI Tools:
| Tool | Description |
|---|---|
k8s-pods |
Interactive pod viewer with filtering, sorting, status indicators |
k8s-logs |
Real-time log viewer with syntax highlighting and search |
k8s-deploy |
Deployment dashboard with rollout status, scaling, rollback |
k8s-helm |
Helm release manager with upgrade/rollback actions |
k8s-cluster |
Cluster overview with node health and resource metrics |
k8s-cost |
Cost analyzer with waste detection and recommendations |
k8s-events |
Events timeline with type filtering and grouping |
k8s-network |
Network topology graph showing Services/Pods/Ingress |
Features:
- 🎨 Dark/light theme support
- 📊 Real-time data visualization
- 🖱️ Interactive actions (scale, restart, delete)
- 🔗 Seamless integration with kubectl-mcp-server
- 📦 TypeScript + React 19 + Vite
- 🎯 Single-file HTML bundles (~220KB each)
- ✅ 27 tests with full coverage
Full Changelog
v1.21.0 - vind, kind & Enhanced Skills
What's New
vCluster (vind) Support - 14 Tools
Manage virtual Kubernetes clusters using vCluster CLI:
vind_detect_tool,vind_list_clusters_tool,vind_status_toolvind_create_cluster_tool,vind_delete_cluster_toolvind_pause_tool,vind_resume_tool,vind_connect_tool,vind_disconnect_toolvind_upgrade_tool,vind_describe_tool,vind_get_kubeconfig_toolvind_logs_tool,vind_platform_start_tool
kind (Kubernetes IN Docker) Support - 32 Tools
Comprehensive local Kubernetes cluster management:
Core Operations (15 tools):
- Cluster lifecycle: create, delete, list, info
- Image management: load, build node images
- Kubeconfig: get, set, export
New in v1.21.0 (17 tools):
- Configuration:
kind_config_validate,kind_config_generate,kind_config_show,kind_available_images - Registry:
kind_registry_create,kind_registry_connect,kind_registry_status - Node Management:
kind_node_exec,kind_node_logs,kind_node_inspect,kind_node_restart - Networking:
kind_network_inspect,kind_port_mappings,kind_ingress_setup - Diagnostics:
kind_cluster_status,kind_images_list,kind_provider_info
Enhanced Agent Skills - 26 Skills
All 26 Kubernetes skills updated to follow agenstskills.com specification:
- Enhanced YAML frontmatter (license, author, version, tools, category)
- "When to Apply" activation trigger sections
- Priority rules tables (CRITICAL/HIGH/MEDIUM/LOW)
- Quick reference tables for common operations
New Reference Documents:
k8s-troubleshoot/references/DECISION-TREE.md,COMMON-ERRORS.mdk8s-deploy/references/STRATEGIES.mdk8s-helm/references/CHART-STRUCTURE.mdk8s-kind/references/CONFIGS.mdk8s-vind/references/WORKFLOWS.md
New Example Manifests:
k8s-deploy/examples/canary-rollout.yaml,blue-green.yaml,hpa-deployment.yamlk8s-autoscaling/examples/hpa-cpu.yaml,keda-scaledobject.yaml
Tool Counts
- Total Tools: 270+ (was 235+)
- vind tools: 14 (new)
- kind tools: 32 (expanded from 15)
- Agent Skills: 26
Installation
# pip
pip install kubectl-mcp-server==1.21.0
# npm
npx kubectl-mcp-server@1.21.0
# Docker
docker pull rohitghumare64/kubectl-mcp-server:1.21.0Full Changelog
v1.19.3
What's Changed
- Added GitHub Container Registry (ghcr.io) publishing
- Docker images now available on both Docker Hub and GitHub Packages
Docker Images
# Docker Hub
docker pull rohitghumare64/kubectl-mcp-server:1.19.3
# GitHub Container Registry
docker pull ghcr.io/rohitg00/kubectl-mcp-server:1.19.3Install from GitHub Packages
# npm
npm install @rohitg00/kubectl-mcp-server --registry=https://npm.pkg.github.com
# Python (wheel from release)
pip install https://github.com/rohitg00/kubectl-mcp-server/releases/download/v1.19.3/kubectl_mcp_server-1.19.3-py3-none-any.whlv1.19.2
v1.19.1
What's Changed
- Upload wheel files to GitHub releases for direct pip install
- Updated documentation with GitHub release install instructions
Install from GitHub Release
pip install https://github.com/rohitg00/kubectl-mcp-server/releases/download/v1.19.1/kubectl_mcp_server-1.19.1-py3-none-any.whlv1.19.0 - Multi-Cluster Support, Kubeconfig Watch & Code Quality
What's New in v1.19.0
New Features
Multi-Cluster Operations (4 new tools)
multi_cluster_query: Query resources across multiple clusters simultaneouslymulti_cluster_health: Check health status of all clusters at oncemulti_cluster_pod_count: Get pod counts across all clusters with breakdown by phase
Kubeconfig Auto-Detection
enable_kubeconfig_watching: Auto-detect kubeconfig file changes (useful for cloud CLI credential updates)disable_kubeconfig_watching: Disable the watcherget_server_config_status: Check current server configuration including watch status
Stateless Mode
MCP_STATELESS_MODEenvironment variable: Run without caching API clients (ideal for serverless)set_stateless_mode/is_stateless_mode: Toggle stateless operation programmatically
Pod Management
run_pod: Run container images directly (kubectl run equivalent)
Code Quality Improvements
- Created shared
utils.pymodule, removing ~474 lines of duplicate code - Removed 31 redundant comments from tool files
- Added input validation for
check_intervalparameter - Simplified module docstrings
- All 47 tests passing
Files Changed
- 20 files modified
- New:
kubectl_mcp_tool/tools/utils.py
Installation
# PyPI
pip install kubectl-mcp-server==1.19.0
# npm
npm install kubectl-mcp-server@1.19.0Full Changelog: v1.18.0...v1.19.0
v1.18.0 - Agent Skills Library & Enhanced Provider
What's New
Agent Skills Library (24 Skills)
Added comprehensive Kubernetes skills for AI coding agents following the Agent Skills specification.
Categories:
| Category | Skills |
|---|---|
| Core Resources | k8s-core, k8s-networking, k8s-storage |
| Workloads | k8s-deploy, k8s-operations, k8s-helm |
| Observability | k8s-diagnostics, k8s-troubleshoot, k8s-incident |
| Security | k8s-security, k8s-policy, k8s-certs |
| GitOps | k8s-gitops, k8s-rollouts |
| Scaling | k8s-autoscaling, k8s-cost, k8s-backup |
| Multi-Cluster | k8s-multicluster, k8s-capi, k8s-kubevirt |
| Networking | k8s-service-mesh, k8s-cilium |
| Tools | k8s-browser, k8s-cli |
Installation:
# Copy all skills to Claude
cp -r kubernetes-skills/claude/* ~/.claude/skills/
# Or convert to other agents with SkillKit
npm install -g skillkit
skillkit translate kubernetes-skills/claude --to cursor --output .cursor/rules/Enhanced Provider Module
New providers.py module for better multi-cluster management:
- Singleton Pattern:
KubernetesProvider.get_instance()for shared provider - API Client Caching: Cached clients per context for better performance
- Context Validation:
UnknownContextErrorwith available contexts - Environment Variables:
MCP_K8S_PROVIDER: kubeconfig, in-cluster, or singleMCP_K8S_CONTEXT: Default context for single providerMCP_K8S_QPS: API rate limit (default: 100)MCP_K8S_BURST: API burst limit (default: 200)MCP_K8S_TIMEOUT: Request timeout in seconds (default: 30)
Full Changelog
- 24 new Agent Skills covering all 224+ tools
- New
providers.pymodule with enhanced provider management - Integrated provider into
k8s_config.pywith fallback support - Updated documentation with skills installation guide
Full Changelog: v1.17.0...v1.18.0
v1.17.0 - MCP Server Enterprise Integration
v1.17.0 - MCP Server Enterprise Integration
This release integrates enterprise-readiness modules directly into the MCP server, building on the PRD implementation from previous releases.
MCP Server Integration
HTTP Endpoints Added:
/stats- Real-time server statistics and tool call metrics/metrics- Prometheus-compatible metrics (when available)/safety- Safety mode status and configuration
CLI Parameters:
--config <file>- Load configuration from TOML file--read-only- Enable read-only safety mode--disable-destructive- Disable destructive operations only
Configuration Features:
- TOML configuration file support
- SIGHUP signal handler for runtime config reload
- CLI flags take precedence over config file settings
- Custom prompts loading from config
Safety Modes
- Normal: All operations allowed
- Read-Only: Only read operations (get, list, describe)
- Disable-Destructive: Block destructive operations (delete, drain, cordon)
Observability
- StatsCollector for tool call metrics
- Prometheus metrics integration (optional)
- OpenTelemetry tracing support (optional)
Example Usage
# Start with config file
kubectl-mcp-server serve --config /etc/kubectl-mcp/config.toml
# Start in read-only mode
kubectl-mcp-server serve --read-only
# Disable destructive operations only
kubectl-mcp-server serve --disable-destructiveInstallation
- pip:
pip install kubectl-mcp-server==1.17.0 - npm:
npx kubectl-mcp-server@1.17.0 - Docker:
docker pull rohitghumare64/kubectl-mcp-server:1.17.0