20 lines
430 B
C#
20 lines
430 B
C#
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
const int BIND_PORT = 5050;
|
|
|
|
builder.Services
|
|
.AddMcpServer()
|
|
.WithHttpTransport()
|
|
.WithToolsFromAssembly();
|
|
builder.WebHost.ConfigureKestrel(options => options.ListenAnyIP(BIND_PORT));
|
|
//builder.Services.AddHttpLogging(o => { });
|
|
var app = builder.Build();
|
|
// var logger = app.Logger;
|
|
//app.UseHttpLogging();
|
|
app.UseRequestBodyLogging();
|
|
|
|
app.MapMcp();
|
|
|
|
app.Run();
|
|
|