Skip to content

Remove unnecessary DI registration for IMcpServerProvider instance#644

Merged
joshfree merged 1 commit intomicrosoft:mainfrom
anuchandy:no-need-provider-register
Oct 1, 2025
Merged

Remove unnecessary DI registration for IMcpServerProvider instance#644
joshfree merged 1 commit intomicrosoft:mainfrom
anuchandy:no-need-provider-register

Conversation

@anuchandy
Copy link
Copy Markdown
Member

What does this PR do?

[Provide a clear, concise description of the changes]

The CommandGroupServerProvider and RegistryServerProvider are instantiated by CommandGroupDiscoveryStrategy and RegistryDiscoveryStrategy during the discovery phase, so there’s no need to register these provider types with the DI container.

[Any additional context, screenshots, or information that helps reviewers]

GitHub issue number?

[Link to the GitHub issue this PR addresses]

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Updated command list in /docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Copy link
Copy Markdown
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 removes unnecessary dependency injection registrations for CommandGroupServerProvider and RegistryServerProvider classes that are directly instantiated by their respective discovery strategies rather than being resolved from the DI container.

  • Removed DI registrations for CommandGroupServerProvider and RegistryServerProvider

@joshfree
Copy link
Copy Markdown
Member

Can you add an entry to the CHANGELOG.md that passes the "drunk grandma" test?

@anuchandy anuchandy force-pushed the no-need-provider-register branch from a630c99 to 9b2aa4c Compare September 30, 2025 23:33
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Oct 1, 2025
@joshfree joshfree merged commit 3dee3c4 into microsoft:main Oct 1, 2025
26 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Oct 1, 2025
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants