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:
parent
b5a26e4c33
commit
90dfc35fbd
1 changed files with 635 additions and 332 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue