kubernetes-readonly-mcp
v0.2.1A 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
| Parameter | Type | Description |
|---|---|---|
namespace | The 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
| Parameter | Type | Description |
|---|---|---|
namespace | The 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
| Parameter | Type | Description |
|---|---|---|
namespace * | string | The Kubernetes namespace where the pod is located. |
pod_name * | string | The name of the pod to get logs from. |
container | The container name within the pod. If not specified and the pod has multiple containers, logs from the first container will be returned. | |
previous | boolean | If true, return logs from a previous instantiation of the container. Default is False. |
tail_lines | Number 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
| Parameter | Type | Description |
|---|---|---|
namespace | The 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
| Parameter | Type | Description |
|---|---|---|
field_selector | Selector to restrict the list of returned events by field. For example 'involvedObject.name=my-pod'. | |
namespace | The 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
| Parameter | Type | Description |
|---|---|---|
resource_type * | string | Type of resource to get logs from ('pod', 'deployment', 'job', etc.) |
container | The container name within the pod. If not specified and the pod has multiple containers, logs from the first container will be returned. | |
label_selector | Label selector to filter resources (e.g. 'app=nginx'). Required if name is not provided. | |
name | The name of the specific resource to get logs from. | |
namespace | The Kubernetes namespace. If not provided and name is specified, uses the 'default' namespace. If neither name nor namespace is provided, searches across al… | |
since_seconds | Return logs newer than a relative duration in seconds. | |
tail | Number of lines to show from the end of the logs. | |
timestamps | boolean | Include 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.
| Parameter | Type | Description |
|---|---|---|
kind * | string | Resource kind, e.g. 'Pod', 'Ingress', 'MyCustomResource'. |
api_version | string | Group/version, e.g. 'v1' (default) or 'networking.k8s.io/v1', 'apps/v1'. |
field_selector | Field selector, e.g. 'metadata.name=foo'. | |
label_selector | Label selector, e.g. 'app=nginx'. | |
namespace | Namespace 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.
| Parameter | Type | Description |
|---|---|---|
kind * | string | Resource kind, e.g. 'Pod', 'ConfigMap', 'MyCustomResource'. |
name * | string | The resource name. |
api_version | string | Group/version, e.g. 'v1' (default) or 'apps/v1'. |
namespace | Namespace 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.