kom
kom 是一个用于 Kubernetes 操作的工具,SDK级的kubectl、client-go的使用封装。并且支持作为管理k8s 的 MCP server。 它提供了一系列功能来管理 Kubernetes 资源,包括创建、更新、删除和获取资源,甚至使用SQL查询k8s资源。这个项目支持多种 Kubernetes 资源类型的操作,并能够处理自定义资源定义(CRD)。 通过使用 kom,你可以轻松地进行资源的增删改查和日志获取以及操作POD内文件等动作。
claude mcp add --transport stdio weibaohui-kom path/to/kom
How to use
kom is a Kubernetes Operations Manager (MCP server) that exposes a rich set of tools for multi-cluster Kubernetes management. It supports both stdio and SSE modes, enabling lightweight or streaming interactions with Kubernetes resources. With kom, you can perform create/read/update/delete operations on built-in resources and CRDs, manage multiple clusters via RegisterCluster, query resources with SQL-like syntax, retrieve Pod logs, and even perform file operations inside Pods. It also includes capabilities for multi-cluster MCP management, cross-namespace queries, resource event and rollout handling, and integration with MCP tooling through standard endpoints. When running in SSE mode, you can connect to the server’s /sse endpoint to stream updates and responses, which is useful for real-time dashboards and interactive clients. The server is designed to be embedded in MCP tooling and supports integration in workflows that require high-frequency or batch resource operations across clusters.
How to install
Prerequisites:
- Access to one or more Kubernetes clusters with a valid kubeconfig.
- Go programming environment (Go 1.18+ recommended) for building from source.
Installation steps:
-
Clone the repository: git clone https://github.com/weibaohui/kom.git cd kom
-
Build the executable:
From the repository root
go build main.go
This will produce a binary named 'kom' (or as configured in your environment)
-
Prepare the runtime environment:
- Ensure KUBECONFIG is set to your Kubernetes config path, or have in-cluster configuration ready.
- Optionally configure any required environment variables for authentication or cluster registration as per your deployment environment.
-
Run the server (stdio mode): ./kom
MCP Server access can be via the default port, typically http://IP:9096/sse for SSE mode or the stdio interface for direct calls.
-
Run the server (SSE mode):
If you need SSE streaming, ensure the server is started with SSE support and connect clients to /sse
./kom
Notes:
- The README indicates the server supports both stdio and SSE modes and can be integrated into MCP tooling via JSON configurations. Adjust the startup flags as needed for your environment.
- When integrating, you may provide the MCP client with the server endpoint (e.g., http://IP:9096/sse) depending on the mode you choose.
Additional notes
Tips and common considerations:
- KUBECONFIG: The server relies on your Kubernetes config to access clusters. Ensure KUBECONFIG points to valid kubeconfig files for the clusters you intend to manage.
- Multi-cluster support: Kom supports multiple clusters and can be registered with different IDs. Use RegisterInCluster or RegisterByPathWithID to add clusters.
- Cross-namespace operations: You can query and operate resources across namespaces, including CRDs, using the provided API methods.
- MCP integration: When wiring into MCP tooling, you can expose the server as an MCP endpoint (stdio or SSE). Example payloads show either a direct command/args entry or an SSE URL for integration.
- Logging and monitoring: Consider enabling Prometheus-style monitoring or logs if your deployment requires observability for resource operations and MCP interactions.
- Environment variables: Typical variables include KUBECONFIG and any cluster-specific auth/config vars required by your deployment. Customize as needed for security and access control.
Related MCP Servers
mcp-language
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
agentcontrolplane
ACP is the Agent Control Plane - a distributed agent scheduler optimized for simplicity, clarity, and control. It is designed for outer-loop agents that run without supervision, and make asynchronous tool calls like requesting human feedback on key operations. Full MCP support.
kodit
👩💻 MCP server to index external repositories
mcp-web-ui
MCP Web UI is a web-based user interface that serves as a Host within the Model Context Protocol (MCP) architecture. It provides a powerful and user-friendly interface for interacting with Large Language Models (LLMs) while managing context aggregation and coordination between clients and servers.
github-brain
An experimental GitHub MCP server with local database.
mcp-auth-proxy
MCP Auth Proxy is a secure OAuth 2.1 authentication proxy for Model Context Protocol (MCP) servers