Cluster Agent
wipA Model Context Protocol (MCP) server implementation for Kubernetes cluster administration. Enables AI-driven cluster management by exposing kubectl operations as tools that an LLM agent can call.
How It Works
The system has two components:
MCP Server (kubectl_mcp.py)
Exposes Kubernetes operations as MCP tools:
- kubectl_get_api_resources — Discover available resource types
- kubectl_get_resource — Query cluster resources
- kubectl_describe_resource — Get detailed resource descriptions
Agent Client (client.py)
Connects to the MCP server and orchestrates tool calls with a local LLM through Ollama. The client handles tool discovery, OpenAI-format conversion, and dynamic invocation based on LLM requests.
Example
Ask the agent natural language questions like "what pods are running in the default namespace?" and it will determine which kubectl tools to call, execute them, and synthesize the results.