Provides MCP multi-cluster Kubernetes management and operations. It can be integrated as an SDK into your own project and includes nearly 50 built-in tools covering common DevOps and development scenarios. Supports both standard and CRD resources.
kom
is a powerful Go library designed to streamline Kubernetes operations, acting as a comprehensive SDK-level wrapper around kubectl
and client-go
. It empowers developers to effortlessly manage Kubernetes resources, including creation, updates, deletion, and retrieval, while seamlessly handling Custom Resource Definitions (CRDs). With kom
, you can easily perform CRUD operations, access logs, manipulate files within pods, and even leverage SQL queries to manage your Kubernetes resources.
kom
provides a rich set of functions for creating, updating, deleting, and retrieving both built-in and CRD Kubernetes resources.RegisterCluster
function.kom.Namespace("default","kube-system").List(&items)
.kom
's intuitive chained function calls simplify resource manipulation.kom
's CRD support.select * from pod where metadata.namespace='kube-system' or metadata.namespace='default' order by metadata.creationTimestamp desc
.k8m is a lightweight Kubernetes management tool built on kom
and amis. It's a single-file application that supports multiple platforms.
./k8m
and access it at http://127.0.0.1:3618.import ( "github.com/weibaohui/kom" "github.com/weibaohui/kom/callbacks" ) func main() { // Register callbacks (must be done first) callbacks.RegisterInit() // Register clusters defaultKubeConfig := os.Getenv("KUBECONFIG") if defaultKubeConfig == "" { defaultKubeConfig = filepath.Join(homedir.HomeDir(), ".kube", "config") } _, _ = kom.Clusters().RegisterInCluster() _, _ = kom.Clusters().RegisterByPathWithID(defaultKubeConfig, "default") kom.Clusters().Show() // Your application logic here }
Supports both stdio and SSE modes, along with multiple tools for querying, listing, deleting, describing resources, and reading pod logs.
// Start the MCP server with a single line of code mcp.RunMCPServer("kom mcp server", "0.0.1", 9096)
# Build from source go build main.go # Compile to 'kom'
After building, you can use it in either stdio or SSE mode. Kubernetes management defaults to using the KUBECONFIG
environment variable.
# Set the KUBECONFIG environment variable export KUBECONFIG=/Users/xxx/.kube/config
# Run ./kom # MCP Server access address http://IP:9096/sse
The compiled binary can be used in stdio mode. The http://IP:9096/sse
address can be used in SSE mode.
Supports both stdio and SSE integration, suitable for MCP tools like Cursor, Claude Desktop (stdio only), Windsurf, and others. You can also add it through the UI of these tools.
{ "mcpServers": { "kom": { "type": "sse", "url": "http://IP:9096/sse" } } }
{ "mcpServers": { "k8m": { "command": "path/to/kom", "args": [] } } }
| Category | Method | Description
๐ A gateway demo for MCP SSE Server.
๐ โ๏ธ A lightweight mcp server that tells you exactly what time is it.
#๏ธโฃ ๐ A C# SDK for building MCP servers on .NET 9 with NativeAOT compatibility โก ๐
โ Java SDK for building MCP servers using Quarkus.