microk8s-mcp

v0.1.4
microk8s-mcp Checked 1 day ago Published 3 months ago

MicroK8s MCP server — manage a Kubernetes cluster from Claude Code, read-only by default

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

cluster_overview

Snapshot of cluster health: nodes, MicroK8s addons, namespaces, workloads that are not Running/Completed, and recent warning events. Start here when asked an open-ended question about the cluster.

list_resources

List Kubernetes resources of a given kind (pods, deployments, svc, ingress, pvc, nodes, crds, ...). Use `selector` for label selectors like 'app=web'. Prefer output='wide' unless you need full specs.

ParameterTypeDescription
kind *string
all_namespacesboolean
field_selectorstring
namespacestring
outputstring
selectorstring

get_resource

Fetch the full manifest of a single resource.

ParameterTypeDescription
kind *string
name *string
namespacestring
outputstring

describe_resource

`kubectl describe` a resource: status, conditions, and its recent events. Best first step when something is failing.

ParameterTypeDescription
kind *string
name *string
namespacestring

get_logs

Container logs for a pod. `since` accepts durations like '15m' or '2h'. Set previous=True to read the logs of a crashed previous container.

ParameterTypeDescription
namespace *string
pod *string
containerstring
previousboolean
sincestring
tail_linesinteger

get_events

Cluster events, newest last. Warnings only by default.

ParameterTypeDescription
all_namespacesboolean
namespacestring
only_warningsboolean

top

CPU/memory usage for nodes or pods. Requires the metrics-server addon.

ParameterTypeDescription
namespacestring
scopestring

api_resources

List every resource kind the cluster knows about, including CRDs. Use this when unsure what `kind` to pass to the other tools.

rollout_status

Current rollout state of a deployment, statefulset or daemonset.

ParameterTypeDescription
kind *string
name *string
namespace *string

microk8s_status

MicroK8s snap status: whether the cluster is running, HA state, and which addons are enabled or disabled.

apply_manifest

Apply a YAML manifest (supports multi-document YAML). Defaults to a server-side dry run -- call once with dry_run=True, show the user the diff, then call again with dry_run=False to commit.

ParameterTypeDescription
manifest_yaml *string
dry_runboolean
namespacestring

scale_workload

Scale a deployment, statefulset or replicaset to a replica count.

ParameterTypeDescription
kind *string
name *string
namespace *string
replicas *integer

rollout_restart

Trigger a rolling restart of a deployment, statefulset or daemonset.

ParameterTypeDescription
kind *string
name *string
namespace *string

delete_resource

Delete one named resource. Requires confirm=True. Bulk/selector deletes are deliberately not supported -- delete one object at a time.

ParameterTypeDescription
kind *string
name *string
namespace *string
confirmboolean

manage_addon

Enable or disable a MicroK8s addon (dns, ingress, storage, metrics-server, cert-manager, registry, ...). `arguments` is passed after a colon, e.g. addon='registry', arguments='size=40Gi'.

ParameterTypeDescription
action *string
addon *string
argumentsstring

node_maintenance

Cordon, uncordon or drain a node. Draining evicts workloads -- on a single-node MicroK8s install this takes the cluster's workloads down.

ParameterTypeDescription
action *string
node *string
confirmboolean