Skip to content

Add Deploy mcp sub commands#7

Merged
mengyimicro merged 2 commits intomainfrom
users/mengyixu/AddDeployMcpCommands
Nov 14, 2025
Merged

Add Deploy mcp sub commands#7
mengyimicro merged 2 commits intomainfrom
users/mengyixu/AddDeployMcpCommands

Conversation

@mengyimicro
Copy link
Contributor

Add Deploy MCP subcommands and refactor deployment architecture

This commit introduces a modular deployment system for the Agent365 DevTools CLI
with separate subcommands for application and MCP tool permission deployment.

Key Features Added:

New Subcommands:

  • a365 deploy app - Deploy only application binaries to Azure App Service
  • a365 deploy mcp - Deploy/update only MCP server scopes and permissions
  • Enhanced main a365 deploy command now performs both operations sequentially

Architecture Improvements:

  • Refactored duplicate code into reusable helper methods:
    • ValidateDeploymentPrerequisitesAsync() - Common config/Azure validation
    • DeployApplicationAsync() - Application deployment logic
    • DeployMcpToolPermissionsAsync() - MCP permissions management
    • HandleDeploymentException() - Standardized error handling

MCP Integration:

  • Added OAuth2 permission grants management
  • Implemented inheritable permissions configuration
  • Added admin consent automation for agent identities
  • Integrated with toolingManifest.json for scope requirements

Enhanced User Experience:

  • Improved dry-run output with step-by-step preview
  • Better error messages and user guidance
  • Consistent logging and progress reporting across all deployment modes
  • Maintained backward compatibility with existing deployment workflows

Code Quality:

  • Eliminated ~60 lines of duplicated code
  • Improved maintainability and testability
  • Applied DRY principle throughout deployment logic
  • Enhanced error handling consistency

Copilot AI review requested due to automatic review settings November 14, 2025 06:07
@mengyimicro mengyimicro requested a review from a team as a code owner November 14, 2025 06:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a modular deployment system for the Agent365 DevTools CLI with separate subcommands for application and MCP tool permission deployment. The changes add a365 deploy app and a365 deploy mcp subcommands while maintaining backward compatibility with the main a365 deploy command that runs both operations sequentially.

Key Changes:

  • Added new GraphDeleteAsync and ReplaceOauth2PermissionGrantAsync methods to GraphApiService for OAuth2 permission management
  • Refactored DeployCommand to extract reusable helper methods (ValidateDeploymentPrerequisitesAsync, DeployApplicationAsync, DeployMcpToolPermissionsAsync)
  • Standardized logging bullet points from to - across multiple files for consistency

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/Microsoft.Agents.A365.DevTools.Cli/Services/GraphApiService.cs Added GraphDeleteAsync and ReplaceOauth2PermissionGrantAsync methods for OAuth2 permission grant management with delete-and-recreate semantics
src/Microsoft.Agents.A365.DevTools.Cli/Commands/DeployCommand.cs Refactored into main command and two subcommands (app, mcp) with extracted helper methods for deployment validation and execution
src/Microsoft.Agents.A365.DevTools.Cli/Services/A365SetupRunner.cs Updated logging bullet points from to - for consistency
src/Microsoft.Agents.A365.DevTools.Cli/Services/A365CreateInstanceRunner.cs Updated logging bullet points from to - and refined variable naming from "agent identity" to "agentic app"
src/Microsoft.Agents.A365.DevTools.Cli/Commands/SetupCommand.cs Updated logging bullet points from to - for consistency
src/Microsoft.Agents.A365.DevTools.Cli/Commands/CreateInstanceCommand.cs Updated comments and variable names to use "agentic app" terminology consistently
docs/commands/deploy.md Added comprehensive documentation for the deploy command and its new subcommands
docs/commands/config-init.md Updated example to use a365 deploy app instead of a365 deploy
README.md Added documentation for new a365 deploy app and a365 deploy mcp subcommands

sellakumaran
sellakumaran previously approved these changes Nov 14, 2025
@mengyimicro mengyimicro merged commit 14d882a into main Nov 14, 2025
2 checks passed
@pontemonti pontemonti deleted the users/mengyixu/AddDeployMcpCommands branch December 5, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants