Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
e1e3c8b
onboard code to cloud tools
qianwens Jul 17, 2025
a9215a5
fix source analysis errors
qianwens Jul 17, 2025
56a2c39
rename iac command (#6)
xfz11 Jul 18, 2025
60df1dc
update deployment plan template
xfz11 Jul 18, 2025
31f564b
Merge branch 'main' of https://github.com/Azure/azure-mcp into qianwe…
qianwens Jul 21, 2025
9ad1104
Merge branch 'qianwen/deploy' of https://github.com/qianwens/azure-mc…
qianwens Jul 21, 2025
3043492
fix comments
qianwens Jul 21, 2025
0d0fd57
Merge branch 'main' of https://github.com/Azure/azure-mcp into qianwe…
qianwens Jul 23, 2025
efd49fd
fix the build error and refine the plan template
qianwens Jul 23, 2025
5132545
refine the template
qianwens Jul 23, 2025
b4884c6
add quota group (#9)
xfz11 Jul 23, 2025
969c18e
[GenerateArchitectureDiagramCommand] Fix and AKS support (#8)
wchigit Jul 24, 2025
23aa942
fix the iac-rules-get tool name in e2etestprompt.md
qianwens Jul 24, 2025
a144fe8
Refactor: extract prompt to md file (#10)
xfz11 Jul 28, 2025
458cec4
clean code (#11)
xfz11 Jul 28, 2025
52853c5
add deploy command in md and fix analyze error
qianwens Jul 30, 2025
8dda05b
Some fix according to e2e test (#12)
xfz11 Jul 30, 2025
daaaaf0
Merge branch 'main' of https://github.com/Azure/azure-mcp into qianwe…
qianwens Jul 30, 2025
d8e05ff
Refactor deploy&quota to project
qianwens Jul 31, 2025
413e18c
fix test failure
qianwens Jul 31, 2025
b7a04d8
Add sub command description to goup description
qianwens Jul 31, 2025
45277a3
Merge branch 'main' into qianwen/deploy
g2vinay Aug 1, 2025
85a14e8
update description based on comment
qianwens Aug 1, 2025
985757f
fix live test (#13)
xfz11 Aug 1, 2025
62b66fc
update cspell (#14)
xfz11 Aug 1, 2025
05c498f
Merge branch 'main' of https://github.com/Azure/azure-mcp into qianwe…
qianwens Aug 4, 2025
c1e5f7c
force to save plan to file (#15)
xfz11 Aug 4, 2025
a818e5c
Merge branch 'main' of https://github.com/Azure/azure-mcp into qianwe…
qianwens Aug 5, 2025
b6780fd
update plan command description
qianwens Aug 5, 2025
0215c92
Add PR guidance document
jongio Aug 6, 2025
8cc169c
Add test scenarios
jongio Aug 6, 2025
7516979
aot safe refactoring and update template md (#16)
xfz11 Aug 6, 2025
eac6693
move app topology definition to resource file and update the command …
qianwens Aug 6, 2025
fe1f8e2
update test result - not completed
qianwens Aug 6, 2025
5b1ef33
update test result
qianwens Aug 7, 2025
83ddd29
reorganize file folders (#17)
xfz11 Aug 8, 2025
a7c9190
update the command names in md file
qianwens Aug 8, 2025
3f5030c
Merge branch 'main' of https://github.com/Azure/azure-mcp into qianwe…
qianwens Aug 8, 2025
d675ae0
Add code review report for PR #626 on Deploy and Quota commands
jongio Aug 8, 2025
0d2b738
fix the comments in code review report
qianwens Aug 11, 2025
b8e2afd
Merge branch 'main' of https://github.com/Azure/azure-mcp into qianwe…
qianwens Aug 11, 2025
0083cc6
remove code review doc
qianwens Aug 11, 2025
f3cd8a6
fix test failure
qianwens Aug 11, 2025
4c69f5a
Add code review report for PR #626 addressing deploy and quota commands
jongio Aug 11, 2025
c1a2e05
Add manual testing plan and update documentation checklist for PR #626
jongio Aug 11, 2025
d1077f4
update action plan and add invalid json test case
qianwens Aug 12, 2025
a0667a4
feat: Add comprehensive unit tests for quota commands (#19)
xfz11 Aug 12, 2025
2066752
lint (#20)
xfz11 Aug 12, 2025
04759ed
Chentony/mermaid response refactor (#21)
Tonychen0227 Aug 12, 2025
4c76942
fix cspell errors
qianwens Aug 12, 2025
9e42001
Mermaid generation: Fix </br> hallucination, fix copilotmd file targe…
Tonychen0227 Aug 12, 2025
3f49516
feat: Add remaining work items for Deploy & Quota command areas
jongio Aug 12, 2025
7e5748b
feat: Add test execution log section to Manual Testing Plan for Copil…
jongio Aug 12, 2025
113c657
Xf/updatecomm2 (#23)
xfz11 Aug 14, 2025
1eeee74
update the remaining work
qianwens Aug 14, 2025
916181b
fix parser (#24)
wchigit Aug 15, 2025
945c17b
update remaining work
qianwens Aug 15, 2025
768c480
Adds document describing tool organization tasks
wbreza Aug 15, 2025
902ac6e
Updated organization task priorities
wbreza Aug 15, 2025
c622064
Add 32 character max for resource names (#25)
Tonychen0227 Aug 18, 2025
b18b209
Merge branch 'qianwen/deploy' of https://github.com/qianwens/azure-mc…
qianwens Aug 18, 2025
2f6cb70
fix build error and comments
qianwens Aug 18, 2025
a0fa189
remove image
qianwens Aug 18, 2025
6e8ef4b
Merge branch 'main' into qianwen/deploy
jongio Aug 18, 2025
6c9edd0
Update Directory.Packages.props
g2vinay Aug 18, 2025
43b70f7
Update cspell.json
g2vinay Aug 18, 2025
58104c0
Merge branch 'main' of https://github.com/Azure/azure-mcp into qianwe…
qianwens Aug 19, 2025
5bfc795
Update sign-and-pack.yml
g2vinay Aug 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@
# ServiceLabel: %area-Authorization
# ServiceOwners: @vurhanau

# PRLabel: %area-Deploy
/src/Areas/Deploy/ @qianwens @xiaofanzhou @Azure/azure-mcp

# ServiceLabel: %area-Deploy
# ServiceOwners: @qianwens @xiaofanzhou

# PRLabel: %area-LoadTesting
/src/Areas/LoadTesting/ @nishtha489 @knarayanana @krchanda @johnsta @Azure/azure-mcp

Expand Down
72 changes: 62 additions & 10 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,44 @@
"alcoop",
"Apim",
"appconfig",
"appservice",
"azapi",
"azmcp",
"azuremcp",
"azsdk",
"aztfmod",
"aztfmod",
"azureaisearch",
"azureaiservices",
"azureapplicationinsights",
"azureappservice",
"azureblob",
"azurebotservice",
"azurecacheforredis",
"azurecaf",
"azurecontainerapp",
"azurecosmosdb",
"azurecosmosdb",
"azuredatabaseformysql",
"azuredatabaseforpostgresql",
"azuredocs",
"azurefunctions",
"azurekeyvault",
"azuremcp",
"azuresdk",
"azuretools",
"azureopenai",
"azureprivateendpoint",
"azureresourcegroups",
"azurerm",
"azuresdk",
"azureservicebus",
"azuresignalrservice",
"azuresqldatabase",
"azurestaticwebapps",
"azurestorage",
"azurestorageaccount",
"azureterraformbestpractices",
"azuretools",
"azurevirtualnetwork",
"azurewebpubsub",
"azurefunctions",
"codegen",
"codeium",
Expand All @@ -181,14 +210,21 @@
"bestpractices",
"bicepschema",
"breathability",
"codesign",
"cicd",
"codeium",
"CODEOWNERS",
"codesign",
"cognitiveservices",
"containerapp",
"containerapps",
"copilotmd",
"cslschema",
"cvzf",
"dataplane",
"datalake",
"datasource",
"datasources",
"dbforpostgresql",
"Distributedtask",
"drawcord",
"enumerables",
Expand All @@ -206,28 +242,41 @@
"loadtests",
"esrp",
"ESRPRELPACMANTEST",
"exfiltration",
"facetable",
"filefilters",
"functionapp",
"gethealth",
"healthmodels",
"hnsw",
"idtyp",
"jsonencode",
"kcsb",
"keyspace",
"keyvault",
"Kusto",
"Kusto",
"kvps",
"ligar",
"Linq",
"linkedservices",
"Linq",
"LINUXOS",
"LINUXPOOL",
"LINUXVMIMAGE",
"LLM",
"loadtest",
"loadtesting",
"loadtestrun",
"loadtests",
"MACOS",
"MACPOOL",
"MACVMIMAGE",
"midsole",
"monitoredresources",
"msal",
"myaccount",
"mysvc",
"mycluster",
"MACOS",
"MACPOOL",
"MACVMIMAGE",
"mysvc",
"Newtonsoft",
"Npgsql",
"npmjs",
Expand All @@ -253,13 +302,16 @@
"searchdocs",
"servicebus",
"setparam",
"siteextensions",
"skillset",
"syslib",
"skillsets",
"staticwebapp",
"submode",
"syslib",
"testresource",
"testrun",
"testsettings",
"tfvars",
"testfilesystem",
"timespan",
"toolsets",
Expand Down
10 changes: 10 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@
<PackageVersion Include="Azure.ResourceManager.OperationalInsights" Version="1.3.0" />
<PackageVersion Include="Azure.ResourceManager.Search" Version="1.2.3" />
<PackageVersion Include="Azure.ResourceManager.Storage" Version="1.4.2" />
<PackageVersion Include="Azure.ResourceManager.AppService" Version="1.4.0" />
<PackageVersion Include="Azure.ResourceManager.AppContainers" Version="1.4.0" />
<PackageVersion Include="Azure.ResourceManager.Resources" Version="1.11.0" />
<PackageVersion Include="Azure.ResourceManager" Version="1.13.1" />
<PackageVersion Include="Azure.ResourceManager.Compute" Version="1.10.0" />
<PackageVersion Include="Azure.ResourceManager.MachineLearning" Version="1.2.2" />
<PackageVersion Include="Azure.ResourceManager.Network" Version="1.11.1" />
<PackageVersion Include="Azure.ResourceManager.ContainerInstance" Version="1.2.1" />
<PackageVersion Include="Azure.ResourceManager.HDInsight" Version="1.2.0-beta.4" />
<PackageVersion Include="Azure.ResourceManager.Grafana" Version="1.1.1" />
<PackageVersion Include="Microsoft.Azure.Kusto.Data" Version="13.0.2" />
<PackageVersion Include="Microsoft.Identity.Client.Broker" Version="4.72.1" />
Expand All @@ -45,6 +54,7 @@
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.6" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Npgsql" Version="9.0.3" />
<PackageVersion Include="YamlDotNet" Version="16.3.0" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.Formats.Asn1" Version="9.0.6" />
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="8.11.0" />
Expand Down
15 changes: 15 additions & 0 deletions docs/azmcp-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,21 @@ azmcp azureterraformbestpractices get
azmcp bicepschema get --resource-type <resource-type> \
```

### Deploy
```bash
# Check the Azure quota availability for the resources type
azmcp deploy quota-check --subscription <subscription> \
--region <region> \
--resource-types <resource-types>

# Get the available regions for the resources types
azmcp deploy available-region-get --subscription <subscription> \
--resource-types <resource-types> \
[--cognitive-service-model-name <cognitive-service-model-name>] \
[--cognitive-service-model-version <cognitive-service-model-version>] \
[--cognitive-service-deployment-sku-name <cognitive-service-deployment-sku-name>]
```

## Response Format

All responses follow a consistent JSON format:
Expand Down
11 changes: 11 additions & 0 deletions e2eTests/e2eTestPrompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,14 @@ This file contains prompts used for end-to-end testing to ensure each tool is in
| Tool Name | Test Prompt |
|:----------|:----------|
| azmcp-bicepschema-get | How can I use Bicep to create an Azure OpenAI service? |

## Deploy
| Tool Name | Test Prompt |
|:----------|:----------|
| azmcp-deploy-plan-get | Create a plan to deploy this application to azure |
| azmcp-deploy-infra-code-rules-get | Show me the rules to generate bicep scripts |
| azmcp-deploy-available-region-get | Show me the available regions for these resource types <resource_types> |
| azmcp-deploy-quota-check | Check if there is quota for <resource_type> in region <region> |
| azmcp-deploy-azd-app-log-get | Show me the log of the application deployed by azd |
| azmcp-deploy-cicd-pipeline-guidance-get | How to create cicd pipeline to deploy this app to azure |
| azmcp-deploy-architecture-diagram-generate | Generate the azure architecture diagram for this application |
81 changes: 81 additions & 0 deletions src/Areas/Deploy/Commands/AzdAppLogGetCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using AzureMcp.Areas.Deploy.Options;
using AzureMcp.Areas.Deploy.Services;
using AzureMcp.Commands.Subscription;
using AzureMcp.Services.Telemetry;
using Microsoft.Extensions.Logging;

namespace AzureMcp.Areas.Deploy.Commands;

public sealed class AzdAppLogGetCommand(ILogger<AzdAppLogGetCommand> logger) : SubscriptionCommand<AzdAppLogOptions>()
{
private const string CommandTitle = "Get AZD deployed App Logs";
private readonly ILogger<AzdAppLogGetCommand> _logger = logger;

private readonly Option<string> _workspaceFolderOption = DeployOptionDefinitions.AzdAppLogOptions.WorkspaceFolder;
private readonly Option<string> _azdEnvNameOption = DeployOptionDefinitions.AzdAppLogOptions.AzdEnvName;
private readonly Option<int> _limitOption = DeployOptionDefinitions.AzdAppLogOptions.Limit;

public override string Name => "azd-app-log-get";

public override string Description =>
"""
This tool helps fetch logs from log analytics workspace for Container Apps, App Services, function apps that were deployed through azd. Invoke this tool directly after a successful `azd up` or when user prompts to check the app's status or provide errors in the deployed apps.
""";

public override string Title => CommandTitle;

protected override void RegisterOptions(Command command)
{
base.RegisterOptions(command);
command.AddOption(_workspaceFolderOption);
command.AddOption(_azdEnvNameOption);
command.AddOption(_limitOption);
}

protected override AzdAppLogOptions BindOptions(ParseResult parseResult)
{
var options = base.BindOptions(parseResult);
options.WorkspaceFolder = parseResult.GetValueForOption(_workspaceFolderOption)!;
options.AzdEnvName = parseResult.GetValueForOption(_azdEnvNameOption)!;
options.Limit = parseResult.GetValueForOption(_limitOption);
return options;
}

[McpServerTool(Destructive = false, ReadOnly = true, Title = CommandTitle)]
public override async Task<CommandResponse> ExecuteAsync(CommandContext context, ParseResult parseResult)
{
var options = BindOptions(parseResult);

try
{
if (!Validate(parseResult.CommandResult, context.Response).IsValid)
{
return context.Response;
}

context.Activity?.WithSubscriptionTag(options);

// Parse optional date parameters

var deployService = context.GetService<IDeployService>();
string result = await deployService.GetAzdResourceLogsAsync(
options.WorkspaceFolder!,
options.AzdEnvName!,
options.Subscription!,
options.Limit);

context.Response.Message = result;
}
catch (Exception ex)
{
_logger.LogError(ex, "An exception occurred getting azd app logs.");
HandleException(context, ex);
}

return context.Response;
}

}
40 changes: 40 additions & 0 deletions src/Areas/Deploy/Commands/Consts.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

namespace AzureMcp.Areas.Deploy.Commands;

public static class AzureServiceConstants
{
public enum AzureComputeServiceType
{
AppService,
FunctionApp,
ContainerApp,
StaticWebApp
}

public enum AzureServiceType
{
AzureAISearch,
AzureAIServices,
AppService,
AzureApplicationInsights,
AzureBotService,
AzureContainerApp,
AzureCosmosDB,
AzureFunctionApp,
AzureKeyVault,
AzureDatabaseForMySQL,
AzureOpenAI,
AzureDatabaseForPostgreSQL,
AzurePrivateEndpoint,
AzureRedisCache,
AzureSQLDatabase,
AzureStorageAccount,
StaticWebApp,
AzureServiceBus,
AzureSignalRService,
AzureVirtualNetwork,
AzureWebPubSub
}
}
28 changes: 28 additions & 0 deletions src/Areas/Deploy/Commands/DeployJsonContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System.Text.Json.Serialization;
using Areas.Deploy.Services.Util;
using AzureMcp.Areas.Deploy.Commands.Quota;
using AzureMcp.Areas.Deploy.Commands.Region;
using AzureMcp.Areas.Deploy.Models;
using AzureMcp.Areas.Deploy.Options;

namespace AzureMcp.Areas.Deploy.Commands;

[JsonSourceGenerationOptions(
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase,
PropertyNameCaseInsensitive = true,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
)]
[JsonSerializable(typeof(AppTopology))]
[JsonSerializable(typeof(MermaidData))]
[JsonSerializable(typeof(MermaidConfig))]
[JsonSerializable(typeof(QuotaCheckCommand.QuotaCheckCommandResult))]
[JsonSerializable(typeof(QuotaInfo))]
[JsonSerializable(typeof(Dictionary<string, List<QuotaInfo>>))]
[JsonSerializable(typeof(RegionCheckCommand.RegionCheckCommandResult))]
[JsonSerializable(typeof(List<string>))]
internal sealed partial class DeployJsonContext : JsonSerializerContext
{
}
Loading