.NET: Bump ModelContextProtocol from 1.1.0 to 1.2.0 (#3956)#6239
.NET: Bump ModelContextProtocol from 1.1.0 to 1.2.0 (#3956)#6239neerajkaram wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the .NET samples to use a centrally managed ModelContextProtocol package version, bumping it to 1.2.0 and removing a per-project override.
Changes:
- Bumped
ModelContextProtocolfrom1.1.0to1.2.0in central package management (Directory.Packages.props). - Removed the
VersionOverride="1.2.0"from the sample project so it inherits the centrally pinned version.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-McpTools/HostedMcpTools.csproj | Removes per-project version override to rely on central package versioning. |
| dotnet/Directory.Packages.props | Updates centrally managed ModelContextProtocol version to 1.2.0. |
|
@microsoft-github-policy-service agree |
|
The merge queue dropped this for 16 test failures that don't appear related to this PR: Azure Functions sample tests (12 failures) : all show the same DurableTask sample tests (4 failures): all give Happy to defer on next steps. Willing to rebase and re-queue once main CI is sorted, or to wait if there's already a fix in flight for either. |
Motivation and Context
Fixes #3956.
The
Agent_MCP_Server_Authsample currently fails with:Root cause is the trailing slash in the OAuth
resourceparameter (resource=http://localhost:7071/), tracked upstream inmodelcontextprotocol/csharp-sdk#1122and fixed in the 1.2.x line of the MCP C# SDK. This PR picks up that fix by bumping the centrally-managed package version.Description
Two small changes:
dotnet/Directory.Packages.props— bump centralModelContextProtocolpin from 1.1.0 to 1.2.0.dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-McpTools/HostedMcpTools.csproj— remove the now-redundantVersionOverride="1.2.0"so the central pin is the single source of truth.Why 1.2.0 and not 1.3.0:
ModelContextProtocol.Core 1.3.0transitively requiresMicrosoft.Extensions.*10.0.7 andMicrosoft.Extensions.AI.Abstractions10.5.2, neither of which are currently in the central pins. Coordinating those bumps is a larger change than #3956 asks for; happy to follow up in a separate PR.Breaking change check: The 1.2 line includes API breaks on
ProtectedResourceMetadata,ToolResultContentBlock,ListTasksResult, andDynamicClientRegistrationResponse. Greppeddotnet/for usages of all four — zero references, so this bump is non-breaking for this repo.Verification (local, macOS, .NET 10.0.8):
dotnet restore— cleandotnet build(Debug) — cleandotnet build -c Release— clean (Package Validation passes; no CP0001/CP0002)dotnet test tests/Microsoft.Agents.AI.Mcp.UnitTests -f net10.0— 20 passed, 0 failedNo regression test added; reproducing the original failure requires the upstream
TestOAuthServer+ProtectedMCPServerharness, and the fix itself is a pure dependency version bump.Contribution Checklist