Kubernetes AI助手MCP服务 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.8 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
基于Model Context Protocol的开源服务器,使AI助手能与Kubernetes集群交互。支持集群管理、资源操作、日志查询等功能。适合DevOps工程师、Kubernetes管理员和AI应用开发者使用。
Kubernetes AI助手MCP服务 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
基于Model Context Protocol的开源服务器,使AI助手能与Kubernetes集群交互。支持集群管理、资源操作、日志查询等功能。适合DevOps工程师、Kubernetes管理员和AI应用开发者使用。
Kubernetes AI助手MCP服务 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/Azure/aks-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"kubernetes-ai--mcp--": {
"command": "npx",
"args": ["-y", "aks-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Kubernetes AI助手MCP服务 执行以下任务... Claude: [自动调用 Kubernetes AI助手MCP服务 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"kubernetes_ai__mcp__": {
"command": "npx",
"args": ["-y", "aks-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
The AKS-MCP is a Model Context Protocol (MCP) server that enables AI assistants to interact with Azure Kubernetes Service (AKS) clusters. It serves as a bridge between AI tools (like GitHub Copilot, Claude, and other MCP-compatible AI assistants) and AKS, translating natural language requests into AKS operations and returning the results in a format the AI tools can understand.
It allows AI tools to:
az login
1.24.x installed on your local machine/usr/bin/env bash (Makefile targets use multi-line recipes with fail-fast mode)4.x or laterNote: If your login shell is different (e.g.,zshon macOS), you do not need to change it — the Makefile sets variables to run all recipes inbashfor consistent behavior across platforms.
make deps
<details> <summary> Remote MCP Installation </summary> To enable the remote AKS MCP server in your AKS cluster, see the instructions below:
2. Helm chart installation with RBAC (Workload Identity): Blog Post - Deploy AKS MCP server with Workload Identity </details>
docker mcp server enable aks
Note: You still need to configure the server (e.g. using `docker mcp config`) with your Azure credentials, kubeconfig file, and access level.
#### 🐋 Containerized MCP configuration
For containerized deployment, you can run AKS-MCP server using the official Docker image:
Option A: Mount credentials from host (recommended):
json { "mcpServers": { "aks": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "--user", "<your-user-id (e.g. id -u)>", "-v", "~/.azure:/home/mcp/.azure", "-v", "~/.kube:/home/mcp/.kube", "ghcr.io/azure/aks-mcp:latest", "--transport", "stdio" ] } } }
Option B: fetch the credentials inside the container:
json { "mcpServers": { "aks": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/azure/aks-mcp:latest", "--transport", "stdio" ] } } } ```
Start the MCP server container first per above command, and then run the following commands to fetch the credentials: - Login to Azure CLI: docker exec -it <container-id> az login --use-device-code - Get kubeconfig: docker exec -it <container-id> az aks get-credentials -g <resource-group> -n <cluster-name>
Note that:
~/.azure.You can configure any MCP-compatible client to use the AKS-MCP server by running the binary directly:
```bash
For direct binary usage without package managers:
1. Download the latest release from the releases page 2. Extract the binary to your preferred location 3. Make it executable (on Unix systems):
chmod +x aks-mcp
4. Configure your MCP client to use the binary path
</details>
This project includes a Makefile for convenient development, building, and testing. To see all available targets:
make help
```bash
make build
make release
#### Common Development Tasks
bash
make run
make clean
make install
#### Docker
bash
make docker-build
make docker-run ```
If you prefer to build without the Makefile:
go build -o aks-mcp ./cmd/aks-mcp
Ask any questions about your AKS clusters in your AI client, for example:
List all my AKS clusters in my subscription xxx.
What is the network configuration of my AKS cluster?
Show me the network security groups associated with my cluster.
Create a new Azure Fleet named prod-fleet in eastus region.
List all members in my fleet.
Create a placement to deploy nginx workloads to clusters with app=frontend label.
Show me all ClusterResourcePlacements in my fleet.
make deps && make buildmake test and make checkCommand line arguments:
Usage of ./aks-mcp:
--access-level string Access level (readonly, readwrite, admin) (default "readonly")
--enabled-components string Comma-separated list of enabled components (empty means all components enabled). Available: az_cli,monitor,fleet,network,compute,detectors,advisor,inspektorgadget,kubectl,helm,cilium,hubble
--allow-namespaces string Comma-separated list of allowed Kubernetes namespaces (empty means all namespaces)
--host string Host to listen for the server (only used with transport sse or streamable-http) (default "127.0.0.1")
--otlp-endpoint string OTLP endpoint for OpenTelemetry traces (e.g. localhost:4317, default "")
--port int Port to listen for the server (only used with transport sse or streamable-http) (default 8000)
--timeout int Timeout for command execution in seconds, default is 600s (default 600)
--transport string Transport mechanism to use (stdio, sse or streamable-http) (default "stdio")
--log-level string Log level (debug, info, warn, error) (default "info")
Environment variables: - USE_LEGACY_TOOLS: Set to true to use legacy specialized tools instead of unified tools (default: false) - false (default): Uses call_az for Azure operations and call_kubectl for Kubernetes operations - true: Uses legacy tools like az_aks_operations, az_compute_operations, and specialized kubectl tools - Standard Azure authentication environment variables are supported (AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID)
AKS-MCP uses Azure CLI (az) for AKS operations. Azure CLI authentication is attempted in this order:
AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID environment variables are present, a service principal login is performed using the following command: az login --service-principal -u CLIENT_ID -p CLIENT_SECRET --tenant TENANT_IDAZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_FEDERATED_TOKEN_FILE environment variables are present, a federated token login is performed using the following command: az login --service-principal -u CLIENT_ID --tenant TENANT_ID --federated-token TOKENAZURE_CLIENT_ID environment variable is present, a user-assigned managed identity login is performed using the following command: az login --identity -u CLIENT_IDAZURE_MANAGED_IDENTITY is set to system, a system-assigned managed identity login is performed using the following command: az login --identityaz login) and uses the existing session.Optional subscription selection:
AZURE_SUBSCRIPTION_ID is set, AKS-MCP will run az account set --subscription SUBSCRIPTION_ID after login.Notes and security:
/var/run/secrets/azure/tokens/azure-identity-token and is strictly validated; other paths are rejected.az account show --query id -o tsv.Environment variables used:
AZURE_TENANT_IDAZURE_CLIENT_IDAZURE_CLIENT_SECRETAZURE_FEDERATED_TOKEN_FILEAZURE_SUBSCRIPTION_IDAZURE_MANAGED_IDENTITY (set to system to opt into system-assigned managed identity)<details> <summary> One-Click Installation with the AKS Extension </summary>
The easiest way to get started with AKS-MCP is through the Azure Kubernetes Service Extension for VS Code.
Ctrl+Shift+X on Windows/Linux or Cmd+Shift+X on macOS).Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS).Upon successful installation, the server will now be visible in MCP: List Servers (via Command Palette). From there, you can start the MCP server or view its status.
Once started, the MCP server will appear in the Copilot Chat: Configure Tools dropdown under MCP Server: AKS MCP, ready to enhance contextual prompts based on your AKS environment. By default, all AKS-MCP server tools are enabled. You can review the list of available tools and disable any that are not required for your specific scenario.
Try a prompt like "List all my AKS clusters", which will start using tools from the AKS-MCP server.
The MCP configuration differs depending on whether VS Code is running on Windows or inside WSL:
🪟 Windows Host (VS Code on Windows): Use "command": "wsl" to invoke the WSL binary from Windows:
{
"servers": {
"aks-mcp": {
"type": "stdio",
"command": "wsl",
"args": [
"--",
"/home/you/.vs-kubernetes/tools/aks-mcp/aks-mcp",
"--transport",
"stdio"
]
}
}
}
🐧 Remote-WSL (VS Code running inside WSL): Call the binary directly or use a shell wrapper:
{
"servers": {
"aks-mcp": {
"type": "stdio",
"command": "bash",
"args": [
"-c",
"/home/you/.vs-kubernetes/tools/aks-mcp/aks-mcp --transport stdio"
]
}
}
}
🔧 Troubleshooting ENOENT Errors
If you see "spawn ENOENT" errors, verify your VS Code environment: - Windows host: Check if the WSL binary path is correct and accessible via wsl -- ls /path/to/aks-mcp - Remote-WSL: Do NOT use "command": "wsl" - use direct paths or bash wrapper as shown above </details>
💡 Benefits: The AKS extension handles binary downloads, updates, and configuration automatically, ensuring you always have the latest version with optimal settings.
<details> <summary>Manual Binary Installation</summary>
Choose your platform and download the latest AKS-MCP binary:
| Platform | Architecture | Download Link |
|---|---|---|
| **Windows** | AMD64 | [📥 aks-mcp-windows-amd64.exe](https://github.com/Azure/aks-mcp/releases/latest/download/aks-mcp-windows-amd64.exe) |
| ARM64 | [📥 aks-mcp-windows-arm64.exe](https://github.com/Azure/aks-mcp/releases/latest/download/aks-mcp-windows-arm64.exe) | |
| **macOS** | Intel (AMD64) | [📥 aks-mcp-darwin-amd64](https://github.com/Azure/aks-mcp/releases/latest/download/aks-mcp-darwin-amd64) |
| Apple Silicon (ARM64) | [📥 aks-mcp-darwin-arm64](https://github.com/Azure/aks-mcp/releases/latest/download/aks-mcp-darwin-arm64) | |
| **Linux** | AMD64 | [📥 aks-mcp-linux-amd64](https://github.com/Azure/aks-mcp/releases/latest/download/aks-mcp-linux-amd64) |
| ARM64 | [📥 aks-mcp-linux-arm64](https://github.com/Azure/aks-mcp/releases/latest/download/aks-mcp-linux-arm64) |
After downloading, create a .vscode/mcp.json file in your workspace root with the path to your downloaded binary.
For quick setup, you can use these one-liner scripts that download the binary and create the configuration:
Windows (PowerShell):
```powershell
mkdir -p .vscode ; Invoke-WebRequest -Uri "https://github.com/Azure/aks-mcp/releases/latest/download/aks-mcp-windows-amd64.exe" -OutFile "aks-mcp.exe" ; @{servers=@{"aks-mcp-server"=@{type="stdio";command="$PWD\aks-mcp.exe";args=@("--transport","stdio")}}} | ConvertTo-Json -Depth 3 | Out-File ".vscode/mcp.json" -Encoding UTF8
*macOS/Linux (Bash):*
bash
mkdir -p .vscode && curl -sL https://github.com/Azure/aks-mcp/releases/latest/download/aks-mcp-linux-amd64 -o aks-mcp && chmod +x aks-mcp && echo '{"servers":{"aks-mcp-server":{"type":"stdio","command":"'$PWD'/aks-mcp","args":["--transport","stdio"]}}}' > .vscode/mcp.json
##### Option B: Manual Configuration
> **✨ Simple Setup**: Download the binary for your platform, then use the manual configuration below to set up the MCP server in VS Code.
#### Manual VS Code Configuration
You can configure the AKS-MCP server in two ways:
**1. Workspace-specific configuration** (recommended for project-specific usage):
Create a `.vscode/mcp.json` file in your workspace with the path to your downloaded binary:
json { "servers": { "aks-mcp-server": { "type": "stdio", "command": "<enter the file path>", "args": [ "--transport", "stdio" ] } } }
**2. User-level configuration** (persistent across all workspaces):
For a persistent configuration that works across all your VS Code workspaces, add the MCP server to your VS Code user settings:
1. Open VS Code Settings (Ctrl+, or Cmd+,)
2. Search for "mcp" in the settings
3. Add the following to your User Settings JSON:
json { "github.copilot.chat.mcp.servers": { "aks-mcp-server": { "type": "stdio", "command": "<enter the file path>", "args": [ "--transport", "stdio" ] } } } ```
1. If running on an older version of VS Code: restart VS Code i.e. close and reopen VS Code to load the new MCP server configuration. 2. Open GitHub Copilot in VS Code and switch to Agent mode 3. Click the Tools button or run /list in the Github Copilot window to see the list of available tools 4. You should see the AKS-MCP tools in the list 5. Try a prompt like: "List all my AKS clusters in subscription xxx" 6. The agent will automatically use AKS-MCP tools to complete your request
💡 Tip: If you don't see the AKS-MCP tools after restarting, check the VS Code output panel for any MCP server connection errors and verify your binary path in .vscode/mcp.json.
Note: Ensure you have authenticated with Azure CLI (az login) for the server to access your Azure resources.
</details>
创新型工具,填补AI与Kubernetes交互的空白。MCP协议设计合理,Go语言保证性能。代码维护活跃,值得关注和使用。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,Kubernetes AI助手MCP服务 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | aks-mcp |
| 原始描述 | 开源MCP工具:A Model Context Protocol (MCP) server that enables AI assistants to interact wit。⭐132 · Go |
| Topics | KubernetesMCP服务器AI集成云原生开源 |
| GitHub | https://github.com/Azure/aks-mcp |
| License | MIT |
| 语言 | Go |
收录时间:2026-05-22 · 更新时间:2026-05-22 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端