Files
Alchegos.MCP/Program.cs
2025-05-04 19:11:12 +01:00

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();