mcp-k8s-go
Author: strowk
Description: Golang-based Model-Context-Protocol (MCP) server that exposes Kubernetes clusters as a set of chat-accessible resources and tools (list/get/create/modify resources, fetch logs, exec, etc.).
Stars: 330
Forks: 41
License: MIT License
Category: Open Source
Overview
Installation
git clone https://github.com/strowk/mcp-k8s-go.git
cd mcp-k8s-go
go build -o mcp-k8s ./cmd/server go install github.com/strowk/mcp-k8s-go/cmd/server@latest npm install -g @strowk/mcp-k8s docker pull ghcr.io/strowk/mcp-k8s-go:latest
docker run -p 8080:8080 -v $HOME/.kube:/root/.kube ghcr.io/strowk/mcp-k8s-go:latest MCP_PORT=8080 ./mcp-k8sList Kubernetes contexts
Return the list of kubeconfig contexts available to the server
List Kubernetes namespaces
Return the namespaces present in the selected Kubernetes context
List, get, create and modify any Kubernetes resources
Full CRUD operations for arbitrary Kubernetes resources, including custom mappings for pods, services, deployments, etc.
List Kubernetes nodes
Return the nodes in the current Kubernetes cluster
List Kubernetes pods
Return pod objects within the chosen namespace
Get Kubernetes events
Retrieve event objects from the Kubernetes API
Get Kubernetes pod logs
Fetch log output for a specified pod/container
Run command in Kubernetes pod
Execute an arbitrary command inside a running pod