@@ -13,17 +13,31 @@ interface MCPServerInfo {
1313
1414interface MCPFilePath {
1515 filePath : string
16- type : 'local' | 'global' ,
16+ type : 'local' | 'global'
17+ parsable ?: boolean
1718 servers ?: MCPServerInfo [ ]
1819}
1920
2021interface MCPFileGroups {
2122 name : string
2223 friendlyName : string
2324 paths : MCPFilePath [ ]
25+ stats ?: {
26+ serversCount ?: number
27+ }
28+ }
29+
30+ interface MCPFileGroupsResult {
31+ name : string
32+ friendlyName : string
33+ paths : MCPFilePath [ ]
34+ stats : {
35+ serversCount ?: number
36+ }
2437}
2538
2639type MCPFilePathGroupsRecord = Record < string , MCPFileGroups >
40+ type MCPFileGroupsResultRecord = Record < string , MCPFileGroupsResult >
2741
2842export class MCPFiles {
2943 private mcpFilePathGroups : MCPFilePathGroupsRecord = {
@@ -48,8 +62,8 @@ export class MCPFiles {
4862 this . mcpFilePathGroups = mcpFilePathGroups || this . mcpFilePathGroups
4963 }
5064
51- async findFiles ( ) : Promise < T > {
52- const mcpFilesPathsData = { }
65+ async findFiles ( ) : Promise < MCPFileGroupsResultRecord > {
66+ const mcpFilesPathsData : MCPFileGroupsResultRecord = { }
5367
5468 for ( const groupName of Object . keys ( this . mcpFilePathGroups ) ) {
5569 const clientsGroup = this . mcpFilePathGroups [ groupName ]
@@ -73,7 +87,14 @@ export class MCPFiles {
7387 const mcpServersFromConfig = await MCPConfigLinter . getMCPServers ( )
7488 // let's iterate over the mcpServer Record and access the server objects
7589 for ( const serverName of Object . keys ( mcpServersFromConfig ) ) {
76- const serverConfig = { ...mcpServersFromConfig [ serverName ] , name : serverName }
90+ const serverConfigRaw = mcpServersFromConfig [ serverName ] as any
91+ const serverConfig = {
92+ name : serverName ,
93+ command : serverConfigRaw . command || '' ,
94+ args : serverConfigRaw . args ,
95+ transport : serverConfigRaw . transport ,
96+ env : serverConfigRaw . env
97+ }
7798 const MCPServerManager = new MCPServerManagerService ( serverConfig )
7899
79100 mcpServersData . push ( {
0 commit comments