using System; using System.ComponentModel; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.DependencyInjection; using ModelContextProtocol.Server; using System.Runtime.CompilerServices; namespace McpStudy.McpServerStdio { internal class Program { static async Task Main(string[] args) { try { var builder = Host.CreateApplicationBuilder(args); builder.Logging.AddConsole(options => { options.LogToStandardErrorThreshold = LogLevel.Trace; }); builder.Services .AddMcpServer() .WithStdioServerTransport() .WithToolsFromAssembly(typeof(McpStudy.Core.TimeTools).Assembly) .WithToolsFromAssembly(typeof(McpStudy.McpServerStdio.Program).Assembly); await builder.Build().RunAsync(); } catch (Exception e) { Console.WriteLine(e.Message); } finally { } } } }