Update MCP packages to 1.0.0 and bump all .NET 10.0 packages to 10.0.3#14786
Update MCP packages to 1.0.0 and bump all .NET 10.0 packages to 10.0.3#14786JamesNK merged 5 commits intorelease/13.2from
Conversation
- Update ModelContextProtocol and ModelContextProtocol.AspNetCore from 0.8.0-preview.1 to 1.0.0 - Update Microsoft.Extensions.* transitive dependencies from 10.0.2 to 10.0.3 - Migrate AddListToolsFilter/AddCallToolFilter to WithRequestFilters API Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
MCP 1.0.0 requires an initialize handshake before other requests. Updated tests to properly initialize the MCP session first. Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
|
@copilot Update all the .NET 10.0 Package Versions from 10.0.2 to 10.0.3 |
Updates EF Core, ASP.NET Core, Runtime, and other .NET 10.0 packages in eng/Versions.props from 10.0.2 to 10.0.3. Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
Done in caaa395. Updated all 21 remaining .NET 10.0 package versions from 10.0.2 to 10.0.3 in |
|
@copilot Why doesn't CallService_McpEndPoint_RequiredApiKeySent_Success use InitializeSessionAsync to reduce code duplicaiton? |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14786Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14786" |
There was a problem hiding this comment.
Pull request overview
This PR updates the ModelContextProtocol and ModelContextProtocol.AspNetCore packages from 0.8.0-preview.1 to the stable 1.0.0, and bumps all .NET 10.0 preview package versions from 10.0.2 to 10.0.3. It adapts the dashboard MCP integration to MCP 1.0.0's breaking API changes (filter registration pattern change, new Streamable HTTP session handshake requirement).
Changes:
- Package bumps: MCP packages to 1.0.0, .NET 10.0 packages to 10.0.3 in
eng/Versions.propsandDirectory.Packages.props. - MCP filter API migration: Migrate from
builder.AddListToolsFilter(...).AddCallToolFilter(...)tobuilder.WithRequestFilters(filters => filters.AddListToolsFilter(...).AddCallToolFilter(...))inMcpExtensions.cs. - Test updates: Add
InitializeSessionAsync/CreateInitializeRequesthelpers and update all integration tests to perform theinitialize→notifications/initializedhandshake before sendingtools/list, as required by MCP 1.0.0 Streamable HTTP.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
Directory.Packages.props |
Bumps ModelContextProtocol and ModelContextProtocol.AspNetCore to 1.0.0 |
eng/Versions.props |
Bumps MicrosoftExtensionsFileSystemGlobbingVersion and all .NET 10.0 package versions from 10.0.2 to 10.0.3 |
src/Aspire.Dashboard/Mcp/McpExtensions.cs |
Migrates filter registration from direct builder.AddListToolsFilter/AddCallToolFilter to builder.WithRequestFilters(...) per MCP 1.0.0 API |
tests/Aspire.Dashboard.Tests/Integration/McpServiceTests.cs |
Adds CreateInitializeRequest / InitializeSessionAsync helpers; updates all success-path tests to initialize a session before tools/list; CreateListToolsRequest now accepts an optional session ID |
tests/Aspire.Dashboard.Tests/Integration/StartupTests.cs |
Updates the shared-endpoint test to use InitializeSessionAsync before calling CreateListToolsRequest |
Add optional configureRequest callback to InitializeSessionAsync and use it in CallService_McpEndPoint_RequiredApiKeySent_Success to reduce code duplication. Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
Good catch — it should. Fixed in f4b1c7c. Added an optional |
#14786) Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Description
Updates
ModelContextProtocolandModelContextProtocol.AspNetCorefrom0.8.0-preview.1to1.0.0, and bumps all .NET 10.0 package versions from10.0.2to10.0.3.Package & dependency changes:
1.0.0inDirectory.Packages.props10.0.2→10.0.3ineng/Versions.props, including EF Core, ASP.NET Core, Runtime, and other .NET 10.0 packages (Microsoft.Extensions.FileSystemGlobbing,Microsoft.EntityFrameworkCore.*,Microsoft.AspNetCore.*,Microsoft.Extensions.*,System.Text.Json,System.Formats.Asn1)Breaking API migration:
AddListToolsFilter/AddCallToolFilterremoved fromIMcpServerBuilder— migrated toWithRequestFilters(filters => ...)pattern inMcpExtensions.cs:Test updates:
initializerequests without a session ID (returns 400). Updated Dashboard integration tests to perform theinitialize→notifications/initializedhandshake before sendingtools/listrequests.InitializeSessionAsyncto accept an optionalAction<HttpRequestMessage>? configureRequestcallback, and updatedCallService_McpEndPoint_RequiredApiKeySent_Successto use it instead of duplicating the handshake code inline.Checklist
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.