Add support for ENABLE_REMOTE compilation constant to include remote functionality only in non-trimmed builds#1008
Merged
joshfree merged 5 commits intomicrosoft:feature/2.0beta-remotefrom Oct 30, 2025
Conversation
8075fbd to
abccad5
Compare
abccad5 to
d552bc9
Compare
joshfree
approved these changes
Oct 30, 2025
Member
joshfree
left a comment
There was a problem hiding this comment.
Please add a CHANGELOG entry under Other Changes
19 tasks
vukelich
added a commit
that referenced
this pull request
Nov 3, 2025
…servers (#1020) * Add remote HTTP server mode with OAuth authentication and downstream token acquisition. (#910) Add remote HTTP server mode with OAuth authentication and downstream token acquisition - Add RunAsRemoteHttpService and OutgoingAuthStrategy options to enable MCP server to run as a remote HTTP service - Introduce ITokenProvider abstraction for dependency injection of downstream authentication tokens and credentials - Add support for On-Behalf-Of (OBO) token flow and hosting environment identity modes for outgoing authentication - Implement OAuth Protected Resource Metadata endpoint at /.well-known/oauth-protected-resource with WWW-Authenticate challenge - Add Visual Studio and dotnet run launch profile for debugging remote MCP server with Microsoft.Identity.Web configuration - Modernize HTTP host creation using WebApplicationBuilder with authentication and authorization middleware * Update contributing guide for HTTP mode (#962) * Add support for ENABLE_REMOTE compilation constant to include remote functionality only in non-trimmed builds (#1008) * Exclude Obo roots when building in trim mode given the AOT violations in Obo apis * Use aot safe apis for incoming auth * unblock template cli, fix CreateArmClientAsync_CreatesAndUsesCachedClient * dotnet format * Define ENABLE_REMOTE build property for untrimmed build * Require non-null ITenantService parameter to BaseAzureService to ensure all derived types can make authenticated Azure calls always. Fixes product, live tests, and unit tests. (#1029) Require non-null ITenantService parameter to BaseAzureService to ensure all derived types can make authenticated Azure calls always. Fixes product, live tests, and unit tests. * Update contributing guide and troubleshooting guide to address PR comments (#1005) * Update contributing guide and troubleshooting guide to address PR comments * move launchSettings instructions to wiki * minor update * update doc * address pr comments * change endpoint placeholder --------- Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com> Co-authored-by: Anu Thomas <anuamd@hotmail.com>
colbytimm
pushed a commit
to colbytimm/microsoft-mcp
that referenced
this pull request
Dec 8, 2025
…servers (microsoft#1020) * Add remote HTTP server mode with OAuth authentication and downstream token acquisition. (microsoft#910) Add remote HTTP server mode with OAuth authentication and downstream token acquisition - Add RunAsRemoteHttpService and OutgoingAuthStrategy options to enable MCP server to run as a remote HTTP service - Introduce ITokenProvider abstraction for dependency injection of downstream authentication tokens and credentials - Add support for On-Behalf-Of (OBO) token flow and hosting environment identity modes for outgoing authentication - Implement OAuth Protected Resource Metadata endpoint at /.well-known/oauth-protected-resource with WWW-Authenticate challenge - Add Visual Studio and dotnet run launch profile for debugging remote MCP server with Microsoft.Identity.Web configuration - Modernize HTTP host creation using WebApplicationBuilder with authentication and authorization middleware * Update contributing guide for HTTP mode (microsoft#962) * Add support for ENABLE_REMOTE compilation constant to include remote functionality only in non-trimmed builds (microsoft#1008) * Exclude Obo roots when building in trim mode given the AOT violations in Obo apis * Use aot safe apis for incoming auth * unblock template cli, fix CreateArmClientAsync_CreatesAndUsesCachedClient * dotnet format * Define ENABLE_REMOTE build property for untrimmed build * Require non-null ITenantService parameter to BaseAzureService to ensure all derived types can make authenticated Azure calls always. Fixes product, live tests, and unit tests. (microsoft#1029) Require non-null ITenantService parameter to BaseAzureService to ensure all derived types can make authenticated Azure calls always. Fixes product, live tests, and unit tests. * Update contributing guide and troubleshooting guide to address PR comments (microsoft#1005) * Update contributing guide and troubleshooting guide to address PR comments * move launchSettings instructions to wiki * minor update * update doc * address pr comments * change endpoint placeholder --------- Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com> Co-authored-by: Anu Thomas <anuamd@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR introduces conditional compilation support to exclude remote HTTP service functionality from trimmed builds of the Azure MCP Server.
When built with the
PublishTrimmed=trueoption (via-Trimmed), the server will not include remote functionalityWhen built with the
PublishTrimmed=falseoption (without-Trimmed), the server will include remote functionalityGitHub issue number?
[Link to the GitHub issue this PR addresses]Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationeng/scripts/Process-PackageReadMe.ps1. See Package README/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.md.\eng\scripts\Update-AzCommandsMetadata.ps1to update tool metadata in azmcp-commands.md (required for CI)ToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test prompts/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline