Four read-only tools for the agent, commands for you.
The MAIT tools and commands offer two ways to work: serve is the agent tools with four tools that only read, and cli is the operator commands with commands that read and change.
What the agent can ask.
| Tool | Use it to | Parameters |
|---|---|---|
kubectl_get_pod_status | List the pods in a namespace, or look at one pod, and get each pod's status, how many of its containers are ready and how often it restarted. Asking for one pod returns a short summary only, without its full specification or events. | namespace (optional), pod_name (optional) |
kubectl_deploy_status | Check whether a deployment is healthy. You get its replica, ready, updated and available counts and a single status label. | deployment (required), namespace (optional) |
kubectl_cluster_health | Count the nodes that are ready and the nodes that are not, for a quick health check of the cluster. You can ask it to add the raw node metrics when the cluster has a metrics service. | include_metrics (optional) |
kubectl_resource_summary | Count the pods, services, deployments and namespaces for a quick sense of size. Without a namespace it counts only the default one, except that namespaces are always counted across the whole cluster. | namespace (optional), resource_types (optional: pods, services, deployments, namespaces) |
Why: read the cluster as fields, not as table text. Pass an explicit namespace: when it is left out the active context's namespace and then default are used, and the resource summary counts only default. A namespaces entry in resource_types always counts every namespace.
What you run, by task.
Run them as mcp-kubectl cli <verb>. The set covers the common kubectl tasks and is not full upstream parity. Every flag is in the CLI reference.
| Task | Commands | Use them to |
|---|---|---|
| Inspect | get, describe, logs, top, cluster-info, api-resources, api-versions, config, auth, diff, wait | Read resources, logs and metrics, discover the API, check a permission with auth can-i, preview a manifest and wait for a condition |
| Change | apply, create, patch, replace, edit, delete, set, label, annotate, scale, autoscale, rollout, expose, run | Create, modify, resize, restart or remove resources; check each command’s documented effects before execution |
| Node | cordon, uncordon, drain, taint, certificate | Stop or restore scheduling, evict pods, taint a node, approve or deny a certificate request |
| Debug | exec, attach, cp, port-forward | Run a program in a container, attach, copy files, open a temporary local forward |
| Local | version, completion, plugin, kustomize | Print client and server versions, generate a completion script, list or run kubectl-* plugins on PATH, or render local manifests for review |
Why: these operator commands are separate from this server's four MCP tools. Run changes through the intended operator workflow; other agent capabilities are outside this server's scope. The forward banner of port-forward proves only local binding: test the application through it.
Who can do what.
The server offers four tools and all of them read: it has no delete, apply, drain or exec tool. Starting the server does not expose the operator commands to an agent. The tools and the commands both use the cluster identity chosen at startup, so Kubernetes RBAC applies to every read and every change. A namespace argument narrows a query but does not switch identity, and a running server keeps its identity until you restart it.
Operator commands can change the cluster, and the changes persist there. For apply, use its documented --dry-run client|server path to review a manifest before the write. Use that documented apply preview for this workflow; do not use the creation commands run or autoscale as preview tools. Check the exact command in the CLI reference, then verify the result with a read.
What to expect when a call fails.
| Limit | Value |
|---|---|
| One tool execution | 60 seconds; startup, connection and response delivery take separate time |
| Shared call allowance | Burst 60, refill one call per second across clients |
| Collections/results | At most 256 entries, no incomplete page; oversized results refuse |
| Tools for the agent | Four, all read-only |
| Cluster | One identity per running server; there is no offline or simulated mode |
A Forbidden answer means your identity lacks the permission, not that the answer is empty. A name that does not exist comes back as a tool error that says NotFound. See Troubleshooting.