MKP is an MCP server that provides Model Context Protocol integration for Kubernetes clusters using a native Go implementation. It connects directly to the Kubernetes API machinery rather than relying on external command-line tools like kubectl or Helm, using an unstructured client that accommodates both standard Kubernetes resources and Custom Resource Definitions. Software engineers, platform teams, and DevOps practitioners use MKP to inspect, deploy, and troubleshoot cluster resources through conversational LLM clients. The server enables users to list namespaced and clustered resources, filter large metadata payloads through advanced annotation rules, fetch detailed subresources such as pod logs or status objects, apply updated manifests directly to the cluster, and execute diagnostic commands inside pod containers with configurable timeouts. In addition to universal resource handling, MKP includes built-in rate limiting to prevent excessive queries from overwhelming the Kubernetes API server.
Category: Cloud & Infrastructure
Tags: cluster-management, go, infrastructure, k8s, kubernetes
bash git clone https://github.com/StacklokLabs/mkp.git cd mkp 2. Install required dependencies and compile the server using Task: bash task install task build 3. Start the server using your local kubeconfig, optionally setting custom paths or port configurations: bash task run # Or specify an alternate kubeconfig or port: KUBECONFIG=/path/to/kubeconfig task run-with-kubeconfig MCP_PORT=9091 task run 4. For managed deployment via ToolHive or client configuration, refer to the project repository at https://github.com/StacklokLabs/mkp.Part of MCP Servers
MKP allows language models to interact with Kubernetes clusters via the Model Context Protocol. It exposes tools to list clustered and namespaced resources, apply new or updated manifests, inspect subresources like statuses or container logs, and execute commands directly within container instances.
MKP requires Go 1.24 or later, an active kubeconfig, and the Task runner. Clone the repository from GitHub, run task install to fetch dependencies, run task build to compile the binary, and execute task run to launch the MCP server.
No. MKP uses the native Go Kubernetes API machinery directly through an unstructured dynamic client. This approach communicates directly with the Kubernetes API server without relying on local CLI tools like kubectl, Helm, or external binaries.
Yes. Because MKP relies on the Kubernetes API Machinery unstructured client, it handles standard core resources and custom resource definitions dynamically without requiring predefined schemas or hardcoded Go structs for custom types.
MKP defaults pod logs to the last 100 lines or 32KB to avoid overloading LLM context windows. Additionally, the list_resources tool includes annotation filtering that can include, exclude, or strip metadata such as large GPU or last-applied configuration strings.