MCP server connecting AI to Kubernetes
7.7K
Golang-based MCP server connecting to Kubernetes
MCP K8S Go
MCP K8S Go Sources ⚙ Model Context Protocol ⚙ Kubernetes
To use latest published version with Inspector you can run this:
npx @modelcontextprotocol/inspector docker run -i -v ~/.kube/config:/home/nonroot/.kube/config --rm mcpk8s/server:latest
Following chat with Claude Desktop demonstrates how it looks when selected particular context as a resource and then asked to check pod logs for errors in kube-system namespace:
{
"mcpServers": {
"mcp_k8s": {
"command": "docker",
"args": ["run", "-i", "-v", "~/.kube/config:/home/nonroot/.kube/config", "--rm", "mcpk8s/server:latest"]
}
}
}
The following environment variables are used by the MCP server:
KUBECONFIG: Path to your Kubernetes configuration file (optional, defaults to ~/.kube/config)The following command-line options are supported:
--allowed-contexts=<ctx1,ctx2,...>: Comma-separated list of allowed Kubernetes contexts that users can access. If not specified, all contexts are allowed.--help: Display help information--version: Display version informationContent type
Image
Digest
sha256:c683bbd89…
Size
12.8 MB
Last updated
11 months ago
docker pull mcpk8s/server