Connects to Kubernetes clusters to manage pods, deployments and services, with kubectl operations and Helm.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add kubernetes --env ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS='<ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS>' -- npx mcp-server-kubernetes~/.codex/config.toml
[mcp_servers.kubernetes]
command = "npx"
args = ["mcp-server-kubernetes"]
env = { ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS = "<ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS>" }
# codex mcp add kubernetes --env ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS='<ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS>' -- npx mcp-server-kubernetes~/.cursor/mcp.json
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
],
"env": {
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "<ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"kubernetes": {
"type": "stdio",
"command": "npx",
"args": [
"mcp-server-kubernetes"
],
"env": {
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "<ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
],
"env": {
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "<ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
],
"env": {
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "<ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"mcp-server-kubernetes"
],
"env": {
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "<ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS>"
}
}
}
}Environment variables
ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS
Replace the placeholders with your own credentials and keep them out of version control.