kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
claude mcp add --transport stdio blankcut-kubernetes-mcp-server docker run -i blankcut/kubernetes-mcp-server \ --env NAMESPACE="The Kubernetes namespace to target (default: all namespaces)" \ --env MCP_LOG_LEVEL="info"
How to use
This MCP server exposes the Kubernetes resources through the MCP (Model Context Protocol) interface, allowing clients to synchronize cluster state using a stable API surface. Once running, clients can connect to the MCP endpoint exposed by the Docker container and begin watching for resource changes (such as Pods, Deployments, Services, and Custom Resources) in the specified Kubernetes namespace. The server translates Kubernetes API state into MCP models so that clients can receive incremental updates and perform read operations efficiently. Typical workflows include initial full-sync, streaming updates, and on-demand queries for resource metadata and status. The server is designed to operate in cluster or out-of-cluster environments and aims to minimize the latency between Kubernetes events and MCP clients.
How to install
Prerequisites:
- Docker installed and running on the host
- Access to the Kubernetes cluster you want to observe
Step-by-step:
-
Pull and run the MCP Kubernetes server container: docker run -i blankcut/kubernetes-mcp-server
-
If you need to target a specific namespace, set the NAMESPACE environment variable when running the container: docker run -e NAMESPACE=default -i blankcut/kubernetes-mcp-server
-
(Optional) Configure logging verbosity via MCP_LOG_LEVEL (e.g., debug, info, warn, error): docker run -e MCP_LOG_LEVEL=debug -i blankcut/kubernetes-mcp-server
-
Ensure network access from your MCP clients to the container’s MCP endpoint. The server will expose the MCP API surface for subscription and query operations. Refer to client documentation for the exact MCP methods supported by this server.
Additional notes
Tips and common issues:
- Ensure the Kubernetes cluster you intend to observe is accessible from the host running Docker.
- If running in a restricted environment, you may need to pass additional environment variables or mount service account credentials depending on your cluster configuration.
- The NAMESPACE env var controls which namespace is monitored; leaving it empty may monitor all namespaces depending on the container’s implementation.
- If you experience connection errors, verify that the container is running and that firewall rules allow traffic to the MCP port used by clients.
- This MCP server focuses on translating Kubernetes state to MCP models; it may not cover every Kubernetes resource out of the box. Check for supported resource types and any required CRD installations in your cluster.
- For production deployments, consider using a Kubernetes-native deployment approach or a more robust orchestration mechanism to manage the lifecycle of the MCP server container.
Related MCP Servers
gin-vue-admin
🚀Vite+Vue3+Gin拥有AI辅助的基础开发平台,企业级业务AI+开发解决方案,内置mcp辅助服务,内置skills管理,支持TS和JS混用。它集成了JWT鉴权、权限管理、动态路由、显隐可控组件、分页封装、多点登录拦截、资源权限、上传下载、代码生成器、表单生成器和可配置的导入导出等开发必备功能。
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go