Connections & Capabilities
Connects To
Capabilities
Quickstart
Config
{
"mcp.mcpServers": {
"k8s-mcp-server": {
"command": "k8s-mcp-server",
"args": ["--mode", "stdio"],
"env": {
"KUBECONFIG": "${env:HOME}/.kube/config"
}
}
}
}Exposed MCP Tools (10)
getAPIResourcesRetrieves all available API resources in the Kubernetes cluster.
Read-only operation with no side effects.
listResourcesLists resources of a specified type, with optional filtering by namespace and labels.
Read-only operation; only lists existing resources.
getResourceRetrieves detailed information about a specific Kubernetes resource.
Read-only operation; retrieves existing resource data.
describeResourceProvides a comprehensive description of a Kubernetes resource.
Read-only operation; provides information about a resource.
getPodsLogsRetrieves logs from a specified pod, optionally from a specific container.
Read-only operation; retrieves log data.
getNodeMetricsRetrieves resource usage metrics for a specific node.
Read-only operation; retrieves metrics data.
getPodMetricsRetrieves CPU and memory metrics for a specific pod.
Read-only operation; retrieves metrics data.
getEventsLists events within a namespace or related to a specific resource.
Read-only operation; lists existing events.
createResourceCreates or updates Kubernetes resources from a YAML or JSON manifest.
Can modify cluster state; requires careful validation of input.
deleteResourceDeletes a resource in the Kubernetes cluster based on the provided namespace and kind.
Destructive operation; can lead to data loss or service disruption.
Safety Assessment
The server's safety depends heavily on its configuration. Read-only mode and proper RBAC significantly reduce risk. However, the ability to create, update, and delete resources, combined with potential misconfigurations, introduces moderate risk.
- Supports read-only mode to prevent accidental modifications.
- Can be configured with RBAC when deployed within a Kubernetes cluster.
- Authentication methods prioritize secure options like service accounts and kubeconfig data.
- Runs as a non-root user in Docker containers.
- Offers resource creation, update, and deletion capabilities.
- Improperly configured RBAC can lead to privilege escalation.
- Kubeconfig or token exposure could grant unauthorized cluster access.
- Insecure TLS verification can be enabled via environment variable.
