Kubernetes MCP Server Configuration & Usage Guide
Installationnpx
Risk LevelHigh Risk
API KeyNot Required
Clients3 supported
Kubernetes 集群管理,支持View Pod、Deployment、Service 等资源状态
Supported Clients
- Claude Desktop
- Cursor
- VS Code / Cline
Installation Command
npx -y mcp-server-kubernetesConfiguration Example
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": [
"-y",
"mcp-server-kubernetes"
]
}
}
}Permission Scope & Security Notes
使用本地 kubeconfig 访问 K8s 集群,可View和管理集群资源,切勿连接生产集群
- network-access
- infrastructure-write
- credential-required
Risk Score:7/10
Common Errors
- kubeconfig 未找到
- 确认 ~/.kube/config 文件存在且配置正确
- 连接被拒绝
- 确认集群可达且 kubeconfig 中的 context 正确
Sources
Recently Verified:2026-05-18。Client versions and configuration formats may change. Please refer to official documentation before use.