A Model Context Protocol (MCP) server to enable Claude, Cursor and other AI tools to interact with Kubernetes cluster via kubectl.
Get your kubeconfig file for your Kubernetes cluster and setup in the mcpServers (replace src path with your kubeconfig path):
{
"mcpServers": {
"kubernetes": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--mount", "type=bind,src=/home/username/.kube/config,dst=/home/mcp/.kube/config",
"ghcr.io/feiskyer/mcp-kubernetes-server"
]
}
}
}
# For Linux and MacOS
curl -LsSf https://astral.sh/uv/install.sh | sh
# For Linux
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
# For MacOS
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl"
{
"mcpServers": {
"kubernetes": {
"command": "uvx",
"args": [
"mcp-kubernetes-server"
],
"env": {
"KUBECONFIG": "<your-kubeconfig-path>"
}
}
}
}
The project is opensource at github feiskyer/mcp-kubernetes-server with Apache License.
If you would like to contribute to the project, please follow these guidelines:
The project is licensed under the Apache License 2.0. See the LICENSE file for more details.
{
"mcpServers": {
"kubernetes": {
"env": {},
"args": [
"run",
"-i",
"--rm",
"--mount",
"type=bind,src=/home/username/.kube/config,dst=/home/mcp/.kube/config",
"ghcr.io/feiskyer/mcp-kubernetes-server"
],
"command": "docker"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.