Skip to content

Conversation

@wbreza
Copy link
Contributor

@wbreza wbreza commented Sep 25, 2025

What does this PR do?

When running in namespace mode or leveraging built in external servers like documentation and azd MCP features for sampling and elicitation are not enabled.

This PR correctly sets the sampling and elicitation capabilities when generating the MCP clients and forwards requests along to the original MCP host..

GitHub issue number?

Resolves #214

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)

@wbreza wbreza marked this pull request as ready for review September 25, 2025 21:31
@wbreza wbreza requested a review from a team as a code owner September 25, 2025 21:31
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 adds support for proxying MCP sampling and elicitation capabilities when child servers leverage these features. Previously, when running in namespace mode or using built-in external servers like documentation and azd, these MCP capabilities were not properly forwarded.

  • Consolidates client option creation logic into the base class
  • Adds proper capability forwarding for sampling and elicitation features
  • Includes comprehensive test coverage for the new functionality

Reviewed Changes

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

Show a summary per file
File Description
servers/Azure.Mcp.Server/CHANGELOG.md Documents the feature addition for version 0.8.3
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/BaseToolLoaderTests.cs Comprehensive test suite covering capability forwarding scenarios
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs Removes duplicate CreateClientOptions method
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs Removes duplicate CreateClientOptions method
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/BaseToolLoader.cs Adds shared CreateClientOptions method with capability forwarding logic

@wbreza wbreza linked an issue Sep 25, 2025 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure MCP Server Sep 25, 2025
@wbreza wbreza merged commit 9829234 into microsoft:main Sep 26, 2025
26 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure MCP Server Sep 26, 2025
@wbreza wbreza deleted the proxy-mcp-capabilities branch September 26, 2025 00:22
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Sep 27, 2025
…mpling or elicitation (microsoft#581)

When running in namespace mode or leveraging built in external servers like documentation and azd MCP features for sampling and elicitation are not enabled.

This PR correctly sets the sampling and elicitation capabilities when generating the MCP clients and forwards requests along to the original MCP host..
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.

Missing capability support when starting child server. Ensure sampling support is still working in supported clients when running in namespace mode

2 participants