k8s-mcp
*This server provides a comprehensive interface for managing and monitoring Kubernetes and OpenShift clusters across various cloud providers.
Resource Management: List and inspect core cluster components including namespaces, pods, deployments, services, nodes, and events.
Deployment Control: Apply YAML manifests, scale deployments, and execute deployment rollouts or rollbacks (confirmation-gated).
Diagnostics: Access read-only tools to check pod health, view container logs, and examine cluster status.
Cluster Connectivity: Manage sessions and authentication using Kubeconfig files or in-cluster service accounts.
Safety Controls: Restrict dangerous operations (like deleting a pod or changing deployments) requiring explicit user confirmation.
Provides tools for interacting with Kubernetes clusters, including listing namespaces, pods, deployments, services, and nodes, reading pod logs and events, scaling and restarting Deployments, deleting pods, and applying Deployment or ConfigMap manifests.
Click on "Deploy 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., "@k8s-mcp list 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.
k8s-cloud-deploy-mcp
MCP server owned by Pawan Gunjkar (pawangunjkar@gmail.com · GitHub). MIT licensed.
The server targets standard Kubernetes, Red Hat OpenShift, and cloud-managed clusters (AWS EKS, Azure AKS, GCP GKE). It loads a kubeconfig context or an in-cluster service account, detects OpenShift from apps.openshift.io/v1 or route.openshift.io, and reads CLOUD_PROVIDER, AWS_REGION, AZURE_SUBSCRIPTION_ID, GCP_PROJECT, and K8S_CONTEXT.
Read-only diagnostics run without a second confirmation. k8s_trigger_deployment_rollout and k8s_rollback_deployment return a plan until the caller sets confirm=true after the user approves it. Image updates must be sha256 digests. The tag latest is rejected. Secret values are never returned.
Project information
Item | Value |
Package |
|
Command |
|
Runtime | Python 3.10+, FastMCP, official Kubernetes client, httpx, pydantic |
Auth |
|
Providers |
|
Related MCP server: MCP Server Kubernetes
Architecture
flowchart TB
subgraph L1["Editor"]
IDE["Cursor, Claude Code, or VS Code"]
end
subgraph L2["MCP"]
SRV["k8s-cloud-deploy-mcp"]
HUB["K8sHub session"]
end
subgraph L3["Cluster"]
CFG["kubeconfig or in-cluster"]
API["Kubernetes or OpenShift API"]
end
IDE --> SRV --> HUB --> CFG --> APIkubectl and oc are optional. The Python client is authoritative. Those binaries run only for client version and a short rollout-status check, with shell=False and a fixed argument list.
Environment
Variable | Role |
| Kubeconfig file or path list |
| Context name |
| Default namespace |
|
|
| Required with |
| Required with |
| Required with |
Prepare the kubeconfig with aws eks update-kubeconfig, az aks get-credentials, gcloud container clusters get-credentials, or oc login before starting the server.
Tools
Read-only: k8s_get_cluster_overview, k8s_list_deployments_and_configs, k8s_get_pod_health_and_diagnostics, k8s_get_container_logs, k8s_manage_openshift_routes_and_services, k8s_check_rollout_status.
Confirmation-gated writes: k8s_trigger_deployment_rollout, k8s_rollback_deployment. Pod delete still requires confirm=true.
The Agensi skill playbook is agensi_build/k8s-cloud-deploy-mcp-pro/SKILL.md.
Cursor
{
"mcpServers": {
"k8s-cloud-deploy-mcp": {
"command": "uvx",
"args": ["--from", "C:/AI_Workspaces/Anti_Workspace/k8s-mcp", "k8s-cloud-deploy-mcp"],
"env": {
"KUBECONFIG": "C:/Users/you/.kube/config",
"K8S_CONTEXT": "dev",
"CLOUD_PROVIDER": "generic_k8s"
}
}
}
}Agensi package
python scripts/build_agensi_zip.pyThe scanner writes these files under dist/:
File | Contents |
| Agensi skill upload |
| Same skill as a tar archive |
| Python source distribution |
| Python wheel |
Upload the zip to agensi.io/dashboard/submit. Install the wheel with pip install dist/k8s_cloud_deploy_mcp-1.1.0-py3-none-any.whl.
Available Tools
15 toolsk8s_applyB
Create or patch a Deployment or ConfigMap from YAML.
Inputs: manifest_yaml (required), session_name. Returns: result
k8s_connectC
Load a kubeconfig context, or in-cluster config when no kubeconfig is available.
Inputs: context, namespace, kubeconfig, session_name. Returns: result
k8s_delete_podB
Delete one pod so the controller recreates it. confirm=true is required.
Inputs: pod (required), confirm, namespace, session_name. Returns: result
k8s_disconnectC
Drop a Kubernetes session.
Inputs: session_name. Returns: result
k8s_eventsA
Show the latest 30 namespaced events.
Inputs: namespace, session_name. Returns: result
k8s_list_deploymentsB
List deployments and ready replica counts.
Inputs: namespace, session_name. Returns: result
k8s_list_namespacesB
List namespace names.
Inputs: session_name. Returns: result
k8s_list_nodesB
List nodes and Ready condition.
Inputs: session_name. Returns: result
k8s_list_podsB
List pods with phase, ready count, and node.
Inputs: label, namespace, session_name. Returns: result
k8s_list_secret_namesB
List Secret names only. Values are not returned.
Inputs: namespace, session_name. Returns: result
k8s_list_servicesB
List services, type, and cluster IP.
Inputs: namespace, session_name. Returns: result
k8s_pod_logsB
Read the tail of a pod log.
Inputs: pod (required), tail, container, namespace, +1 more. Returns: result
k8s_restartC
Roll a Deployment by setting restartedAt.
Inputs: name (required), namespace, session_name. Returns: result
k8s_scaleC
Scale a Deployment.
Inputs: name (required), replicas (required), namespace, session_name. Returns: result
k8s_statusB
List Kubernetes sessions.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool targets a distinct resource and action: connect/disconnect manage sessions, list_* covers different Kubernetes resources, and pod_logs/scale/restart/delete_pod/apply are specific operations. There is no meaningful overlap—even multiple pod-related tools are clearly differentiated by their verbs.
All tools share the k8s_ prefix and generally follow a verb_noun pattern (list_namespaces, scale, delete_pod). Minor deviations exist: k8s_events and k8s_pod_logs omit the list/get verb, but the pattern is still predictable and readable.
At 15 tools, the server sits at the upper bound of the typical well-scoped range. The breadth is justified by covering connection management plus a variety of Kubernetes resources and operations, though it feels slightly heavy for a single-purpose MCP server.
The server covers listing many resources, logs, events, scaling, restarting, and applying YAML, but lacks get operations for individual resources, delete for most resources (only pods), and any write operations for services, secrets, or namespaces. It is read-heavy with limited lifecycle coverage beyond Deployments.
Maintenance
Related MCP Connectors
Deploy applications and manage governed Kubernetes preview spaces and capacity.
Deploy and run apps, workers, jobs, Postgres, and Valkey on Ownkube from your coding agent.
Secrets for developers and agents—secure context and workflows without exposing secret values.
Deploy and operate Kubernetes: clusters, stacks, apps, logs, metrics and security, with OAuth.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables managing Kubernetes clusters through natural language by providing tools to list resources, view logs, port-forward services, scale deployments, and execute kubectl operations via AI assistants.81MIT
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive Kubernetes cluster management through kubectl operations, Helm chart deployments, pod troubleshooting, and node management. Supports both read-only and full cluster administration capabilities with built-in safety features.11,892 npmMIT
- AlicenseCqualityDmaintenanceEnables connecting to a Kubernetes cluster to manage resources and troubleshoot workloads with kubectl and Helm operations, including logs, scaling, port forwarding, and non-destructive mode.2211,892 npmMIT
- AlicenseBqualityDmaintenanceEnables connection to a Kubernetes cluster to list and manage pods, services, deployments, and nodes, create/delete/describe pods, inspect namespaces, and retrieve logs for debugging.1111,892 npmMIT