
K8s MCP Server (Go)
io.github.kanegPublished by GitHub account kanegv0.4.6Updated Oct 24, 2026
Safe Kubernetes access for AI agents via MCP. Read-only by default, with explicit permission modes.
Overview
A local Kubernetes MCP server that lets an AI assistant inspect clusters read-only by default, with optional readwrite or dangerous permission modes.
- What you can do
- Inspect pods, deployments, StatefulSets, services, ConfigMaps, Secrets, PVCs, Ingress, Jobs, nodes and namespaces, with details and logs
- Read events, cluster overview, and live node and pod CPU/memory usage
- Resolve a workload name to matching resources and suggested next tools
- In readwrite mode: scale, restart, patch or update images on deployments and StatefulSets, create namespaces, check rollout status
- In dangerous mode: delete pods, deployments, StatefulSets, DaemonSets, namespaces or other resources, and apply arbitrary YAML
- When to use it
- Useful when you want an assistant to help diagnose Kubernetes problems — unhealthy pods, memory hogs, warning events, failed rollouts — without handing it unrestricted kubectl. Choose readwrite only for controlled operational actions, and dangerous only when full cluster control is truly intended.
- Requirements
- Runs as a local process on the user's machine (desktop only), installed from a platform-specific MCPB bundle or a native binary; no Docker or Go needed. Needs access to a Kubernetes cluster via a kubeconfig file, the KUBECONFIG environment variable, or in-cluster ServiceAccount credentials. The permission mode is chosen at startup.
Installation
In SourceWeft
- Open K8s MCP Server (Go) in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
k8s-mcp-go
Safe, read-only-by-default Kubernetes access for AI agents.
A Kubernetes MCP server that lets AI assistants inspect your cluster safely — without giving them unrestricted kubectl.
[GitHub release] [License] [Go] [MCP]
What makes it different
- Read-only by default: useful for diagnosis without giving AI permission to mutate the cluster.
- Explicit permission modes: choose
readonly,readwrite, ordangerousbefore the assistant starts. - No Docker required: install via MCPB bundles or a single native binary.
- Kubernetes-native visibility: inspect pods, deployments, services, logs, events, nodes, and live CPU/memory usage.
- Registry-ready distribution: published as
io.github.kaneg/k8s-mcp-gofor MCP Registry consumers and packaged clients.
Distribution
- MCP Registry: published as
io.github.kaneg/k8s-mcp-go. - PulseMCP: indexed from the MCP ecosystem with the official
server.json. - Claude Code Marketplaces: listed with MCPB installation metadata.
Why
Most AI agents can use Kubernetes tools. The real problem is how to stop them from changing the wrong thing.
Giving an AI raw kubectl access is risky. Even a capable model can:
- delete the wrong resource
- restart the wrong workload
- apply a dangerous change
- turn a debugging session into a production incident
k8s-mcp-go gives AI agents a guardrailed interface to Kubernetes instead of unrestricted shell access.
It is built for the real-world question:
How can I let AI help with Kubernetes, without letting it break my cluster?
Permission Modes
You choose the boundary up front:
readonly (default)
For diagnosis, inspection, and safe exploration.
AI can do things like:
- list pods, deployments, services, nodes, and namespaces
- read logs and events
- inspect cluster state
- check resource usage
It cannot modify workloads or delete resources.
readwrite
For controlled operational workflows.
AI can do things like:
- scale deployments
- restart deployments
- restart statefulsets
- update images
- patch deployments
- create namespaces
It still cannot perform the most destructive operations.
dangerous
Full access.
Use this only when you explicitly want AI to be able to:
- delete resources
- delete namespaces
- apply arbitrary YAML
If you are unsure, use readonly.
Quick Start
Option 1: MCPB Install (Recommended)
Download the .mcpb bundle for your platform from Releases. MCPB-compatible clients (Claude Desktop, Cursor, etc.) can install it directly — no Docker, no Go, no manual setup.
Option 2: Manual Binary Install
Grab the binary archive from Releases and extract it:
Then add it to your MCP client.
Claude Desktop (claude_desktop_config.json):
Cursor (.cursor/mcp.json):
Restart your client and start asking questions about your cluster.
Example prompts
Once installed, ask your AI assistant things like:
- "Show me unhealthy pods in all namespaces."
- "Which pods are using the most memory?"
- "Summarize recent warning events."
- "Inspect this deployment and explain why it is not ready."
- "Check rollout status for this deployment."
In readonly mode, the assistant can investigate but cannot change the cluster.
Why not just use kubectl?
Because the problem is not whether AI can talk to Kubernetes. The problem is whether it can do so safely.
kubectl is powerful, but it does not give you a product-level permission mode for AI behavior.
With k8s-mcp-go, you decide whether the assistant can:
- inspect only
- perform limited operational actions
- or get full control
The permission boundary is the product.
Available Tools (35 total)
Tools are grouped by permission level.
Names start with an action verb such as get, list, or delete; top_nodes
and top_pods retain Kubernetes' established kubectl top terminology.
Readonly (24)
Readwrite (7)
Dangerous (7)
Prefer the dedicated delete tools above when one exists. Use delete_resource
as the fallback for other kinds. It resolves namespaced versus cluster-scoped
resources through Kubernetes discovery.
Kubernetes Configuration
Configuration is selected in this order:
- The file specified by
KUBECONFIG, when set. - The Pod's in-cluster ServiceAccount configuration.
~/.kube/configwhen running outside a cluster.
An explicit KUBECONFIG is authoritative. If it cannot be loaded, the server
returns an error instead of silently switching to the Pod's ServiceAccount.
In-cluster configuration uses Kubernetes' mounted token file so projected
ServiceAccount token rotation continues to work without copying tokens into a
kubeconfig.
Environment Variables
Build from Source
License
MIT
Source: README.md at commit 889ed38
Tools
0Version history
1- v0.4.6LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts

