# Kubernetes k8s mcp server

> Investigate, debug, and manage Kubernetes workloads using k8s-mcp-server tools.

Kubernetes k8s mcp server is a free AI agent skill on Agensi by Emil Langazov, in DevOps & Cloud. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Emil Langazov](https://www.agensi.io/creators/emil-langazov)
- Category: [DevOps & Cloud](https://www.agensi.io/skills/devops-cloud)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-20
- Security: scan passed (2026-10-20); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/kubernetes-k8s-mcp-server
- Tags: llm-ops, kubernetes, devops, mcp, k8s, sre

## About this skill

Kubernetes cluster management is often hindered by context-switching between tools and manual investigation of fragmented logs and events. This skill integrates directly with your agent to diagnose and resolve cluster issues using the `k8s-mcp-server`.

### What it does
- **Cluster Diagnostics**: Analyzes pods and nodes to find root causes for `CrashLoopBackOff`, `Pending`, or `OOMKilled` states.
- **Workload Management**: Handles scaling, patching, rolling back, and restarting deployments or statefulsets.
- **Network Troubleshooting**: Checks services, endpoints, ingress configurations, and DNS resolution.
- **Resource Monitoring**: Tracks node pressure, pod resource usage, and metrics-server data.
- **In-cluster Debugging**: Executes commands in containers, adds ephemeral debug containers, and manages port-forwards.
- **Server Orchestration**: Manages the installation and configuration of the MCP server, including namespace restrictions and permission flags.

### How it works
1. **Health Check**: Runs `cluster_health` to verify API reachability and node readiness before starting tasks.
2. **Investigation**: Uses `diagnose_pod` or `diagnose_node` to aggregate status, events, and log tails for rapid triage.
3. **Change Proposal**: Describes the impact of writes or destructive actions, performing a `dry_run` where supported.
4. **Execution & Verification**: Applies the fix and monitors `rollout_status` or pod phases to ensure the desired state is reached.

### Frameworks & tools
Uses the Model Context Protocol (MCP) to interface with any Kubernetes cluster via `kubectl` configuration. Works with Claude Code, Cursor, and other MCP-compatible environments.

### Why this beats prompting it yourself
Generic prompts often fail to handle namespace scoping or large result sets, leading to "context window exceeded" errors. This skill implements specific paging logic and diagnostic playbooks that prioritize the most relevant telemetry first.

### Use cases
- Debugging a 503 error by checking service endpoints and ingress status.
- Recovering a failing deployment by analyzing previous logs and triggering a rollback.
- Freeing up node resources by identifying high-usage pods and cordoning nodes.
- Setting up an MCP server with specific write permissions for a dev namespace.

### Known limitations
Operations are limited by the flags (`--allow-writes`, `--allow-debug`) set on the MCP server. Connectivity checks from a local server process may not reflect internal cluster DNS.

## Requires

- K8s MCP
- Go Kubernetes MCP

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Kubernetes k8s mcp server skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Which Kubernetes environments and cloud providers are supported?

This skill connects to any Kubernetes cluster reachable via your local kubeconfig, including EKS, GKE, AKS, and local environments like Minikube or Kind.

### Which AI agents or IDEs can I use with the k8s mcp ops skill?

It is compatible with any Model Context Protocol (MCP) host, such as Claude Code, Cursor, and IDE-based agents that support MCP server integration.

### How does the skill handle cluster security and write permissions?

The skill respects the RBAC permissions of your kubeconfig and is further governed by specific MCP flags, such as --allow-writes, which you can toggle to restrict the agent to read-only or full-write access.

### How does this skill perform better than simply asking an AI to 'debug my cluster'?

Unlike generic prompts, this skill uses structured diagnostic playbooks and paging logic to handle large log files and complex resource lists without exceeding your AI's context window.

### What exactly is included in the purchase of this skill?

You will receive the k8s-mcp-server package, detailed configuration instructions for various MCP hosts, and a set of optimized diagnostic tools for immediate deployment.

### Do I need to manually install the MCP server, or does the skill handle it?

The skill includes built-in server orchestration tools that guide you through setting up the necessary MCP server flags and namespace restrictions during the initial setup phase.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
