Closed
Description
Describe the bug
configuring the AspNetCoreSseServer sample for PublishAot causes default json serialization to not allow reflection which breaks the tool descriptor generation. This causes the app to thrown exception on launch
To Reproduce
Steps to reproduce the behavior:
- Open sln
- Set AspNetCoreSseServer sample project as startup project
- Launch under debugger
Exception is thrown:
System.NotSupportedException: 'JsonTypeInfo metadata for type 'ModelContextProtocol.Server.IMcpServer' was not provided by TypeInfoResolver of type 'Microsoft.Extensions.AI.AIJsonUtilities+JsonContext'.
Expected behavior
Server launches