-
Notifications
You must be signed in to change notification settings - Fork 356
Update ModelContextProtocol to latest #1501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also bump Microsoft.Extensions.* to latest.
27100fa to
206a509
Compare
There was a problem hiding this 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 updates the ModelContextProtocol dependency from 0.4.0-preview.3 to 0.6.0-preview.1 (note: PR description mentions 0.5.0-preview.1 but actual version is 0.6.0-preview.1) and updates several Microsoft.Extensions.* packages from version 10.0.1 to 10.0.2. The changes adapt the codebase to breaking API changes in the ModelContextProtocol library.
Changes:
- Updated ModelContextProtocol and ModelContextProtocol.AspNetCore packages to 0.6.0-preview.1
- Updated Microsoft.Extensions.* packages (AI, Caching, Configuration, DependencyInjection, Hosting) to their latest versions (10.0.2 or 10.2.0)
- Updated System.* packages to version 10.0.2
- Adapted code to API changes:
IReadOnlyDictionary→IDictionaryfor tool arguments,Contentproperty now a collection, added requiredMaxTokensproperty, and renamedSetLoggingLevel→SetLoggingLevelAsync
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Directory.Packages.props | Updated ModelContextProtocol packages to 0.6.0-preview.1 and bumped Microsoft.Extensions.* and System.* packages to latest versions; reorganized Microsoft.CognitiveServices.Speech package location |
| core/Azure.Mcp.Core/src/Commands/CommandExtensions.cs | Changed parameter type from IReadOnlyDictionary<string, JsonElement> to IDictionary<string, JsonElement> to match updated ModelContextProtocol API |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/BaseToolLoader.cs | Updated to use IDictionary instead of IReadOnlyDictionary for tool arguments |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs | Changed TransformArgumentsToDictionary method signature to accept IDictionary instead of IReadOnlyDictionary |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs | Updated method signatures, added MaxTokens property to sampling requests, changed Content to collection syntax, updated content access pattern, and added named cancellationToken parameter |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs | Applied same API updates as NamespaceToolLoader: collection-based Content, MaxTokens addition, and updated content access pattern |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs | Applied consistent API updates including collection-based Content, MaxTokens property, and updated sampling response handling |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/*.cs | Updated test helper methods to use IDictionary instead of IReadOnlyDictionary for consistency with production code |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/BaseToolLoaderTests.cs | Updated test to use collection syntax for Content property and added required MaxTokens field |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.LiveTests/ClientToolTests.cs | Renamed method call from SetLoggingLevel to SetLoggingLevelAsync to match updated API |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs | Updated test helper method signature to use IDictionary instead of IReadOnlyDictionary |
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs
Outdated
Show resolved
Hide resolved
950eb64 to
28671a3
Compare
What does this PR do?
Updates ModelContextProtocol dependency to 0.6.0-preview.1. Also bump Microsoft.Extensions.* to latest.