K8s MCP Server

Communauté Cloud et DevOps

Kubernetes cluster operations: inspect pods, deployments, services and logs.

Installation

Les étapes d'installation sont dans la documentation ci-dessous. Documentation

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. k8s-mcp-server
  2. What is this?
  3. Available Tools
  4. Quick Start
  5. Security Model
  6. License

k8s-mcp-server

Production-ready Kubernetes diagnostics and cluster observability MCP server for AI agents.


What is this?

k8s-mcp-server is a Model Context Protocol (MCP) server providing automated, read-only diagnostic tools for inspecting Kubernetes clusters. It allows AI agents to troubleshoot pod crashes, inspect ingress routes, and analyze cluster-wide warning events safely.


Available Tools

ToolCategoryDescription
get_cluster_nodesInfrastructureLists nodes, readiness states, roles, and kubelet versions.
get_pod_diagnosticsWorkloadsDetects abnormal pod phases, restart loops, and CrashLoopBackOffs.
get_pod_logsObservabilityRetrieves container stdout/stderr logs with tail limits and crash inspection.
list_warning_eventsDiagnosticsAggregates FailedScheduling, FailedMount, and BackOff warning events.
list_ingressesNetworkingAudits HTTP routing rules, host headers, and TLS certificates.

Quick Start

Prerequisites
  • Python 3.11+
  • Active Kubernetes cluster access (~/.kube/config or in-cluster ServiceAccount)
  • Read-only RBAC privileges (get, list on core and networking API groups)
Run Locally
git clone https://github.com/akkireddy-challa/k8s-mcp-server.git
cd k8s-mcp-server
pip install -r requirements.txt
python server.py
Claude Desktop Configuration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "kubernetes": {
      "command": "python",
      "args": ["/path/to/k8s-mcp-server/server.py"],
      "env": {
        "KUBECONFIG": "/Users/<username>/.kube/config"
      }
    }
  }
}

Security Model

  • Strictly Read-Only: Enforces GET and LIST operations only.
  • Zero-Secret Exposure: Secrets and config maps are never inspected or surfaced to LLM context.
  • Flexible Auth: Supports standard ~/.kube/config context or in-cluster pod ServiceAccounts.

License

MIT License. See LICENSE for details.


Built by Akkireddy Challa — Platform Engineer at Telia, Stockholm.

Questions fréquentes

Qu'est-ce que K8s MCP Server ?

Kubernetes cluster operations: inspect pods, deployments, services and logs.

Comment installer K8s MCP Server ?

Suivez les étapes d'installation de sa documentation, affichée sur cette page et dans son dépôt.

K8s MCP Server est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient K8s MCP Server ?

Il est publié par akkireddy-challa. AI.tn le référence sans le maintenir ni le recommander.

Issu des listes communautaires awesome-mcp-servers et du dépôt GitHub du projet. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.