microsoft / microsoft/GitHub-Copilot-for-Azure
Enhancement: Replace hardcoded App Service templates with MCP tool (apply #1949 pattern)
@apwestgarth is already working on this.
Since May 3, 2026.
- Dominant language
- Python
- Stars
- 250
- Forks
- 204
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 67
Description
Context
@manvkaur's PR #1949 replaced ~9,000 lines of hardcoded Azure Functions templates with dynamic MCP tool calls (functions_template_get), with a 3-tier fallback (CDN manifest → GitHub source → known-good Azure-Samples repos). This dramatically reduced context size and maintenance burden.
App Service should adopt the same pattern.
Scope
The App Service templates introduced in #1609 / PR #1635 currently hard-code:
- 21 files under
plugin/skills/azure-prepare/references/services/app-service/templates/ - ~1,995 lines of code (split across web-app.md, web-api.md, selection.md, composition.md, and recipe
source/{python,nodejs,dotnet}.mdfiles for auth/cosmos/redis/sql)
These could be replaced with an analogous app_service_template_get (or similar) MCP tool that fetches templates dynamically from Azure-Samples repos.
Proposed approach
- Source of truth — identify or create AZD templates in Azure-Samples for each base template (web-app, web-api) × language (Python/Node.js/.NET) × recipe (auth/cosmos/redis/sql)
- MCP tool — extend the Azure MCP server with
app_service_template_getmirroringfunctions_template_getsemantics (language,template,infrastructure, withfunctionFiles[]/projectFiles[]output arrays) - Fallback chain — same 3-tier pattern: CDN manifest → GitHub source → known-good repos
- Skill refactor — delete the hardcoded
source/{lang}.mdfiles; keep the orchestration files (composition.md, selection.md) with MCP tool guidance like Functions does - Eval coverage — add cross-language eval summaries proving templates work end-to-end
Why this isn't blocking PR #1635
PR #1635 ships proven, manually-curated templates that work today. The MCP tool approach requires:
- New MCP server endpoint
- New AZD templates published to Azure-Samples
- Awesome-AZD submissions for discoverability
These prerequisites take time. We don't want to delay shipping App Service Develop equity for an optimization that depends on cross-team work. Ship #1635 first, then layer this enhancement on top.
Reference
- PR #1949: https://github.com/microsoft/GitHub-Copilot-for-Azure/pull/1949
- Functions composition.md (post-MCP):
plugin/skills/azure-prepare/references/services/functions/templates/recipes/composition.md - Parent equity issue: #1608
- Source PR for App Service templates: #1635
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.