csharp-sdk/docs/concepts/logging/samples/server/Program.cs
Mike Kistler 7cb3a64c06
Add articles on logging and progress (#717)
* Add articles on logging and progress
* Address comments in PR review
2025-08-25 20:51:41 -05:00

20 lines
441 B
C#

using Logging.Tools;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddMcpServer()
.WithHttpTransport(options =>
options.IdleTimeout = Timeout.InfiniteTimeSpan // Never timeout
)
.WithTools<LoggingTools>();
// .WithSetLoggingLevelHandler(async (ctx, ct) => new EmptyResult());
var app = builder.Build();
app.UseHttpsRedirection();
app.MapMcp();
app.Run();