File tree Expand file tree Collapse file tree 5 files changed +20
-3
lines changed
BotSharp.Abstraction/MCP/Models Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 22
33var apiService = builder . AddProject < Projects . WebStarter > ( "apiservice" )
44 . WithExternalHttpEndpoints ( ) ;
5- var mcpService = builder . AddProject < Projects . BotSharp_PizzaBot_MCPServer > ( "mcpservice" )
6- . WithExternalHttpEndpoints ( ) ;
75
86builder . AddNpmApp ( "BotSharpUI" , "../../../BotSharp-UI" )
97 . WithReference ( apiService )
Original file line number Diff line number Diff line change @@ -12,6 +12,21 @@ public class McpServerConfigModel
1212 /// </summary>
1313 public string Name { get ; set ; } = null ! ;
1414
15+ /// <summary>
16+ /// Indicates whether this server is enabled.
17+ /// </summary>
18+ public bool Enabled { get ; set ; } = true ;
19+
20+ /// <summary>
21+ /// URL of the icon to display for this server.
22+ /// </summary>
23+ public string ? IconUrl { get ; set ; }
24+
25+ /// <summary>
26+ /// Short description of this server.
27+ /// </summary>
28+ public string ? Description { get ; set ; }
29+
1530 public McpSseServerConfig ? SseConfig { get ; set ; }
1631 public McpStdioServerConfig ? StdioConfig { get ; set ; }
1732}
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ namespace BotSharp.Abstraction.MCP.Models;
22
33public class McpServerOptionModel : IdName
44{
5+ public string ? IconUrl { get ; set ; }
6+ public string ? Description { get ; set ; }
57 public IEnumerable < string > Tools { get ; set ; } = [ ] ;
68
79 public McpServerOptionModel ( ) : base ( )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public McpClientManager(
2222 {
2323 var settings = _services . GetRequiredService < McpSettings > ( ) ;
2424 var config = settings . McpServerConfigs . Where ( x => x . Id == serverId ) . FirstOrDefault ( ) ;
25- if ( config == null )
25+ if ( config == null || ! config . Enabled )
2626 {
2727 return null ;
2828 }
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ public async Task<IEnumerable<McpServerOptionModel>> GetServerConfigsAsync()
3636 {
3737 Id = config . Id ,
3838 Name = config . Name ,
39+ IconUrl = config . IconUrl ,
40+ Description = config . Description ,
3941 Tools = tools . Select ( x => x . Name )
4042 } ) ;
4143 }
You can’t perform that action at this time.
0 commit comments