Skip to content

[MCP] Added Support for MCP Prompts #28408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: dev/mcp-server
Choose a base branch
from
Open

Conversation

notyashhh
Copy link
Member

@notyashhh notyashhh commented Aug 18, 2025

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@Copilot Copilot AI review requested due to automatic review settings August 18, 2025 06:13
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

@Copilot 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 adds comprehensive support for Model Context Protocol (MCP) prompts to the Azure PowerShell repository. It introduces a complete MCP server implementation that provides specialized tools for generating and managing Azure PowerShell modules using AutoRest, including automated workflow prompts for partner module generation.

Key changes include:

  • Implementation of a TypeScript-based MCP server with tools for AutoRest code generation
  • Addition of prompt templates for autonomous partner module workflow generation
  • Support for polymorphism handling, model management, and YAML configuration manipulation

Reviewed Changes

Copilot reviewed 15 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/Mcp/tsconfig.json TypeScript configuration for ES2022 targeting with Node18 module system
tools/Mcp/package.json Node.js package definition with MCP SDK dependencies and build scripts
tools/Mcp/src/index.ts Main entry point that initializes the MCP server with stdio transport
tools/Mcp/src/CodegenServer.ts Core MCP server implementation handling tools, prompts, and responses
tools/Mcp/src/types.ts TypeScript type definitions for tool schemas, prompts, and YAML content
tools/Mcp/src/services/toolsService.ts Service implementing AutoRest code generation and model management tools
tools/Mcp/src/services/promptsService.ts Service handling prompt generation and parameter validation
tools/Mcp/src/services/utils.ts Utility functions for YAML processing, swagger handling, and file operations
tools/Mcp/src/specs/specs.json JSON specification defining available tools and prompts with parameters
tools/Mcp/src/specs/responses.json Response templates for tool outputs and prompt responses
tools/Mcp/src/specs/prompts/partner-module-workflow.md Detailed workflow instructions for autonomous partner module generation
tools/Mcp/test/vscode/mcpprompt.md Test prompt file with partner module workflow instructions
tools/Mcp/test/README.md Example AutoRest configuration for DataCollectionRule module
tools/Mcp/README.md Comprehensive documentation for the MCP server setup and usage
src/Maps/Maps.Autorest/test/utils.ps1 Minor whitespace cleanup removing trailing empty line
Files not reviewed (1)
  • tools/Mcp/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)



export async function testCase() {
const polymorphism = await getExamplesFromSpecs("d:\\workspace\\azure-powershell\\src\\VMware\\VMware.Autorest");
Copy link
Preview

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

The testCase function and multiple empty lines should be removed from production code. This appears to be leftover development/debugging code that shouldn't be committed.

Suggested change
const polymorphism = await getExamplesFromSpecs("d:\\workspace\\azure-powershell\\src\\VMware\\VMware.Autorest");

Copilot uses AI. Check for mistakes.

@notyashhh notyashhh changed the base branch from main to dev/mcp-server August 18, 2025 07:21
@VeryEarly VeryEarly self-assigned this Aug 19, 2025
//TODO: add log
return this._mcp.server.elicitInput(params, options);
}
// Placeholder for future elicitInput when SDK exposes it
Copy link
Collaborator

Choose a reason for hiding this comment

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

it worked and had been tested, please revert these changes

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried and kept getting errors in my local....do I need to install anything for that?

} catch (error) {
console.error(`Error eliciting input for example ${name}:`, error);
}
// Interactive elicitInput flow is disabled pending SDK support.
Copy link
Collaborator

Choose a reason for hiding this comment

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

it worked and had been tested, please revert these changes

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.

2 participants