Hi! I'm having trouble getting the Kubernetes MCP server to connect to my cluster. I'm sure I just have something misconfigured on my end but I can't seem to figure out what.
Environment
- macOS
- Claude Desktop with Kubernetes MCP Server installed and enabled
- kubectl installed at
/usr/local/bin/kubectl and working correctly in terminal
Problem
The MCP server consistently fails to execute any kubectl commands with the error:
Full error example from logs:
2026-01-06T03:09:10.544Z [Kubernetes MCP Server] [info] Message from server: {"jsonrpc":"2.0","id":6,"error":{"code":-32603,"message":"MCP error -32603: Failed to execute kubectl get command: MCP error -32603: Failed to get resource: spawnSync kubectl ENOENT"}}
What I've verified
kubectl works perfectly from my terminal (kubectl config get-contexts shows my k3s context correctly)
which kubectl returns /usr/local/bin/kubectl
~/.kube/config exists and is readable
- Full computer reboot (to ensure PATH is picked up)
Current MCP Server Configuration
The server is installed as an extension in Claude Desktop with minimal configuration - there doesn't appear to be a way to configure environment variables through the UI.
Question
Is there a way to configure the PATH environment variable for the Kubernetes MCP server? The ENOENT error suggests the MCP server process can't find kubectl in its PATH, even though it's in a standard location (/usr/local/bin). This seems like a common macOS GUI app issue where GUI applications don't inherit the full shell PATH.
Any guidance on how to properly configure this would be greatly appreciated!
Hi! I'm having trouble getting the Kubernetes MCP server to connect to my cluster. I'm sure I just have something misconfigured on my end but I can't seem to figure out what.
Environment
/usr/local/bin/kubectland working correctly in terminalProblem
The MCP server consistently fails to execute any kubectl commands with the error:
Full error example from logs:
What I've verified
kubectlworks perfectly from my terminal (kubectl config get-contextsshows my k3s context correctly)which kubectlreturns/usr/local/bin/kubectl~/.kube/configexists and is readableCurrent MCP Server Configuration
The server is installed as an extension in Claude Desktop with minimal configuration - there doesn't appear to be a way to configure environment variables through the UI.
Question
Is there a way to configure the PATH environment variable for the Kubernetes MCP server? The
ENOENTerror suggests the MCP server process can't findkubectlin its PATH, even though it's in a standard location (/usr/local/bin). This seems like a common macOS GUI app issue where GUI applications don't inherit the full shell PATH.Any guidance on how to properly configure this would be greatly appreciated!