BotSharp/src/Infrastructure/BotSharp.OpenAPI/Controllers/McpController.cs

22 lines
533 B
C#
Raw Normal View History

2025-04-01 20:02:19 +00:00
using BotSharp.Abstraction.MCP.Models;
using BotSharp.Abstraction.MCP.Services;
namespace BotSharp.OpenAPI.Controllers;
public class McpController : ControllerBase
{
private readonly IServiceProvider _services;
public McpController(IServiceProvider services)
{
_services = services;
}
[HttpGet("/mcp/server-configs")]
2025-04-15 16:28:37 +00:00
public IEnumerable<McpServerOptionModel> GetMcpServerConfigs()
2025-04-01 20:02:19 +00:00
{
var mcp = _services.GetRequiredService<IMcpService>();
return mcp.GetServerConfigs();
}
}