Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.
MCP server for AKS cluster operations
AKS-MCP sits between an AI assistant and your AKS environment. It exposes tools for cluster CRUD, network lookup, fleet management, diagnostics, logs, and observability, with stdio-only local execution and Azure CLI authentication.
Builders who want Claude, Cursor, or Copilot to manage AKS resources from their own machine.
You can ask your agent to inspect, debug, and change AKS clusters without switching to separate Azure and kubectl workflows.
What it does
Unified Azure CLI tool
Provides `call_az` for running Azure CLI commands directly, with access-level guardrails.
Unified kubectl tool
Provides `call_kubectl` for Kubernetes commands, including read-only or mutating operations depending on access level.
Fleet management
Includes `az_fleet` tools for Azure Fleet and ClusterResourcePlacement operations across multiple clusters.
Monitoring and diagnostics
Adds tools for metrics, resource health, Application Insights queries, control plane logs, and AKS diagnostic detectors.
Observability with Inspektor Gadget
Supports deploy, run, start, stop, and results collection for eBPF-based cluster observability.
Azure resource and node inspection
Includes tools for AKS network resources, VMSS details, and node log collection.
How to get it
- 1Set up Azure CLI and authenticate
az login
- 2Windows (PowerShell)
# Download binary and create VS Code configuration 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=@()}}} | ConvertTo-Json -Depth 3 | Out-File ".vscode/mcp.json" -Encoding UTF8 - 3macOS/Linux (Bash)
# Download binary and create VS Code configuration 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":[]}}}' > .vscode/mcp.json - 4You can configure any MCP-compatible client to use the AKS-MCP server by running the…
# Run the server directly ./aks-mcp
- 5Make it executable (on Unix systems)
chmod +x aks-mcp
README
AKS-MCP
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:
- Operate (CRUD) AKS resources
- Retrieve details related to AKS clusters (VNets, Subnets, NSGs, Route Tables, etc.)
- Manage Azure Fleet operations for multi-cluster scenarios
Supported Deployment Model and Security Considerations
AKS-MCP is designed to be run locally, by a single trusted user, as a bridge between that user's own AI assistant and their own Azure/AKS resources. This is the only deployment model the project supports and hardens for.
The trust boundary
AKS-MCP executes command-line tools — including az, kubectl, helm,
cilium, and hubble — using the identity of the process it runs as. It
does not perform per-caller authorization, and it does not attempt to sandbox
the commands it runs. Therefore:
Anyone who can invoke AKS-MCP tools effectively has the full Azure and Kubernetes privileges of the identity AKS-MCP is running under.
This includes the ability to obtain reusable credentials. For example, in
readwrite or admin mode a caller can reach Azure Resource Manager and AKS
with the server identity's full authority, and kubectl or helm can be used
to read Secrets, mint service account tokens, or deploy arbitrary workloads
into the cluster. This is an inherent consequence of exposing a CLI execution
surface — it is not prevented by --access-level.
Specific credential-returning Azure CLI commands (such as
az account get-access-token and az aks get-credentials) are rejected by an
explicit denylist. That denylist reduces accidental exposure — it is not a
security boundary, it does not cover the kubectl, helm, cilium, or
hubble surfaces, and it must not be relied upon to contain an untrusted
caller.
Treat the ability to call AKS-MCP as equivalent to handing over a shell that is already logged in as the server identity.
Network exposure and local authority
Removing HTTP/SSE transports and the official remote deployment artifacts removes the supported network-reachable service and its remote-caller threat model. In the supported configuration, AKS-MCP has no listener that accepts requests from the network.
This does not make the local MCP client, its prompts, or --access-level
an authorization boundary. A person or process that controls the local client,
its server configuration, or AKS-MCP can normally run the same CLI commands
under the same identity without AKS-MCP. Protecting the workstation, client
configuration, and local credentials remains the operator's responsibility.
What --access-level is and is not
--access-level (readonly / readwrite / admin) is a guardrail to reduce
accidental damage from an AI assistant that misinterprets a request. It is
not a security boundary against a deliberately malicious caller, and it must
not be relied upon to contain an untrusted party. Do not expose AKS-MCP to
callers you would not grant the underlying Azure/Kubernetes credentials to
directly.
Recommended (supported) setup
- Run as a local subprocess, launched on demand by your local MCP client.
- Authenticate with your own developer identity via
az login. - Grant the identity only the Azure/Kubernetes permissions you actually need.
Unsupported deployment models
AKS-MCP supports only stdio and must be launched as a local subprocess by an MCP client. Do not expose it through HTTP, SSE, a container service, Helm, Kubernetes, a proxy, or a gateway. Any third-party bridge is outside the project's security and support boundary.
How it works
AKS-MCP connects to Azure using the Azure SDK and provides a set of tools that AI assistants can use to interact with AKS resources. It leverages the Model Context Protocol (MCP) to facilitate this communication, enabling AI tools to make API calls to Azure and interpret the responses.
Azure CLI Authentication
AKS-MCP uses Azure CLI (az) for AKS operations. Azure CLI authentication is attempted in this order:
-
Service Principal (client secret): When
AZURE_CLIENT_ID,AZURE_CLIENT_SECRET,AZURE_TENANT_IDenvironment 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_ID -
Workload Identity (federated token): When
AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_FEDERATED_TOKEN_FILEenvironment 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 TOKEN -
User-assigned Managed Identity (managed identity client ID): When only
AZURE_CLIENT_IDenvironment variable is present, a user-assigned managed identity login is performed using the following command:az login --identity -u CLIENT_ID -
System-assigned Managed Identity: When
AZURE_MANAGED_IDENTITYis set tosystem, a system-assigned managed identity login is performed using the following command:az login --identity -
Existing Login: When none of the above environment variables are set, AKS-MCP assumes you have already authenticated (for example, via
az login) and uses the existing session.
Optional subscription selection:
- If
AZURE_SUBSCRIPTION_IDis set, AKS-MCP will runaz account set --subscription SUBSCRIPTION_IDafter login.
Notes and security:
- The federated token file must be exactly
/var/run/secrets/azure/tokens/azure-identity-tokenand is strictly validated; other paths are rejected. - After each login, AKS-MCP verifies authentication with
az account show --query id -o tsv. - Ensure the Azure CLI is installed and on PATH.
Environment variables used:
AZURE_TENANT_IDAZURE_CLIENT_IDAZURE_CLIENT_SECRETAZURE_FEDERATED_TOKEN_FILEAZURE_SUBSCRIPTION_IDAZURE_MANAGED_IDENTITY(set tosystemto opt into system-assigned managed identity)
Available Tools
The AKS-MCP server provides consolidated tools for interacting with AKS
clusters. By default, the server uses unified tools (call_az for Azure operations and call_kubectl for Kubernetes operations) which provide a more flexible interface. For backward compatibility, you can enable legacy specialized tools by setting the environment variable USE_LEGACY_TOOLS=true.
Some tools will require read-write or admin permissions to run debugging pods on your cluster. To enable read-write or admin permissions for the AKS-MCP server, add the access level parameter to your MCP configuration file:
- Navigate to your mcp.json file, or go to MCP: List Servers -> AKS-MCP -> Show Configuration Details in the Command Palette (For VSCode;
Ctrl+Shift+Pon Windows/Linux orCmd+Shift+Pon macOS). - In the "args" section of AKS-MCP, add the following parameters: "--access-level", "readwrite" / "admin"
For example:
"args": [
"--access-level",
"readwrite"
]
These tools have been designed to provide comprehensive functionality through unified interfaces:
Azure CLI Operations (Unified Tool)
Tool: call_az (default, available when USE_LEGACY_TOOLS is not set or set to false)
Unified tool for executing Azure CLI commands directly. This tool provides a flexible interface to run any Azure CLI command.
Parameters:
cli_command: The complete Azure CLI command to execute (e.g.,az aks list --resource-group myRG,az vm list --subscription <sub-id>)timeout: Optional timeout in seconds (default: 120)
Example Usage:
{
"cli_command": "az aks list --resource-group myResourceGroup --output json"
}
Access Control:
- readonly: Only read operations are allowed
- readwrite/admin: Both read and write operations are allowed
Important: Commands must be simple Azure CLI invocations without shell features like pipes (|), redirects (>, <), command substitution, or semicolons (;).
AKS Cluster Management (Legacy Tool)
Tool: az_aks_operations (available when USE_LEGACY_TOOLS=true)
Unified tool for managing Azure Kubernetes Service (AKS) clusters and related operations.
Available Operations:
-
Read-Only (all access levels):
show: Show cluster detailslist: List clusters in subscription/resource groupget-versions: Get available Kubernetes versionscheck-network: Perform outbound network connectivity checknodepool-list: List node pools in clusternodepool-show: Show node pool detailsaccount-list: List Azure subscriptions
-
Read-Write (
readwrite/adminaccess levels):create: Create new clusterdelete: Delete clusterscale: Scale cluster node countstart: Start a stopped clusterstop: Stop a running clusterupdate: Update cluster configurationupgrade: Upgrade Kubernetes versionnodepool-add: Add node pool to clusternodepool-delete: Delete node poolnodepool-scale: Scale node poolnodepool-upgrade: Upgrade node poolaccount-set: Set active subscriptionlogin: Azure authentication
-
Admin-Only (
adminaccess level):get-credentials: Get cluster credentials for kubectl access
Network Resource Management
Tool: aks_network_resources
Unified tool for getting Azure network resource information used by AKS clusters.
Available Resource Types:
all: Get information about all network resourcesvnet: Virtual Network informationsubnet: Subnet informationnsg: Network Security Group informationroute_table: Route Table informationload_balancer: Load Balancer informationprivate_endpoint: Private endpoint information
Monitoring and Diagnostics
Tool: aks_monitoring
Unified tool for Azure monitoring and diagnostics operations for AKS clusters.
Available Operations:
metrics: List metric values for resourcesresource_health: Retrieve resource health events for AKS clustersapp_insights: Execute KQL queries against Application Insights telemetry datadiagnostics: Check if AKS cluster has diagnostic settings configuredcontrol_plane_logs: Query AKS control plane logs with safety constraints and time range validation
Compute Resources
Tool: get_aks_vmss_info
- Get detailed VMSS configuration for node pools in the AKS cluster
Tool: collect_aks_node_logs
Collect system logs from AKS VMSS nodes for debugging and troubleshooting.
Parameters:
aks_resource_id: AKS cluster resource IDvmss_name: VMSS name (obtain fromget_aks_vmss_infoorkubectl get nodes)instance_id: VMSS instance IDlog_type: Type of logs to collect (kubelet,containerd,kernel,syslog)lines: Number of recent log lines to return (default: 500, max: 2000)since: Time range for logs (e.g.,1h,30m,2d) - takes precedence overlineslevel: Log level filter (ERROR,WARN,INFO)filter: Filter logs by keyword (case-insensitive text match)
Example Usage:
{
"aks_resource_id": "/subscriptions/.../managedClusters/myAKS",
"vmss_name": "aks-nodepool1-12345678-vmss",
"instance_id": "0",
"log_type": "kubelet",
"since": "1h",
"level": "ERROR",
"filter": "ImagePullBackOff"
}
Limitations:
- Only supports Linux VMSS nodes (Windows nodes and standalone VMs are not supported yet)
- Only one run command can execute at a time per VMSS instance
Tool: az_compute_operations
Unified tool for managing Azure Virtual Machines (VMs) and Virtual Machine Scale Sets (VMSS) used by AKS.
Available Operations:
show: Get details of a VM/VMSSlist: List VMs/VMSS in subscription or resource groupget-instance-view: Get runtime statusstart: Start VMstop: Stop VMrestart: Restart VM/VMSS instancesreimage: Reimage VMSS instances (VM not supported for reimage)
Resource Types: vm (single virtual machines), vmss (virtual machine scale sets)
Fleet Management
Tool: az_fleet
Comprehensive Azure Fleet management for multi-cluster scenarios.
Available Operations:
- Fleet Operations: list, show, create, update, delete, get-credentials
- Member Operations: list, show, create, update, delete
- Update Run Operations: list, show, create, start, stop, delete
- Update Strategy Operations: list, show, create, delete
- ClusterResourcePlacement Operations: list, show, get, create, delete
Supports both Azure Fleet management and Kubernetes ClusterResourcePlacement CRD operations.
Diagnostic Detectors
Tool: aks_detector
Unified tool for executing AKS diagnostic detector operations.
Available Operations:
list: List all available AKS cluster detectorsrun: Run a specific AKS diagnostic detectorrun_by_category: Run all detectors in a specific category
Parameters:
operation(required): Operation to perform (list,run, orrun_by_category)aks_resource_id(required): AKS cluster resource IDdetector_name(required forrunoperation): Name of the detector to runcategory(required forrun_by_categoryoperation): Detector categorystart_time(required forrunandrun_by_categoryoperations): Start time in UTC ISO format (within last 30 days)end_time(required forrunandrun_by_categoryoperations): End time in UTC ISO format (within last 30 days, max 24h from start)
Available Categories:
- Best Practices
- Cluster and Control Plane Availability and Performance
- Connectivity Issues
- Create, Upgrade, Delete and Scale
- Deprecations
- Identity and Security
- Node Health
- Storage
Example Usage:
{
"operation": "list",
"aks_resource_id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.ContainerService/managedClusters/xxx"
}
{
"operation": "run",
"aks_resource_id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.ContainerService/managedClusters/xxx",
"detector_name": "node-health-detector",
"start_time": "2025-01-15T10:00:00Z",
"end_time": "2025-01-15T12:00:00Z"
}
Azure Advisor
Tool: aks_advisor_recommendation
Retrieve and manage Azure Advisor recommendations for AKS clusters.
Available Operations:
list: List recommendations with filtering optionsreport: Generate recommendation reports- Filter Options: resource_group, cluster_names, category (Cost, HighAvailability, Performance, Security), severity (High, Medium, Low)
Kubernetes Operations
Note: All Kubernetes tools (kubectl, helm, cilium, hubble) are enabled by default. Use --enabled-components to selectively enable specific components.
Unified kubectl Tool (Default)
Tool: call_kubectl (default, available when USE_LEGACY_TOOLS is not set or set to false)
Unified tool for executing kubectl commands directly. This tool provides a flexible interface to run any kubectl command with full argument support.
Parameters:
args: The kubectl command arguments (e.g.,get pods,describe node mynode,apply -f deployment.yaml)
Example Usage:
{
"args": "get pods -n kube-system -o wide"
}
Access Control: Operations are restricted based on the configured access level:
- readonly: Only read operations (get, describe, logs, etc.) are allowed
- readwrite/admin: All operations including mutating commands (create, delete, apply, etc.)
Legacy kubectl Tools (Specialized)
Available when USE_LEGACY_TOOLS=true:
-
Read-Only (all access levels):
kubectl_resources: View resources (get, describe) - filtered to read-only operations in readonly modekubectl_diagnostics: Debug and diagnose (logs, events, top, exec, cp)kubectl_cluster: Cluster information (cluster-info, api-resources, api-versions, explain)kubectl_config: Configuration management (diff, auth, config) - filtered to read-only operations in readonly mode
-
Read-Write/Admin (
readwrite/adminaccess levels):kubectl_resources: Full resource management (get, describe, create, delete, apply, patch, replace, cordon, uncordon, drain, taint)kubectl_workloads: Workload lifecycle (run, expose, scale, autoscale, rollout)kubectl_metadata: Metadata management (label, annotate, set)kubectl_config: Full configuration management (diff, auth, certificate, config)
Helm
Tool: call_helm
Helm package manager for Kubernetes.
Cilium
Tool: call_cilium
Cilium CLI for eBPF-based networking and security.
Hubble
Tool: call_hubble
Hubble network observability for Cilium.
Real-time Observability
Tool: inspektor_gadget_observability
Real-time observability tool for Azure Kubernetes Service (AKS) clusters using eBPF.
Available Actions:
deploy: Deploy Inspektor Gadget to the cluster (via the AKS cluster extension)undeploy: Remove the Inspektor Gadget cluster extension from the clusteris_deployed: Check deployment statusrun: Run one-shot gadgetsstart: Start continuous gadgetsstop: Stop running gadgetsget_results: Retrieve gadget resultslist_gadgets: List available gadgets
Available Gadgets:
observe_dns: Monitor DNS requests and responsesobserve_tcp: Monitor TCP connectionsobserve_file_open: Monitor file system operationsobserve_process_execution: Monitor process executionobserve_signal: Monitor signal deliveryobserve_system_calls: Monitor system callstop_file: Top files by I/O operationstop_tcp: Top TCP connections by traffictcpdump: Capture network packets
How to install
Prerequisites
-
Set up Azure CLI and authenticate:
az login
VS Code with GitHub Copilot (Recommended)
One-Click Installation with the AKS Extension
The easiest way to get started with AKS-MCP is through the Azure Kubernetes Service Extension for VS Code.
Step 1: Install the AKS Extension
- Open VS Code and go to Extensions (
Ctrl+Shift+Xon Windows/Linux orCmd+Shift+Xon macOS). - Search for Azure Kubernetes Service.
- Install the official Microsoft AKS extension.
Step 2: Launch the AKS-MCP Server
- Open the Command Palette (
Ctrl+Shift+Pon Windows/Linux orCmd+Shift+Pon macOS). - Search and run: AKS: Setup AKS MCP Server.
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.
Step 3: Start Using AKS-MCP
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.
WSL Configuration
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"
]
}
}
}
🐧 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"
]
}
}
}
🔧 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
💡 Benefits: The AKS extension handles binary downloads, updates, and configuration automatically, ensuring you always have the latest version with optimal settings.
Alternative Installation Methods
Manual Binary Installation
Step 1: Download the Binary
Choose your platform and download the latest AKS-MCP binary:
| Platform | Architecture | Download Link |
|---|---|---|
| Windows | AMD64 | 📥 aks-mcp-windows-amd64.exe |
| ARM64 | 📥 aks-mcp-windows-arm64.exe | |
| macOS | Intel (AMD64) | 📥 aks-mcp-darwin-amd64 |
| Apple Silicon (ARM64) | 📥 aks-mcp-darwin-arm64 | |
| Linux | AMD64 | 📥 aks-mcp-linux-amd64 |
| ARM64 | 📥 aks-mcp-linux-arm64 |
Step 2: Configure VS Code
After downloading, create a .vscode/mcp.json file in your workspace root with the path to your downloaded binary.
Option A: Automated Setup Script
For quick setup, you can use these one-liner scripts that download the binary and create the configuration:
Windows (PowerShell):
# Download binary and create VS Code configuration
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=@()}}} | ConvertTo-Json -Depth 3 | Out-File ".vscode/mcp.json" -Encoding UTF8
macOS/Linux (Bash):
# Download binary and create VS Code configuration
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":[]}}}' > .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:
{
"servers": {
"aks-mcp-server": {
"type": "stdio",
"command": "<enter the file path>",
"args": []
}
}
}
Files in the repo
- .github
- .slsa-goreleaser
- cmd
- docs
- internal
- prompts
- .gitignore
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- go.mod
- go.sum
- LICENSE
- Makefile
- README.md
- SECURITY.md
- SUPPORT.md
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More connectors
Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.
x64dbg-MCP Server is a native MCP (Model Context Protocol) plugin for x64dbg that exposes the debugger's full functionality over HTTP. Connect any MCP-compatible AI assistant and control x64dbg programmatically: set breakpoints, step through code, read memory, dump registers, and more. Built with Zig — zero dependencies, single-binary output, cros
Chrome DevTools for coding agents
Playwright MCP server

Minimal Coding Agent Harness on MCP for ChatGPT, Claude, Hermes, Grok Bot, OpenClaw