diff --git a/src/Equibles.Mcp.Server/Program.cs b/src/Equibles.Mcp.Server/Program.cs index d4cd44a21..6b5f87994 100644 --- a/src/Equibles.Mcp.Server/Program.cs +++ b/src/Equibles.Mcp.Server/Program.cs @@ -84,6 +84,10 @@ public static void ConfigureServices(WebApplicationBuilder builder) builder.Services.Configure( builder.Configuration.GetSection("Embedding") ); + // EmbeddingClient resolves IHttpClientFactory unconditionally in its constructor, + // even when embeddings are disabled -- without this, any Sec search tool + // (ListCompanyDocuments, SearchDocuments, SearchCompanyDocuments) fails to activate. + builder.Services.AddHttpClient(); builder.Services.Configure( builder.Configuration.GetSection("FileStorage") );