File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/ModelContextProtocol/Configuration Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 11using ModelContextProtocol . Server ;
22using Microsoft . Extensions . Options ;
3+ using Microsoft . Extensions . DependencyInjection . Extensions ;
34
45namespace Microsoft . Extensions . DependencyInjection ;
56
@@ -17,7 +18,7 @@ public static class McpServerServiceCollectionExtensions
1718 public static IMcpServerBuilder AddMcpServer ( this IServiceCollection services , Action < McpServerOptions > ? configureOptions = null )
1819 {
1920 services . AddOptions ( ) ;
20- services . AddTransient < IConfigureOptions < McpServerOptions > , McpServerOptionsSetup > ( ) ;
21+ services . TryAddEnumerable ( ServiceDescriptor . Transient < IConfigureOptions < McpServerOptions > , McpServerOptionsSetup > ( ) ) ;
2122 if ( configureOptions is not null )
2223 {
2324 services . Configure ( configureOptions ) ;
You can’t perform that action at this time.
0 commit comments