Remove McpService and refactor dependency injection for MCP tools

- Deleted the McpService class, which was previously responsible for executing Model Context Protocol (MCP) tools.
- Updated the ApiBootstrap class to change the registration of IMcpService to the new Managing.Mcp.McpService implementation.
- Added new MCP tool implementations for DataTools, BotTools, and IndicatorTools to enhance functionality.
This commit is contained in:
2026-01-03 22:55:27 +07:00
parent 6f55566db3
commit 8ce7650bbf
12 changed files with 3234 additions and 238 deletions

View File

@@ -427,8 +427,19 @@ public static class ApiBootstrap
// LLM and MCP services
services.AddScoped<ILlmService, Managing.Application.LLM.LlmService>();
services.AddScoped<IMcpService, Managing.Application.LLM.McpService>();
services.AddScoped<IMcpService, Managing.Mcp.McpService>();
// MCP Tools (underlying implementations)
services.AddScoped<Managing.Mcp.Tools.BacktestTools>();
services.AddScoped<Managing.Mcp.Tools.DataTools>();
services.AddScoped<Managing.Mcp.Tools.BotTools>();
services.AddScoped<Managing.Mcp.Tools.IndicatorTools>();
// MCP Tool Wrappers (with tool definitions)
services.AddScoped<Managing.Mcp.McpTools.BacktestMcpTools>();
services.AddScoped<Managing.Mcp.McpTools.DataMcpTools>();
services.AddScoped<Managing.Mcp.McpTools.BotMcpTools>();
services.AddScoped<Managing.Mcp.McpTools.IndicatorMcpTools>();
return services;
}