using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using MoneyMap.Core; using MoneyMap.Mcp; using MoneyMap.Services; var builder = Host.CreateApplicationBuilder(args); builder.Logging.ClearProviders(); builder.Logging.AddConsole(options => options.LogToStandardErrorThreshold = LogLevel.Trace); builder.Services.AddMoneyMapCore(builder.Configuration); builder.Services.AddSingleton(); builder.Services .AddMcpServer() .WithStdioServerTransport() .WithToolsFromAssembly(typeof(Program).Assembly); var app = builder.Build(); await app.RunAsync();