ls-mcp 1.9.1 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.d.cts CHANGED
@@ -1,12 +1,21 @@
1
- interface MCPServerInfo {
1
+ interface MCPConfigData {
2
+ raw: any;
3
+ parsed: boolean;
4
+ valid: boolean;
5
+ servers: Record<string, MCPServerConfig>;
6
+ }
7
+ interface MCPServerConfig {
2
8
  name: string;
3
9
  command: string;
4
10
  args?: string[];
5
11
  transport?: 'stdio' | 'sse' | 'http';
6
- type?: 'sse' | 'http' | 'stdio';
7
- source?: string;
12
+ type?: 'sse' | 'http' | 'stdio' | 'streamable-http';
8
13
  env?: Record<string, string>;
9
- status?: 'running' | 'stopped';
14
+ }
15
+ interface MCPAppMetadata {
16
+ name: string;
17
+ friendlyName: string;
18
+ paths: MCPFilePath[];
10
19
  }
11
20
  interface MCPFilePath {
12
21
  filePath: string;
@@ -14,6 +23,17 @@ interface MCPFilePath {
14
23
  parsable?: boolean;
15
24
  servers?: MCPServerInfo[];
16
25
  }
26
+ interface MCPServerInfo {
27
+ name: string;
28
+ command: string;
29
+ args?: string[];
30
+ transport?: 'stdio' | 'sse' | 'http';
31
+ type?: 'sse' | 'http' | 'stdio' | 'streamable-http';
32
+ source?: string;
33
+ env?: Record<string, string>;
34
+ status?: 'running' | 'stopped';
35
+ credentials?: CredentialAnalysisResult;
36
+ }
17
37
  interface MCPFileGroups {
18
38
  name: string;
19
39
  friendlyName: string;
@@ -22,21 +42,63 @@ interface MCPFileGroups {
22
42
  serversCount?: number;
23
43
  };
24
44
  }
25
- interface MCPFileGroupsResult {
45
+ type MCPFileGroupsResultRecord = Record<string, MCPFileGroups>;
46
+ type MCPAppPathsRecord = Record<string, MCPFilePath[]>;
47
+ interface CredentialVariable {
26
48
  name: string;
27
- friendlyName: string;
28
- paths: MCPFilePath[];
29
- stats: {
30
- serversCount?: number;
31
- };
49
+ value: string;
50
+ riskLevel: 'low' | 'high';
51
+ }
52
+ interface CredentialAnalysisResult {
53
+ hasCredentials: boolean;
54
+ credentialVars: CredentialVariable[];
55
+ riskLevel: 'none' | 'low' | 'high';
56
+ }
57
+
58
+ declare class MCPConfigParser {
59
+ private filePath;
60
+ private fileContents;
61
+ private parsed;
62
+ private valid;
63
+ private fileContentsData;
64
+ constructor(filePath: string);
65
+ parseConfigFile(): Promise<MCPConfigData>;
66
+ extractMCPServers(configData: any): Promise<Record<string, MCPServerConfig>>;
67
+ private normalizeServerConfigs;
68
+ private validateType;
69
+ private inferTransportType;
70
+ validateServerConfig(serverConfig: MCPServerConfig): boolean;
71
+ getSupportedConfigKeys(): string[];
72
+ isValidSyntax(): Promise<boolean>;
73
+ countMCPServers(): Promise<number>;
74
+ private getFileContent;
75
+ }
76
+
77
+ declare class MCPConfigService {
78
+ private pathRegistry;
79
+ private currentOS;
80
+ private debug;
81
+ constructor();
82
+ getConfigFilesPerApp(appName: string): MCPFilePath[];
83
+ getAllConfigFiles(): MCPAppPathsRecord;
84
+ getMCPServersPerApp(appName: string): Promise<MCPServerInfo[]>;
85
+ getAllMCPServers(): Promise<Record<string, MCPServerInfo[]>>;
86
+ getSupportedApps(): MCPAppMetadata[];
87
+ getSupportedOperatingSystems(): string[];
88
+ validateConfigFile(filePath: string): Promise<boolean>;
89
+ protected createParser(filePath: string): MCPConfigParser;
90
+ getMCPFileGroups(): Promise<MCPFileGroupsResultRecord>;
91
+ registerCustomApp(appName: string, paths: MCPFilePath[]): void;
92
+ private parseConfigFileForServers;
93
+ private convertToMCPServerInfo;
94
+ private getFriendlyName;
32
95
  }
33
- type MCPFilePathGroupsRecord = Record<string, MCPFileGroups>;
34
- type MCPFileGroupsResultRecord = Record<string, MCPFileGroupsResult>;
35
96
 
36
97
  declare class MCPFiles {
37
- private mcpFilePathGroups;
38
- constructor(mcpFilePathGroups?: MCPFilePathGroupsRecord);
98
+ private mcpConfigService;
99
+ constructor();
39
100
  findFiles(): Promise<MCPFileGroupsResultRecord>;
101
+ getMCPConfigService(): MCPConfigService;
40
102
  }
41
103
 
42
104
  export { MCPFiles };
package/dist/main.d.ts CHANGED
@@ -1,12 +1,21 @@
1
- interface MCPServerInfo {
1
+ interface MCPConfigData {
2
+ raw: any;
3
+ parsed: boolean;
4
+ valid: boolean;
5
+ servers: Record<string, MCPServerConfig>;
6
+ }
7
+ interface MCPServerConfig {
2
8
  name: string;
3
9
  command: string;
4
10
  args?: string[];
5
11
  transport?: 'stdio' | 'sse' | 'http';
6
- type?: 'sse' | 'http' | 'stdio';
7
- source?: string;
12
+ type?: 'sse' | 'http' | 'stdio' | 'streamable-http';
8
13
  env?: Record<string, string>;
9
- status?: 'running' | 'stopped';
14
+ }
15
+ interface MCPAppMetadata {
16
+ name: string;
17
+ friendlyName: string;
18
+ paths: MCPFilePath[];
10
19
  }
11
20
  interface MCPFilePath {
12
21
  filePath: string;
@@ -14,6 +23,17 @@ interface MCPFilePath {
14
23
  parsable?: boolean;
15
24
  servers?: MCPServerInfo[];
16
25
  }
26
+ interface MCPServerInfo {
27
+ name: string;
28
+ command: string;
29
+ args?: string[];
30
+ transport?: 'stdio' | 'sse' | 'http';
31
+ type?: 'sse' | 'http' | 'stdio' | 'streamable-http';
32
+ source?: string;
33
+ env?: Record<string, string>;
34
+ status?: 'running' | 'stopped';
35
+ credentials?: CredentialAnalysisResult;
36
+ }
17
37
  interface MCPFileGroups {
18
38
  name: string;
19
39
  friendlyName: string;
@@ -22,21 +42,63 @@ interface MCPFileGroups {
22
42
  serversCount?: number;
23
43
  };
24
44
  }
25
- interface MCPFileGroupsResult {
45
+ type MCPFileGroupsResultRecord = Record<string, MCPFileGroups>;
46
+ type MCPAppPathsRecord = Record<string, MCPFilePath[]>;
47
+ interface CredentialVariable {
26
48
  name: string;
27
- friendlyName: string;
28
- paths: MCPFilePath[];
29
- stats: {
30
- serversCount?: number;
31
- };
49
+ value: string;
50
+ riskLevel: 'low' | 'high';
51
+ }
52
+ interface CredentialAnalysisResult {
53
+ hasCredentials: boolean;
54
+ credentialVars: CredentialVariable[];
55
+ riskLevel: 'none' | 'low' | 'high';
56
+ }
57
+
58
+ declare class MCPConfigParser {
59
+ private filePath;
60
+ private fileContents;
61
+ private parsed;
62
+ private valid;
63
+ private fileContentsData;
64
+ constructor(filePath: string);
65
+ parseConfigFile(): Promise<MCPConfigData>;
66
+ extractMCPServers(configData: any): Promise<Record<string, MCPServerConfig>>;
67
+ private normalizeServerConfigs;
68
+ private validateType;
69
+ private inferTransportType;
70
+ validateServerConfig(serverConfig: MCPServerConfig): boolean;
71
+ getSupportedConfigKeys(): string[];
72
+ isValidSyntax(): Promise<boolean>;
73
+ countMCPServers(): Promise<number>;
74
+ private getFileContent;
75
+ }
76
+
77
+ declare class MCPConfigService {
78
+ private pathRegistry;
79
+ private currentOS;
80
+ private debug;
81
+ constructor();
82
+ getConfigFilesPerApp(appName: string): MCPFilePath[];
83
+ getAllConfigFiles(): MCPAppPathsRecord;
84
+ getMCPServersPerApp(appName: string): Promise<MCPServerInfo[]>;
85
+ getAllMCPServers(): Promise<Record<string, MCPServerInfo[]>>;
86
+ getSupportedApps(): MCPAppMetadata[];
87
+ getSupportedOperatingSystems(): string[];
88
+ validateConfigFile(filePath: string): Promise<boolean>;
89
+ protected createParser(filePath: string): MCPConfigParser;
90
+ getMCPFileGroups(): Promise<MCPFileGroupsResultRecord>;
91
+ registerCustomApp(appName: string, paths: MCPFilePath[]): void;
92
+ private parseConfigFileForServers;
93
+ private convertToMCPServerInfo;
94
+ private getFriendlyName;
32
95
  }
33
- type MCPFilePathGroupsRecord = Record<string, MCPFileGroups>;
34
- type MCPFileGroupsResultRecord = Record<string, MCPFileGroupsResult>;
35
96
 
36
97
  declare class MCPFiles {
37
- private mcpFilePathGroups;
38
- constructor(mcpFilePathGroups?: MCPFilePathGroupsRecord);
98
+ private mcpConfigService;
99
+ constructor();
39
100
  findFiles(): Promise<MCPFileGroupsResultRecord>;
101
+ getMCPConfigService(): MCPConfigService;
40
102
  }
41
103
 
42
104
  export { MCPFiles };