Kubernetes MCP Server logo

Kubernetes MCP Server

by ductnn

A lightweight MCP server that provides natural language processing and API access to Kubernetes clusters. It combines both kubectl commands and the Kubernetes Python client.

View on GitHub

Last updated: N/A

What is Kubernetes MCP Server?

The Kubernetes MCP Server is a lightweight server that acts as a Management Control Plane (MCP) for Kubernetes clusters. It provides a natural language interface and API access for managing Kubernetes resources, leveraging both kubectl commands and the official Kubernetes Python client.

How to use Kubernetes MCP Server?

To use the server, first install the prerequisites (Python 3.11+, Kubernetes cluster access, kubectl, UV). Then, clone the repository, create a virtual environment, and install the dependencies. The server can be used via natural language queries or by directly calling the RESTful API endpoints for operations like creating, deleting, inspecting, and modifying Kubernetes resources. It can also be integrated with AI assistants like Claude Desktop.

Key features of Kubernetes MCP Server

  • Natural Language Interface

  • Full CRUD Operations

  • Dual Execution Mode (kubectl & Python client)

  • Namespace validation

  • Label filtering

  • Grace period control

  • Automatic command fallback

  • Resource management (CPU, memory)

  • Environment variable configuration

Use cases of Kubernetes MCP Server

  • Simplifying Kubernetes management with natural language queries.

  • Automating Kubernetes resource creation and management via API.

  • Integrating Kubernetes management into AI assistants and chatbots.

  • Providing a user-friendly interface for interacting with Kubernetes clusters.

  • Enabling developers to easily manage Kubernetes resources without needing deep kubectl knowledge.

FAQ from Kubernetes MCP Server

What is the purpose of this server?

It provides a natural language and API interface to manage Kubernetes clusters.

What are the prerequisites for installation?

Python 3.11+, Kubernetes cluster access, kubectl, and UV.

How do I use the natural language processing feature?

Send plain English queries to the server to list resources.

What API endpoints are available?

/api/pods, /api/deployments, /api/namespaces, /api/cluster, /api/nlp

Can I use this server with AI assistants?

Yes, it can be integrated with AI assistants like Claude Desktop.