File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ using Microsoft.Extensions.Logging;
9595using ModelContextProtocol .Server ;
9696using System .ComponentModel ;
9797
98- var builder = Host .CreateEmptyApplicationBuilder ( settings : null );
98+ var builder = Host .CreateApplicationBuilder ( args );
9999builder .Logging .AddConsole (consoleLogOptions =>
100100{
101101 // Configure all logs to go to stderr
Original file line number Diff line number Diff line change 55using ModelContextProtocol . Client ;
66using ModelContextProtocol . Protocol . Transport ;
77
8- var builder = Host . CreateEmptyApplicationBuilder ( settings : null ) ;
8+ var builder = Host . CreateApplicationBuilder ( args ) ;
99
1010builder . Configuration
1111 . AddEnvironmentVariables ( )
Original file line number Diff line number Diff line change 11using Microsoft . Extensions . DependencyInjection ;
22using Microsoft . Extensions . Hosting ;
3+ using Microsoft . Extensions . Logging ;
34using System . Net . Http . Headers ;
45
5- var builder = Host . CreateEmptyApplicationBuilder ( settings : null ) ;
6+ var builder = Host . CreateApplicationBuilder ( args ) ;
67
78builder . Services . AddMcpServer ( )
89 . WithStdioServerTransport ( )
910 . WithToolsFromAssembly ( ) ;
1011
12+ builder . Logging . AddConsole ( options =>
13+ {
14+ options . LogToStandardErrorThreshold = LogLevel . Trace ;
15+ } ) ;
16+
1117builder . Services . AddSingleton ( _ =>
1218{
1319 var client = new HttpClient ( ) { BaseAddress = new Uri ( "https://api.weather.gov" ) } ;
You can’t perform that action at this time.
0 commit comments