-
Notifications
You must be signed in to change notification settings - Fork 4k
[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
base: dev/mcp-server
Are you sure you want to change the base?
Conversation
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this 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)
tools/Mcp/src/services/utils.ts
Outdated
|
||
|
||
export async function testCase() { | ||
const polymorphism = await getExamplesFromSpecs("d:\\workspace\\azure-powershell\\src\\VMware\\VMware.Autorest"); |
There was a problem hiding this comment.
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.
const polymorphism = await getExamplesFromSpecs("d:\\workspace\\azure-powershell\\src\\VMware\\VMware.Autorest"); |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
//TODO: add log | ||
return this._mcp.server.elicitInput(params, options); | ||
} | ||
// Placeholder for future elicitInput when SDK exposes it |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.