- Home
- MCP servers
- Kubernetes
Kubernetes
- go
1.2k
GitHub Stars
go
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"containers-kubernetes-mcp-server": {
"command": "npx",
"args": [
"-y",
"kubernetes-mcp-server@latest"
],
"env": {
"MCP_CONFIG": "<MCP_CONFIG>",
"NODE_OPTIONS": "<NODE_OPTIONS>"
}
}
}
}You deploy and run a native Kubernetes MCP server to interact directly with the Kubernetes API. It provides a flexible set of MCP endpoints for Kubernetes and OpenShift resources, with optional observability and multi-cluster support, all implemented as a standalone Go binary or accessible via common package runners.
How to use
You use an MCP client to connect to the Kubernetes MCP server and perform operations across Kubernetes and OpenShift resources. Practical capabilities include listing resources, viewing and managing pods and events, running commands inside pods, managing Helm releases, and observing cluster metrics and traces. You can operate in read-only or restricted modes, enable or disable multi-cluster access, and turn on observability features such as distributed tracing.
How to install
Prerequisites: you need a machine with access to a Kubernetes cluster. You can run the MCP server from a local or remote setup using common tooling shown here.
Step-by-step start options
# Run with npx (if you have Node.js installed)
npx kubernetes-mcp-server@latest
# Run with uvx (if you have uv and Python installed)
uvx kubernetes-mcp-server@latest
# Run the latest release binary directly
./kubernetes-mcp-server
Configuration and operational notes
Configure options via command-line arguments or a TOML configuration file. You can control the server port, logging level, kubeconfig source, read-only and destructive operation modes, multi-cluster support, and the set of toolsets enabled to tailor the available functionality.
Observability and telemetry
Optional distributed tracing and metrics can be enabled to monitor the MCP server’s interactions with the Kubernetes API. Real-time statistics are available via a dedicated endpoint when telemetry is enabled.
Security and access control
Configure access controls and resource restrictions to limit what the MCP server can perform. You can enforce least-privilege access with a dedicated service account and restricted permissions for production deployments.
Examples of common workflows
- View all pods across clusters and namespaces, then fetch logs for a specific pod to diagnose issues.
Troubleshooting tips
If you encounter connectivity issues, verify kubeconfig resolution, ensure the MCP server is listening on the expected port, and confirm the MCP client is configured with the correct context or namespace when performing operations.
Notes
The server is designed as a native Go-based implementation with no external command wrappers. It supports multiple clusters and aligns with Kubernetes concepts to provide a streamlined experience for managing resources through MCP endpoints.
Available tools
configuration_view
Get the current Kubernetes configuration content as a kubeconfig YAML; supports a minified view option for concise output.
pods_list
List Kubernetes pods across all namespaces with optional field selectors and label filters.
pods_get
Retrieve a specific pod by name from a given namespace.
pods_log
Fetch logs for a pod, with options to select container and tail lines.
pods_exec
Execute a command inside a pod's container to run diagnostics or ad-hoc tasks.
resources_list
List Kubernetes resources by apiVersion and kind, with optional namespace and label filters.
helm_install
Install a Helm chart into a specified namespace to create or update a release.
helm_list
List Helm releases across namespaces.
helm_uninstall
Uninstall a Helm release from a namespace.
namespaces_list
List all namespaces in the current cluster.
events_list
List Kubernetes events across namespaces for debugging and troubleshooting.