MKP

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

Visit MKP

How to install and configure MKP

  1. Clone the repository and navigate into the project folder: 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.

What you can do with MKP

  • Fetching and inspecting container logs from specific pods with tailored time ranges, byte caps, or line limits. - Listing and filtering cluster resources with exclusion rules to eliminate oversized metadata annotations like GPU drivers. - Applying declarative YAML or JSON manifests to create and update namespaced deployments, services, and CRDs. - Running remote diagnostic commands inside active pod containers with defined execution timeouts to debug incidents.

Key facts

  • https://github.com/StacklokLabs/mkp
  • Cloud & Infrastructure, DevOps, CI/CD & Version Control
  • cluster-management, go, infrastructure, k8s, kubernetes

Part of MCP Servers

Related MCP servers

  • MCP KQL Server — MCP KQL Server is an MCP server that connects AI assistants to Azure Data Explorer clusters using Azure CLI authentication.…
  • MCP Media Player — MCP Media Player is an MCP server that exposes playback controls for Home Assistant media players to AI agents. It…
  • MCP Kubernetes Server — MCP Kubernetes Server is an MCP server that provides tools for managing and inspecting Kubernetes clusters directly through Large Language…
  • MCP Nomad Go — MCP Nomad Go is an MCP server that connects AI assistants to HashiCorp Nomad clusters. Written in Go, it allows…
  • MCP Minecraft Remote — MCP Minecraft Remote is an MCP server that enables AI assistants to remotely connect to and control a player character…
  • MCP My Mac — MCP My Mac is an MCP server that exposes macOS system hardware specifications, system configurations, and environment details to AI…

What can MKP do?

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.

How do I install and run MKP?

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.

Does MKP require kubectl or Helm to interact with Kubernetes?

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.

Can MKP manage Custom Resource Definitions?

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.

How does MKP handle large log outputs and annotations?

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.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories