Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Select, configure, and scale Azure compute resources—VMs, App Service, AKS, and Container Apps
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
workflows/vm-creator/references/output-adapters/mcp-apply.md
1# Apply via Azure MCP23User is in an MCP-connected host (Claude Code, VS Code Copilot, Cursor) with the Azure MCP server enabled and says "just do it" / "create it now" / "deploy".45## Prerequisite6Azure MCP server installed, and the user is signed in to Azure (e.g. `az login`). The exact auth mechanism is an implementation detail of the MCP server and may vary.78## Pre-flight checks (read-only)910```11compute_vm_check-quota(subscription, location, family={derived from vmSize})12compute_vm_list-skus(subscription, location, familyPrefix={derived from vmSize})13```1415Confirm:16- Quota has headroom for the requested vCPU count17- The chosen SKU is available in that region (and zone, if specified)1819## Apply — VM2021Call `compute_vm_create` with the Plan Card values:2223| MCP parameter | Plan Card field |24|---|---|25| `subscription` | subscription |26| `resource-group` | resourceGroup |27| `vm-name` | name |28| `location` | location |29| `image` | image |30| `vm-size` | size |31| `admin-username` | adminUsername |32| `ssh-public-key` (Linux) / `admin-password` (Windows) | sshKey / adminPassword |33| `virtual-network` | vnetName (omit to auto-create) |34| `subnet` | subnetName (omit to auto-create) |35| `network-security-group` | nsgName (omit to auto-create) |36| `public-ip-address` | publicIpName |37| `no-public-ip` | true if Plan Card says private only |38| `source-address-prefix` | restrict NSG inbound source (e.g., user's IP) |39| `zone` | zone |40| `os-disk-size-gb` | osDiskSizeGb |41| `os-disk-type` | osDiskType |42| `os-type` | linux / windows (usually auto-detected from image) |4344## Apply — VMSS4546Call `compute_vmss_create` with the same fields, plus:4748| MCP parameter | Plan Card field |49|---|---|50| `vmss-name` | name |51| `instance-count` | instanceCount |52| `upgrade-policy` | upgradePolicy (Manual / Automatic / Rolling) |5354## After apply55- Tool returns `VmCreateResult` / `VmssCreateResult` with `Id`, `Name`, `Location`, `VmSize`, `ProvisioningState`, `PublicIpAddress`, `PrivateIpAddress`, `Zones`, `Tags`.56- Echo back to user: hostname / IP / SSH command (`ssh {adminUsername}@{publicIp}`) or RDP command (`mstsc /v:{publicIp}`).57- Offer next steps: list/inspect (`compute_vm_get`), update (`compute_vm_update`), delete (`compute_vm_delete`).5859## Failure handling6061| Error | Action |62|---|---|63| `Quota exceeded` | re-run `compute_vm_check-quota`; suggest smaller SKU or different family |64| `A VM with the specified name already exists` | ask for a new name |65| `Resource not found` on RG | create the RG first (`group_create` MCP or `az group create`) |66| `Authorization failed` | user needs Contributor or VM Contributor on the RG |67