Examples are illustrative; names, counts, tool responses and agent wording vary. Check the actual result in your intended cluster.
Five steps from install to your first cluster question.
MCP Kubectl is an MCP tool: you point it at a cluster, check it, and then ask in plain language. It needs a cluster you can already reach, and no root access.
- $ export KUBECONFIG=/path/to/kubeconfigStep 1 of 5
Point it at a cluster
mcp-kubectlhas no configuration file of its own. It uses the file named byKUBECONFIG, or~/.kube/config, or in-cluster credentials when it runs inside a pod.What you getA cluster identity chosen once, which both the agent and you will use.
- Illustrative$ mcp-kubectl versionmcp-kubectl X.Y.ZStep 2 of 5
Check that it arrived
The MAIT image ships
mcp-kubectland updates it with the image. The check needs no cluster credentials.What you getThe program answers with its version.
- Illustrative$ mcp-kubectl cli get pods -n shopNAME READY STATUS RESTARTS AGEapi-7c9d8f5b6c-m4h2p 1/1 Running 0 2dweb-5d8f7c9b6d-x2k4q 2/2 Running 0 1dStep 3 of 5
Read the cluster yourself
Pass the namespace explicitly. This example is trimmed to a few rows.
A
Forbiddenanswer means your identity lacks permission, not that the namespace is empty.What you getProof that the identity reaches the cluster, from the operator commands.
{ "mcpServers": { "kubectl": { "command": "mcp-kubectl", "args": ["serve"], "env": { "KUBECONFIG": "/path/to/kubeconfig" } } } }Illustrative conversationYouIs the web deployment in shop healthy, and are the nodes ready?Tool callkubectl_deploy_status { "deployment": "web", "namespace": "shop" }What happensreplicas 1, ready_replicas 1, updated_replicas 1, available_replicas 1, status healthy.Tool callkubectl_cluster_health {}What happenstotal_nodes 1, ready_nodes 1, not_ready_nodes 0, status healthy.AgentThe web deployment has its one replica ready, and the one node is ready.Step 4 of 5Connect it to your agent and ask
Any client that accepts an
mcpServerslaunch entry uses this shape. SetKUBECONFIGin the entry rather than assuming the client inherits your terminal export, place it where your client keeps server configuration and restart the client.If you reach your tools through the registry instead, add
kubectlonce withmcp_registry_addand the tools carry thekubectl__prefix (registry guide). Then ask in plain language.What you getAn answer from the live cluster, as fields the agent reads directly.
- Illustrative conversationYouDelete the crashing pod.What happensThe tool list holds kubectl_get_pod_status, kubectl_deploy_status, kubectl_cluster_health and kubectl_resource_summary, and nothing that changes the cluster.Tool callkubectl_delete_pod { "name": "x" }What happensInvalid arguments: Tool not found: kubectl_delete_podAgentI cannot delete anything with this server. You can run the delete yourself with the cli commands.Step 5 of 5
See the boundary
The client lists exactly four tools, and all of them read. Asking the server for a delete tool fails.
What you getFour inspection tools from this server. Changes through
mcp-kubectl clior other agent capabilities remain subject to your permissions and task controls.
Cluster inspection through four read-only tools.
You confirmed the program, your cluster access and an agent answer from the same cluster identity. Pass an explicit namespace to every call: when you leave it out, pod and deployment tools use the configured namespace, which may itself be default; resource summary instead counts literal default. There is no retry in another namespace when a resource is not found.