Kubernetes MCP Server
@MayukhSobo
MCP server for all of your needs in k8s ☸️
Overview
What is Kubernetes MCP Server?
Kubernetes MCP Server is a backend system that provides an interactive and extensible interface for managing Kubernetes resources, retrieving and analyzing logs, and formatting logs for export through the Model Context Protocol (MCP). It enables developers to perform CRUD operations on core Kubernetes resources and search or export logs in multiple formats.
How to use Kubernetes MCP Server?
Clone the repository, build the binary with Go 1.24+ (requires a configured Kubernetes cluster and kubectl), then run ./k8s-mcp-server serve to start the MCP server. Use ./k8s-mcp-server --help to see available commands.
Key features of Kubernetes MCP Server
- CRUD operations on Pods, Services, Namespaces, Deployments, and more
- Log retrieval and pattern searching across pods
- Log export in Plaintext, JSON, CSV, and NDJSON formats
- Extensible architecture for future enhancements
- HTTP API endpoints for resource and log management
Use cases of Kubernetes MCP Server
- Interactively manage Kubernetes resources through an AI assistant or automation tool
- Quickly retrieve and search logs from specific pods for debugging
- Export cluster logs in structured formats for monitoring or analysis
FAQ from Kubernetes MCP Server
What are the system requirements?
Go 1.24+, a Kubernetes cluster, and kubectl configured with cluster access.
How do I install and run the server?
Clone the repository, run go build -o k8s-mcp-server, then start with ./k8s-mcp-server serve. See the README for detailed commands.
How can I interact with Kubernetes resources?
Use the HTTP API endpoints: POST /api/v1/resources/{resource_type} to create, GET to list or get details, and DELETE to remove resources.
What log export formats are supported?
Plaintext, JSON, CSV, and NDJSON.