A Kubernetes MCP (Model Control Protocol) server that enables interaction with Kubernetes clusters through MCP tools.
A Kubernetes MCP (Model Control Protocol) server that enables interaction with Kubernetes clusters through MCP tools.
Interaction through cursor
An stdio-based MCP server that connects to Kubernetes clusters and provides the following capabilities:
server
package to create an stdio-based MCP serverget_api_resources
: Get all supported API resource types in the clusterget_resource
: Get detailed information about a specific resourcelist_resources
: List all instances of a resource typecreate_resource
: Create new resources (can be disabled)update_resource
: Update existing resources (can be disabled)delete_resource
: Delete resources (can be disabled)You can directly download the binary for your platform from the releases page and use it immediately.
git clone https://github.com/silenceper/mcp-k8s.git
cd mcp-k8s
go build -o bin/mcp-k8s cmd/server/main.go
Default mode (read-only operations):
./bin/mcp-k8s --kubeconfig=/path/to/kubeconfig
Enable write operations:
./bin/mcp-k8s --kubeconfig=/path/to/kubeconfig --enable-create --enable-update --enable-delete
--kubeconfig
: Path to Kubernetes configuration file (uses default config if not specified)--enable-create
: Enable resource creation operations (default: false)--enable-update
: Enable resource update operations (default: false)--enable-delete
: Enable resource deletion operations (default: false)mcp-k8s is an stdio-based MCP server that can be integrated with any MCP-compatible LLM client. Refer to your MCP client's documentation for integration instructions.