Update ModelContextProtocol to 2.2.0 - #20045
Update ModelContextProtocol to 2.2.0#20045Jose Perez Rodriguez (joperezr) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20045Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20045" |
Tests selectorSelects the full PR test matrix + all PR-gated jobs (ALL) — a rule matching 'Directory.Packages.props' selects ALL Advisory workflow impact (4)
Selection computed for commit |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The deployment fixture remains pinned to 1.1.0, and the documented malformed-tool behavior lacks focused coverage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 2
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
Directory.Packages.props — Cover malformed tool discovery under SDK 2.2 |
|
playground/FoundryAgents/DotNetHostedAgent/DotNetHostedAgent.csproj — Keep the deployment fixture on MCP 2.2 |
What changed in this PR
Updates ModelContextProtocol to 2.2.0 across centrally managed consumers.
Changes:
- Bumps the central package version from 1.3.0 to 2.2.0.
- Removes the Foundry playground’s 1.1.0 override.
| File | Description |
|---|---|
Directory.Packages.props |
Sets ModelContextProtocol 2.2.0 centrally. |
playground/FoundryAgents/DotNetHostedAgent/DotNetHostedAgent.csproj |
Uses the central package version. |
| <PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="5.0.0-rc.6.26241.1" /> | ||
| <PackageVersion Include="Milvus.Client" Version="2.3.0-preview.1" /> <!-- No stable release available --> | ||
| <PackageVersion Include="ModelContextProtocol" Version="1.3.0" /> | ||
| <PackageVersion Include="ModelContextProtocol" Version="2.2.0" /> |
| <PackageReference Include="Microsoft.Agents.AI.Foundry.Hosting" VersionOverride="1.12.0-preview.260629.1" /> | ||
| <PackageReference Include="Microsoft.Extensions.AI" VersionOverride="10.7.0" /> | ||
| <PackageReference Include="ModelContextProtocol" VersionOverride="1.1.0" /> | ||
| <PackageReference Include="ModelContextProtocol" /> |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |

Description
Updates
ModelContextProtocolfrom 1.3.0 to 2.2.0 as a separate, rollbackable breaking-change PR rather than combining the major SDK migration with the bulk third-party dependency update.The package is consumed by the production Aspire CLI MCP server, the AppHost resource-MCP proxy, CLI tests, hosting tests, and the Foundry hosted-agent playground. The playground's
VersionOverride="1.1.0"is removed so it does not defeat the central 2.2.0 version. NoMicrosoft.Extensions.AI,Microsoft.Extensions.AI.OpenAI,OpenAI, or unrelated Foundry package versions are changed.The existing Aspire source compiles against 2.2.0 without API adaptations:
aspire agent mcpremains a stdio MCP server throughStdioMcpTransportFactory/StdioServerTransport.HttpClientTransport/McpClient.CreateAsyncfor tool discovery and invocation.Tool.InputSchema.Dependency restore resolved 2.2.0 from the approved
dotnet-publicfeed; no mirror pipeline was triggered.Breaking changes
Affected scenario: user-defined MCP servers attached to Aspire resources with
WithMcpServer(...), then discovered and invoked through the Aspire CLI MCP server.tools/listentry that omittedinputSchemaand supplied a default schema.Toolpayload to containinputSchema; malformed entries throw during deserialization. Aspire's AppHost discovery logs the failure and omits that resource's tools from the CLI tool list.Custom MCP servers and proxies must include an input schema for every tool. An empty object is sufficient for tools without arguments:
{ "name": "restart", "description": "Restarts the resource", "inputSchema": {} }A more descriptive schema remains preferred:
{ "name": "query", "description": "Runs a query", "inputSchema": { "type": "object", "properties": { "sql": { "type": "string" } }, "required": ["sql"] } }Compatibility assumptions and exclusions:
server/discoverfirst and fall back to the down-levelinitializehandshake when communicating with older servers; older compliant servers that includeinputSchemaremain supported.aspire agent mcp, because Aspire serves that endpoint over stdio, notHttpServerTransport.structuredContentbehavior does not change Aspire's built-in tool result shape. Resource MCP results continue to pass through the SDKCallToolResultover the AppHost backchannel.Rollback: revert the central package version to 1.3.0 and restore the Foundry playground's 1.1.0 override. No data or configuration migration is required.
Upstream references:
Test evidence
src/Aspire.Cli/Aspire.Cli.csproj,src/Aspire.Hosting/Aspire.Hosting.csproj, andplayground/FoundryAgents/DotNetHostedAgent/DotNetHostedAgent.csprojwith no warnings or errors.Microsoft.Extensions.AI10.7.0,Microsoft.Extensions.AI.OpenAI10.9.0,OpenAI2.12.0, andModelContextProtocol2.2.0.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?