-
Notifications
You must be signed in to change notification settings - Fork 310
Update ModelContextProtocol to latest #1255
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
base: main
Are you sure you want to change the base?
Conversation
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 and related Microsoft.Extensions packages to their latest versions (0.4.1-preview.1 and 10.0.0 respectively), adapting the codebase to breaking API changes in the updated libraries.
- Updated 15+ package dependencies to latest versions
- Adapted to ModelContextProtocol's API changes from
IReadOnlyDictionarytoIDictionaryfor tool arguments - Updated sampling API to use collection-based content model with required
MaxTokensproperty
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| Directory.Packages.props | Updates package versions for ModelContextProtocol (0.4.1-preview.1), Microsoft.Extensions.* (10.0.0), System.* (10.0.0), and Azure AI packages |
| core/Azure.Mcp.Core/src/Commands/CommandExtensions.cs | Changes method signatures from IReadOnlyDictionary to IDictionary to match updated ModelContextProtocol API |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/BaseToolLoader.cs | Updates parameter type from IReadOnlyDictionary to IDictionary for API compatibility |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs | Changes private method signature to accept IDictionary instead of IReadOnlyDictionary |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs | Updates method signatures and adds required MaxTokens property; converts content to collection-based model |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs | Adds MaxTokens property and updates content model to use collections; updates content access pattern |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs | Adds MaxTokens property to sampling requests and updates content handling to collection-based API (2 locations) |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/BaseToolLoaderTests.cs | Updates test to match new API: adds MaxTokens property and converts content to collection syntax |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/ServerToolLoaderTests.cs | Updates test helper method signature from IReadOnlyDictionary to IDictionary |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/RegistryToolLoaderTests.cs | Updates test helper method signature from IReadOnlyDictionary to IDictionary |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/CompositeToolLoaderTests.cs | Updates test helper method signature from IReadOnlyDictionary to IDictionary |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs | Updates test helper method signature from IReadOnlyDictionary to IDictionary |
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs
Show resolved
Hide resolved
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs
Show resolved
Hide resolved
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs
Show resolved
Hide resolved
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs
Show resolved
Hide resolved
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs
Show resolved
Hide resolved
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs
Show resolved
Hide resolved
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs
Show resolved
Hide resolved
...Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/BaseToolLoaderTests.cs
Show resolved
Hide resolved
d9fe226 to
7f4f1c6
Compare
|
Waiting on #1221... |
|
#1221 has a number of issues we have to work through with new AOT/Trimming errors that don't reproduce on the current 10-RC build we shipped with. It'll be a few days. |
7f4f1c6 to
85a59ab
Compare
Updates to the latest build of ModelContextProtocol and related assemblies.