Add AspNetCoreSseServer sample (#81)

* Add AspNetCoreSseMcpTransport sample

* Fix build errors after rebase

* React to McpServerFactory changes

* Make Utf8JsonWriter non thread static

* Fix test errors caused by not rebasing the HttpLister changes on factory overhaul commit
This commit is contained in:
Stephen Halter 2025-03-18 03:56:44 -07:00 • committed by GitHub
commit 90dfc35fbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,7 @@ Log.Logger = new LoggerConfiguration()
rollingInterval: RollingInterval.Day,
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}")
.WriteTo.Debug()
.WriteTo.Console()
.WriteTo.Console(standardErrorFromLevel: Serilog.Events.LogEventLevel.Verbose)
.CreateLogger();
try
@ -19,8 +19,7 @@ try
builder.Services.AddSerilog();
builder.Services.AddMcpServer()
.WithStdioServerTransport()
.WithTools()
.WithCallToolHandler((r, ct) => Task.FromResult(new McpDotNet.Protocol.Types.CallToolResponse()));
.WithTools();
var app = builder.Build();