kubernetes-readonly-mcp

v0.2.1
kubernetes-readonly-mcp Checked 2 hours ago Published 5 months ago

A read-only Kubernetes MCP server for safely interacting with Kubernetes clusters

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

list_pods List Pods

List all pods in a namespace or across all namespaces

ParameterTypeDescription
namespaceThe Kubernetes namespace to list pods from. If not provided, pods from all namespaces will be listed.

list_deployments List Deployments

List all deployments in a specified namespace

ParameterTypeDescription
namespaceThe Kubernetes namespace to list deployments from. If not provided, deployments from all namespaces will be listed.

get_pod_logs Get Pod Logs

Get logs from a pod in a specified namespace

ParameterTypeDescription
namespace *stringThe Kubernetes namespace where the pod is located.
pod_name *stringThe name of the pod to get logs from.
containerThe container name within the pod. If not specified and the pod has multiple containers, logs from the first container will be returned.
previousbooleanIf true, return logs from a previous instantiation of the container. Default is False.
tail_linesNumber of lines to show from the end of the logs. If not specified, all logs will be returned.

list_services List Services

List all services in a namespace or across all namespaces

ParameterTypeDescription
namespaceThe Kubernetes namespace to list services from. If not provided, services from all namespaces will be listed.

list_namespaces List Namespaces

List all namespaces in the cluster

get_events Get Events

Get Kubernetes events from the cluster for a specific namespace or all namespaces

ParameterTypeDescription
field_selectorSelector to restrict the list of returned events by field. For example 'involvedObject.name=my-pod'.
namespaceThe Kubernetes namespace to get events from. If not provided, events from all namespaces will be returned.

get_logs Get Logs

Get logs from pods, deployments, jobs, or resources matching a label selector

ParameterTypeDescription
resource_type *stringType of resource to get logs from ('pod', 'deployment', 'job', etc.)
containerThe container name within the pod. If not specified and the pod has multiple containers, logs from the first container will be returned.
label_selectorLabel selector to filter resources (e.g. 'app=nginx'). Required if name is not provided.
nameThe name of the specific resource to get logs from.
namespaceThe Kubernetes namespace. If not provided and name is specified, uses the 'default' namespace. If neither name nor namespace is provided, searches across al…
since_secondsReturn logs newer than a relative duration in seconds.
tailNumber of lines to show from the end of the logs.
timestampsbooleanInclude timestamps at the beginning of each line. Default is False.

list_nodes List Nodes

List all nodes in the cluster

list_resource List Resource

List resources of any kind (including CRDs) via the dynamic client. GET/LIST only; never mutates.

ParameterTypeDescription
kind *stringResource kind, e.g. 'Pod', 'Ingress', 'MyCustomResource'.
api_versionstringGroup/version, e.g. 'v1' (default) or 'networking.k8s.io/v1', 'apps/v1'.
field_selectorField selector, e.g. 'metadata.name=foo'.
label_selectorLabel selector, e.g. 'app=nginx'.
namespaceNamespace to scope to. If omitted, lists across all namespaces (or cluster-scoped).

get_resource Get Resource

Get a single resource of any kind (including CRDs) by name via the dynamic client. GET only; never mutates.

ParameterTypeDescription
kind *stringResource kind, e.g. 'Pod', 'ConfigMap', 'MyCustomResource'.
name *stringThe resource name.
api_versionstringGroup/version, e.g. 'v1' (default) or 'apps/v1'.
namespaceNamespace for namespaced resources.

list_api_resources List API Resources

Discover which resource kinds (including CRDs) the cluster exposes and can be listed. Read-only discovery.