K8sGPT (MCP mode)
Kubernetes analyzer; `k8sgpt serve --mcp` exposes its cluster analysis over MCP.
Labels are provisional (from the project README/docs, checked Oct 27, 2026). Not yet tested in our sandbox.
Read-only switch
MCP.md lists 12 tools: cluster analysis and reads (resources, logs, events) plus add-filters, remove-filters and config, which change K8sGPT's own settings, not the cluster. get-resource can read Secrets. Claude Code: consider denying mcp__k8sgpt__get-resource and mcp__k8sgpt__config.
Preset
- Matched by name only. K8sGPT (MCP mode) is documented as read-only, but a fork or another server with the same name might not be. So Codex still prompts and Claude Code asks.
Claude Code
{
"mcpServers": {
"k8sgpt": {
"command": "k8sgpt",
"args": ["serve", "--mcp"]
}
}
}{
"permissions": {
"ask": ["mcp__k8sgpt"]
}
}ask makes Claude Code prompt before every tool from this server.
Codex
# Generated by redpresets.dev on 2026-11-03. Unverified preset. Also use a read-only credential. Not a security guarantee.
[mcp_servers.k8sgpt]
command = "k8sgpt"
args = ["serve", "--mcp"]
default_tools_approval_mode = "prompt"default_tools_approval_mode = "prompt" asks before every tool call.
Cursor
{
"mcpServers": {
"k8sgpt": {
"type": "stdio",
"command": "k8sgpt",
"args": ["serve", "--mcp"]
}
}
}Don't add write tools to mcpAllowlist in .cursor/permissions.json. Leave them on approval. Cursor's docs say the allowlist is not a security boundary.
Credential layer
Bind the kubeconfig/service account the agent uses to a read-only ClusterRole (e.g. the built-in view role). view excludes Secrets; do not grant get secrets to agents.
Gotchas
- K8sGPT can send cluster findings to an LLM backend. Check where data goes (egress).
Facts
- Vendor
- k8sgpt-ai (CNCF sandbox)
- Source
- k8sgpt-ai/k8sgpt
- License
- Apache-2.0
- GitHub stars
- 8.3k
- Latest release
- v0.4.41 (Oct 21, 2026)
- Last push
- Oct 27, 2026
- Status
- Active
- Last checked
- Oct 27, 2026
Sources
- README: serve --mcp · checked Oct 27, 2026
- MCP tool list · checked Oct 27, 2026
Spotted something wrong? Labels change when vendors change. Suggest a correction
Read-only alternatives in Kubernetes
MCP server for Argo CD applications: list, inspect, sync and manage apps.
MCP server shipped with the Flux Operator for GitOps reconciliation, debugging and diffs.
Python/npm kubectl MCP server with a large tool surface including Helm and diagnostics.