A comprehensive guide to the IIS-to-Azure App Service migration system. This document covers every component, the end-to-end pipeline, agent orchestration, data flow, and the critical Managed Instance on App Service constraints.
- End-to-End System Map β start here for the full picture
- System Overview
- Component Inventory
- 6-Phase Pipeline Flow
- Agent Orchestration
- Data Flow & Artifacts
- Managed Instance Provisioning Split
- Prerequisites & Setup
- Managed Instance Constraints & Rules
A single diagram showing every component, tool, script, agent, and artifact β from user interaction through to Azure deployment. Readable in any text editor.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DEVELOPER (VS Code) β
β β β
β @iis-migrate β
β β β
β ββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ β
β β VS CODE COPILOT AGENTS (.github/agents/) β β
β β β β β
β β ββββββββββββββ€ iis-migrate (Orchestrator) β β
β β β β β β β β
β β Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 β β
β β β β β β β β β
β β iis-discover iis-assess iis-recommend iis-deploy iis- β β
β β -plan execute β β
β βββββββββββββββββββββββββββ¬βββββββββββββ¬βββββββββββββ¬ββββββββββββ¬ββββββββββ¬βββββββ β
β β β β β β β
β βββββββββββββββββββββββββββͺβββββββββββββͺβββββββββββββͺββββββββββββͺββββββββββͺββββββββββββββββββ β
β stdio JSON-RPC (MCP Transport) β
β βββββββββββββββββββββββββββͺβββββββββββββͺβββββββββββββͺββββββββββββͺββββββββββͺββββββββββββββββββ β
β β β β β β β
β βββββββββββββββββββββββββββ΄βββββββββββββ΄βββββββββββββ΄ββββββββββββ΄ββββββββββ΄βββββββββββββββββββ β
β β FastMCP SERVER (server.py) β β
β β β β
β β ββ Phase 1 βββββββββββ ββ Phase 2 βββββββββββ ββ Phase 3 βββββββββββββββββββββββββββ β β
β β β discover_iis_sites β β assess_site_ β β suggest_migration_approach β β β
β β β choose_assessment_ β β readiness β β recommend_target β β β
β β β mode β β assess_source_code β β generate_install_script β β β
β β β β β β β generate_adapter_arm_template β β β
β β ββββββββββ¬βββββββββββββ ββββββββββββββββββββββ βββββββββββββββ¬βββββββββββ¬βββββββββββββ β β
β β β β β β β
β β ββ Phase 4 βββββββββββββββββββ ββ Phase 5 βββββββββββββββββββββββββββββββββββ β β
β β β plan_deployment β β confirm_migration ββ(HUMAN GATE)ββ> User β β β
β β β package_site β β migrate_sites β β β
β β β generate_migration_settings β β β β β
β β ββββββββββββ¬βββββββββββββββββββ βββββββββββββββββββββββββββββ¬βββββββββββββββββ β β
β β β β β β
β β ββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββ β β
β β β ps_runner.py (Python-to-PowerShell bridge) β β β
β β β Auto-detects UTF-16 LE BOM / UTF-8 BOM encoding β β β
β β ββββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬ββββββββββββββ¬ββββββββββββ β β
β βββββββββββββββΌββββββββββββββΌβββββββββββββββΌβββββββββββββββΌββββββββββββββΌββββββββββββββββββββ β
β β β β β β β
β βββββββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββ΄ββββββββββββββββββββ β
β β POWERSHELL SCRIPTS (downloaded from Microsoft, path set at runtime) β β
β β β β
β β IISDiscovery.ps1 Get-SitePackage.ps1 Invoke-SiteMigration.ps1 β β
β β Get-SiteReadiness.ps1 Generate-MigrationSettings Get-MIAppServicePlan.ps1 β β
β β IISMigration.ps1 MigrationHelperFunctions.psm1 β β
β βββββββββ¬βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββ β
β β β β β
β βΌ βΌ βΌ β
β βββββββββββββββββ ββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββ β
β β LOCAL IIS β β AppCat CLI β β AZURE β β
β β β β (source code analysis) β β β β
β β Web Sites β β β β ARM API ββ¬β App Service Plans+Apps β β
β β App Pools β β appcat analyze ... β β ββ Key Vault (secrets) β β
β β Web.config β β --non-interactive β β ββ Storage Accounts β β
β βββββββββββββββββ ββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββ ARTIFACTS (%TEMP%\iis-migration\) ββββββββββββββββββββββββββ β
β β β β
β β Phase 1 output: ReadinessResults.json (UTF-16 LE) β β
β β Phase 3 outputs: install.ps1 | mi-adapters-template.json β β
β β Phase 4 outputs: PackageResults.json (UTF-16 LE) | site ZIPs | MigrationSettings β β
β β Phase 5 output: MigrationResults.json β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The system is a Model Context Protocol (MCP) server that exposes IIS migration capabilities as tools callable by VS Code Copilot agents. It bridges Python business logic, PowerShell IIS/Azure scripts, and external CLIs into a unified, agent-driven migration workflow.
βββββββββββββββββββββββββββββββββββββββββββ
β SYSTEM CONTEXT β
βββββββββββββββββββ¬ββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ ββββββββββββββββββββββββ ββββββββββββββββββββββ
β DEVELOPER β β VS CODE β β EXTERNAL SYSTEMS β
β (User) ββββββββββββ>β β β β
β β Copilot β 6 Custom Agents β β Local IIS β
β Runs migration β Chat β (.agent.md files) β β Azure (ARM, App β
β from VS Code β β β β β Service, KV, β
βββββββββββββββββββ β βΌ β β Storage) β
β MCP Client (stdio) β β AppCat CLI β
ββββββββββββ¬ββββββββββββ βββββββββββ¬βββββββββββ
β β
stdio JSON-RPC β
β β
ββββββββββββ΄ββββββββββββ β
β MCP SERVER PROCESS β β
β β β
β server.py (FastMCP) β β
β β β β
β 13 Tool Modules β β
β (tools/*.py) β β
β β β β
β ps_runner.py ββββββββββββββββββββββ
β (PythonβPS bridge) β subprocess calls
β β to downloaded *.ps1
ββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β VS Code + Copilot Agents (.github/agents/*.agent.md) β User interface
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β MCP Transport (stdio JSON-RPC) β Protocol layer
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β FastMCP Server (server.py) β Routing
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Python Tool Modules (tools/*.py) β 13 tools β Business logic
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β ps_runner.py β UTF-16 LE / UTF-8 decoding β Python β PS bridge
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β PowerShell Scripts (downloaded, user-configured path) β IIS & Azure operations
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β IIS β Azure (ARM / App Service / KV / Storage) β External systems
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| # | Phase | Tool Name | Type | Description | PS Script |
|---|---|---|---|---|---|
| 1 | Discovery | discover_iis_sites |
PS | Scan local IIS, run readiness checks, save ReadinessResults.json | IISDiscovery.ps1 |
| 2 | Discovery | choose_assessment_mode |
Python | Route sites to config-only, config+source, or skip-to-packaging | β |
| 3 | Assessment | assess_site_readiness |
Python | Detailed per-site readiness from ReadinessResults.json with remediation links | β |
| 4 | Assessment | assess_source_code |
Python | Parse AppCat JSON report for Managed Instance-relevant findings; splits adapter vs install features | β |
| 5 | Recommendation | suggest_migration_approach |
Python | Route to IIS Migration MCP (binaries) vs App Modernization MCP (source code) | β |
| 6 | Recommendation | recommend_target |
Python | Managed Instance on App Service (PV4) vs standard App Service vs Container Apps | β |
| 7 | Recommendation | generate_install_script |
Python | Create install.ps1 for OS-level features (SMTP, MSMQ, COM, fonts, Crystal Reports) | β |
| 8 | Recommendation | generate_adapter_arm_template |
Python | ARM template for registry adapters (β Key Vault) and storage adapters | β |
| 9 | Deployment | plan_deployment |
Python | Plan App Service Plans; enforce PV4 + IsCustomMode for Managed Instance; query existing plans | Get-MIAppServicePlan.ps1 |
| 10 | Deployment | package_site |
PS | ZIP site content from IIS physical path; optionally inject install.ps1 | Get-SitePackage.ps1 |
| 11 | Deployment | generate_migration_settings |
PS | Build MigrationSettings.json from PackageResults.json | Generate-MigrationSettings.ps1 |
| 12 | Execution | confirm_migration |
Python | Present human-readable summary; require explicit confirmation before deploy | β |
| 13 | Execution | migrate_sites |
PS | Deploy ZIPs to Azure App Service; create billable resources | Invoke-SiteMigration.ps1 |
| Agent | Role | Tool Scope |
|---|---|---|
| iis-migrate | Orchestrator β delegates to subagents per phase | All 13 tools |
| iis-discover | Discovery & readiness scanning | discover_iis_sites, choose_assessment_mode, assess_site_readiness |
| iis-assess | Config + source assessment | assess_site_readiness, assess_source_code |
| iis-recommend | Target recommendation & provisioning artifact generation | recommend_target, generate_install_script, generate_adapter_arm_template |
| iis-deploy-plan | Packaging & MigrationSettings creation | plan_deployment, package_site, generate_migration_settings |
| iis-execute | Final confirmation & deployment (human gate) | confirm_migration, migrate_sites |
These scripts are NOT included in this repository. Users must download them from Microsoft and configure the path using
configure_scripts_pathordownload_migration_scripts.
| Script | Purpose | Requires Admin | Requires Azure |
|---|---|---|---|
| IISDiscovery.ps1 | Enumerate IIS sites, run 15 readiness checks | Yes | No |
| Get-SiteReadiness.ps1 | Compile assessment data; supports remote servers | Yes | No |
| Get-SitePackage.ps1 | Package sites into ZIPs; produce PackageResults.json | Yes | No |
| Generate-MigrationSettings.ps1 | Build MigrationSettings.json from packages | No | No |
| Invoke-SiteMigration.ps1 | Deploy to Azure App Service, create resources | No | Yes |
| IISMigration.ps1 | Main packaging/migration entry point | Yes | Varies |
| MigrationHelperFunctions.psm1 | Shared utility functions (imported by other scripts) | β | β |
| File | Purpose |
|---|---|
server.py |
FastMCP entry point β imports all tool modules, starts stdio transport |
ps_runner.py |
PythonβPowerShell bridge β subprocess exec, UTF-16 LE/UTF-8 BOM decode, error categorization |
tools/__init__.py |
Shared FastMCP server instance |
requirements.txt |
mcp[cli]>=1.0.0 |
ScriptConfig.json |
PowerShell configuration (included in downloaded scripts) |
TemplateMigrationSettings.json |
MigrationSettings.json template (included in downloaded scripts) |
WebAppCheckResources.resx |
Readiness check descriptions (included in downloaded scripts) |
PHASE 1: DISCOVERY PHASE 2: ASSESSMENT PHASE 3: RECOMMENDATION
ββββββββββββββββββββββββ ββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
β discover_iis_sites β β assess_site_readiness β β suggest_migration_approach β
β β β β β β β β
β βΌ β β assess_source_code β β recommend_target β
β choose_assessment_ β β (needs AppCat JSON) β β β β β
β mode β β β β βΌ (if Managed Instance) β
β β β β β βΌ (if std) β
ββββββββββ¬ββββββββββββββ βββββββββββββ¬ββββββββββββ β generate_ skip to β
β β β install_ Phase 4 β
β ReadinessResults.json β β script β
βΌ βΌ β generate_adapter_ β
ββββββββββββ ββββββββββββ β arm_template β
βconfig β βconfig + β ββββββββββββ¬βββ¬βββββββββββββββββ
βonly? β βsource? β β β
ββββββββ¬ββββ ββββββ¬ββββββ install β β ARM
β β .ps1 β β template
βΌ βΌ β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββͺβββͺβββββββββ
β β
PHASE 4: DEPLOYMENT PLANNING PHASE 5: EXECUTION β β
βββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββ β β
β plan_deployment <βββββΌβββββΌββββββββββββββββββββββββ β ββββ β
β β β β β β
β βΌ β β β <βββββ
β package_site β β confirm_migration β
β β β β β β
β βΌ PackageResults β β [HUMAN GATE] β
β generate_migration_settings β β User must confirm β
β β β β β β
β βΌ MigrationSettings β β βΌ β
βββββββββΌββββββββββββββββββββββ β migrate_sites ββ> Azureβ
β β β β
ββββββββββββββββββββββββββ>β βΌ β
β MigrationResults.json β
βββββββββββββββββββββββββββ
| Phase | Gate | Key Artifacts Produced |
|---|---|---|
| 1. Discovery | Admin + IIS required | ReadinessResults.json |
| 2. Assessment | AppCat CLI for source mode | Enriched assessment per site |
| 3. Recommendation | Source assessment for Managed Instance features | install.ps1, mi-adapters-template.json |
| 4. Deployment Planning | Azure login for existing plan query | PackageResults.json, MigrationSettings.json |
| 5. Execution | Explicit human confirmation | MigrationResults.json |
The iis-migrate orchestrator delegates to specialized subagents,
each scoped to a subset of tools. This enforces workflow phases and
prevents agents from calling tools outside their responsibility.
βββββββββββββββββββββββββββββββββββ
β DEVELOPER (User) β
β @iis-migrate β
βββββββββββββββββ¬ββββββββββββββββββ
β
βββββββββββββββββ΄ββββββββββββββββββ
β iis-migrate (Orchestrator) β
β All 13 tools access β
ββββ¬βββββββ¬βββββββ¬βββββββ¬βββββββ¬βββ
β β β β β
βββββββββββββββββ β β β βββββββββββββββββ
β βββββββββ β βββββββββ β
βΌ βΌ βΌ βΌ βΌ
ββββββββββββββββββββ βββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β iis-discover β β iis-assess β β iis-recommendβ βiis-deploy- β β iis-execute β
β Phase 1 β β Phase 2 β β Phase 3 β β plan β β Phase 5 β
ββββββββββββββββββββ€ βββββββββββββββββ€ ββββββββββββββββ€ βPhase 4 β ββββββββββββββββ€
β discover_iis_ β β assess_site_ β β recommend_ β ββββββββββββββββ€ β confirm_ β
β sites β β readiness β β target β β plan_ β β migration β
β choose_ β β assess_source_β β generate_ β β deployment β β migrate_sitesβ
β assessment_ β β code β β install_ β β package_site β β β
β mode β β β β script β β generate_ β β !! HUMAN β
β assess_site_ β β β β generate_ β β migration_ β β !! GATE β
β readiness β β β β adapter_ β β settings β β !! REQUIRED β
β β β β β arm_tpl β β β β β
ββββββββββββββββββββ βββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
- iis-migrate never calls tools directly for migration β it delegates to the appropriate subagent.
- Each subagent has a fixed tool scope enforced by the
.agent.mdtools:frontmatter. - iis-execute requires explicit user confirmation via
confirm_migrationbeforemigrate_sitescan run. - Agents can access read/search tools for context gathering alongside their migration-specific tools.
LOCAL IIS MCP SERVER FILE SYSTEM AppCat CLI AZURE
β β (%TEMP%\iis-migration\) β β
β β β β β
β ββ Phase 1: Discovery ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β β β
β<ββdiscover_iis_sitesβ β β β
β (Admin + IIS) β β β β
βββββsite listβββββββ>β β β β
β βββReadinessResults.jsonβ> β β
β β β β β
β ββ Phase 2: Assessment βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β β β
β β<βassess_site_readinessββ β β
β β (reads Readiness JSON) β β β
β β β appcat analyze ... β β
β β β<ββappcat-report.jsonββββββ β
β β<ββassess_source_codeββββ β β
β β (parses AppCat JSON) β β β
β β β β β
β ββ Phase 3: Recommendation βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β β β
β βββrecommend_targetββ> β β β
β β (Managed Instance or Standard?) β β
β βββinstall.ps1ββββββββββ>β β β
β βββmi-adapters-templateβ>β β β
β β β β β
β ββ Phase 4: Deployment Planning ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β β β
β<ββpackage_siteβββββββ β β β
ββββZIP contentββββββ>β β β β
β βββPackageResults.jsonββ>β β β
β βββsite ZIPsββββββββββββ>β β β
β βββMigrationSettingsβββ->β β β
β β β β β
β ββ Phase 5: Execution ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β β β
β βββconfirm_migrationββββ>β DEVELOPER β β
β β [STOP: User must β must type β β
β β confirm to proceed] β "yes" / "confirm" β β
β β β β β
β βββmigrate_sitesβββββββββββββββββββββββββββββββββββββββββββββββββββ>β
β β β β ARM deploy β
β β β β App Service β
β β<ββMigrationResultsβββββββββββββββββββββββββββββββββ<βββββββββββββββ
β β β β β
ReadinessResults.json
βββ assess_site_readiness (enriched per-site details)
βββ assess_source_code (adapter_features + install_script_features)
β βββ generate_adapter_arm_template β mi-adapters-template.json
β βββ generate_install_script β install.ps1
βββ package_site β PackageResults.json + *.zip
β βββ generate_migration_settings β MigrationSettings.json
β βββ confirm_migration β migrate_sites β MigrationResults.json
All artifacts are written to %TEMP%\iis-migration\:
| Artifact | Path | Encoding |
|---|---|---|
| ReadinessResults.json | %TEMP%\iis-migration\ReadinessResults.json |
UTF-16 LE |
| PackageResults.json | %TEMP%\iis-migration\PackageResults.json |
UTF-16 LE |
| MigrationSettings.json | %TEMP%\iis-migration\MigrationSettings.json |
UTF-8 |
| Site ZIP packages | %TEMP%\iis-migration\PackagedSites\<SiteName>.zip |
Binary |
| Managed Instance ARM template | %TEMP%\iis-migration\<plan-name>\mi-adapters-template.json |
UTF-8 |
| Install scripts | %TEMP%\iis-migration\<SiteName>\install.ps1 |
UTF-8 |
Encoding note: PowerShell 5.1 outputs UTF-16 LE with BOM (
FF FE).ps_runner.pyauto-detects and decodes both UTF-16 LE and UTF-8 BOM transparently.
Managed Instance on App Service has two distinct dependency tracks. The system separates them because they have different provisioning mechanisms β one uses Azure platform features (ARM API), the other uses OS-level installation during site startup.
βββββββββββββββββββββββββββ
β assess_source_code β
β (parses AppCat JSON) β
βββββββ¬ββββββββββββ¬βββββββββ
β β
adapter_features install_script_features
β β
βββββββββββββββββ βββββββββββββββββ
βΌ βΌ
ββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββ
β ADAPTER TRACK (ARM Template) β β INSTALL SCRIPT TRACK (.ps1) β
β Platform-level, no app changes β β OS-level, runs at Managed Instance startup β
β β β β
β ββββββββββββββββββββββββββββββ β β ββββββββββββββββββββββββββββββ β
β β Registry Adapters β β β β SMTP Server β β
β β Registry key β KV secret β β β β Install-WindowsFeature β β
β ββββββββββββββββββββββββββββββ β β ββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββ β β ββββββββββββββββββββββββββββββ β
β β Storage Adapters β β β β MSMQ Client β β
β β AzureFiles (SMB share) β β β β Install-WindowsFeature β β
β β Custom (VNET endpoint) β β β ββββββββββββββββββββββββββββββ β
β β LocalStorage (local SSD) β β β ββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββ β β β COM/MSI Components β β
β β β β regsvr32 /s <dll> β β
β β β β ββββββββββββββββββββββββββββββ β
β βΌ β β ββββββββββββββββββββββββββββββ β
β generate_adapter_arm_template β β β Custom Fonts β β
β β β β ββββββββββββββββββββββββββββββ β
β βΌ β β ββββββββββββββββββββββββββββββ β
β mi-adapters-template.json β β β Crystal Reports Runtime β β
β β β ββββββββββββββββββββββββββββββ β
β β β β β
β βΌ β β β β
β Deploy via: β β βΌ β
β az deployment group create β β generate_install_script β
β or Azure Portal β β β β
β β β βΌ β
ββββββββββββββββ¬ββββββββββββββββββββ β install.ps1 β
β β β β
β βββββββββββΌβββββββββββββββββββββββββ
β β
βΌ βΌ
plan_deployment package_site
(ARM plan config) (inject install.ps1 into ZIP)
β β
ββββββββββββββββ¬ββββββββββββββββββββ
βΌ
MigrationSettings.json
| Source Assessment Rule | Feature | Track | Provisioning |
|---|---|---|---|
| Local.0001 (Registry access) | Registry | Adapter | ARM template β Key Vault secret mapping |
| Local.0003/0004 (File I/O) | Storage | Adapter | ARM template β Azure Files / LocalStorage mount |
| SMTP.0001 | SMTP | Install Script | Install-WindowsFeature Web-SMTP-Service |
| Identity.0001+ (MSMQ) | MSMQ | Install Script | Install-WindowsFeature MSMQ-Client |
| COM interop detected | Component | Install Script | regsvr32 /s <dll> |
| Custom fonts detected | Font | Install Script | Install-Font |
| Crystal Reports refs | CrystalReports | Install Script | Crystal runtime installer |
- Adapters are Azure platform features configured via ARM API (
Microsoft.Web/serverfarmsproperties). They map local resources (registry keys, file paths) to cloud equivalents (Key Vault secrets, Azure File shares) without modifying the application. - Install scripts run during Managed Instance site startup to install Windows components that have no platform adapter equivalent. They execute
Install-WindowsFeatureand similar OS-level commands inside the Managed Instance environment.
| Dependency | Version | Purpose | Required For |
|---|---|---|---|
| Python | 3.10+ | MCP server runtime | All |
mcp[cli] |
β₯ 1.0.0 | FastMCP framework | All |
| Windows PowerShell | 5.1 | IIS & Azure script execution | Discovery, packaging, migration |
| IIS (WebAdministration module) | β | Local site enumeration | Discovery |
| Azure PowerShell (Az module) | β | Azure resource deployment | Migration, plan query |
AppCat CLI (appcat) |
β₯ 1.0.878 | Source code analysis | Source assessment |
| VS Code + GitHub Copilot | β | Agent UI | Agent orchestration |
| Administrator privileges | β | IIS access | Discovery, packaging |
# 1. Install Python dependencies
pip install -r requirements.txt
# 2. Start the MCP server (manual)
python server.pyAdd to .vscode/mcp.json in your workspace:
{
"servers": {
"iis-migration": {
"command": "python",
"args": ["server.py"],
"cwd": "${workspaceFolder}"
}
}
}The 6 agent files in .github/agents/ are automatically discovered by
VS Code when the Copilot Chat extension is installed. No additional
configuration is needed β open the workspace and invoke @iis-migrate.
AppCat is invoked externally (not through the MCP server). The
assess_source_code tool parses pre-generated AppCat JSON reports.
# Install AppCat as a .NET global tool
dotnet tool install --global Microsoft.AppCat.CLI
# Run analysis (example)
appcat analyze "path\to\project.csproj" `
--source Solution `
--target AppService.Windows `
--serializer json `
--report "path\to\output.json" `
--code `
--privacyMode Unrestricted `
--non-interactiveImportant flags:
--non-interactive(avoids Spectre.Console handle errors),--report(not--output),--privacyMode Unrestricted(includes code snippets).
These constraints are the #1 source of deployment errors. Every component in the system enforces them.
| Constraint | Value | Enforced By |
|---|---|---|
| App Service Plan SKU | PV4 only | plan_deployment, generate_adapter_arm_template |
| IsCustomMode | true | plan_deployment, ARM template |
| Custom container | Not supported | Site runs natively in Managed Instance environment |
| Role | Scope | Assigned To | Purpose |
|---|---|---|---|
| Contributor | Resource Group | Deployer identity | Create App Service Plan + Apps |
| Managed Identity Operator | Managed Instance User-Assigned Identity | Deployer identity | Assign Managed Instance identity to plan |
| Key Vault Administrator | Key Vault | Deployer identity | Create KV secrets for registry adapters |
| Key Vault Secrets User | Key Vault | Managed Instance plan identity | Read registry adapter values at runtime |
| Storage File Data SMB Share Contributor | Storage Account | Managed Instance plan identity | Mount Azure File shares |
| Network Contributor | VNET/Subnet | Managed Instance plan identity | Custom (private endpoint) storage mounts |
Does the feature have a platform adapter?
βββ YES (Registry, Storage) β ARM template (generate_adapter_arm_template)
β β’ Registry keys β Key Vault secrets
β β’ File paths β Azure Files / LocalStorage mounts
β β’ Deploy via: az deployment group create / Azure Portal
β
βββ NO (SMTP, MSMQ, COM, Fonts, Crystal) β install.ps1 (generate_install_script)
β’ Windows features installed at Managed Instance startup
β’ Injected into site ZIP during package_site
β’ Runs inside Managed Instance environment with limited permissions
| Type | Use Case | Requires |
|---|---|---|
AzureFiles |
SMB file share for persistent storage | Storage Account + File Share |
Custom |
VNET-integrated private endpoint storage | VNET + Private DNS + Storage |
LocalStorage |
Ephemeral local SSD (fast, not persistent) | Nothing (built-in) |
Resource Type: Microsoft.Web/serverfarms
API Version: 2024-11-01
Key Properties:
sku.name: "PV4"
properties.isCustomMode: true
properties.registryAdapters: [...]
properties.storageMounts: [...]
properties.installScripts: [...]
identity.type: "UserAssigned"
Migration/
βββ server.py # FastMCP entry point
βββ ps_runner.py # Python β PowerShell bridge
βββ requirements.txt # mcp[cli]>=1.0.0
βββ ARCHITECTURE.md # This document
β
βββ tools/
β βββ __init__.py # Shared FastMCP server instance
β βββ discover.py # discover_iis_sites
β βββ assessment_router.py # choose_assessment_mode
β βββ assess.py # assess_site_readiness
β βββ assess_source.py # assess_source_code
β βββ suggest.py # suggest_migration_approach
β βββ recommend.py # recommend_target
β βββ install_script.py # generate_install_script
β βββ generate_adapter_arm.py # generate_adapter_arm_template
β βββ plan_deployment.py # plan_deployment
β βββ package.py # package_site
β βββ generate_settings.py # generate_migration_settings
β βββ confirm_migration.py # confirm_migration
β βββ migrate.py # migrate_sites
β
β
β # NOTE: scripts/ directory is NOT in this repo.
β # Users download PowerShell scripts from Microsoft:
β # https://appmigration.microsoft.com/api/download/psscripts/AppServiceMigrationScripts.zip
β # Then configure the path via configure_scripts_path tool.
β
βββ .github/agents/
βββ iis-migrate.agent.md # Orchestrator agent
βββ iis-discover.agent.md # Discovery subagent
βββ iis-assess.agent.md # Assessment subagent
βββ iis-recommend.agent.md # Recommendation subagent
βββ iis-deploy-plan.agent.md # Deployment planning subagent
βββ iis-execute.agent.md # Execution subagent