BotSharp/src/Infrastructure/BotSharp.OpenAPI/Controllers/McpController.cs
2025-05-15 17:46:36 -05:00

22 lines
556 B
C#

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")]
public async Task<IEnumerable<McpServerOptionModel>> GetMcpServerConfigs()
{
var mcp = _services.GetRequiredService<IMcpService>();
return await mcp.GetServerConfigsAsync();
}
}