ls-mcp 1.8.2 → 1.9.1
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/bin/cli.cjs +125 -81
- package/dist/bin/cli.mjs +125 -81
- package/dist/main.cjs +125 -81
- package/dist/main.d.cts +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.mjs +125 -81
- package/package.json +19 -2
- package/src/main.ts +15 -115
- package/src/services/mcp-config-linter-service.ts +6 -2
- package/src/services/mcp-server-manager-service.ts +4 -1
- package/src/types.ts +38 -0
- package/src/utils/os-paths.ts +102 -0
package/dist/main.cjs
CHANGED
|
@@ -36,7 +36,7 @@ __export(main_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(main_exports);
|
|
37
37
|
var import_promises2 = __toESM(require("fs/promises"), 1);
|
|
38
38
|
var import_node_os2 = require("os");
|
|
39
|
-
var
|
|
39
|
+
var import_node_path3 = __toESM(require("path"), 1);
|
|
40
40
|
|
|
41
41
|
// src/services/mcp-config-linter-service.ts
|
|
42
42
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
@@ -84,8 +84,12 @@ var MCPConfigLinterService = class {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
async countMCPServers() {
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
try {
|
|
88
|
+
const mcpServers = await this.getMCPServers();
|
|
89
|
+
return Object.keys(mcpServers).length;
|
|
90
|
+
} catch (error) {
|
|
91
|
+
return 0;
|
|
92
|
+
}
|
|
89
93
|
}
|
|
90
94
|
async getMCPServers() {
|
|
91
95
|
await this.parseFile();
|
|
@@ -143,8 +147,10 @@ var MCPServerManagerService = class {
|
|
|
143
147
|
}
|
|
144
148
|
if (serverConfig.url) {
|
|
145
149
|
this.source = serverConfig.url;
|
|
150
|
+
this.transport = "http";
|
|
146
151
|
} else {
|
|
147
|
-
|
|
152
|
+
const fullCommand = [serverConfig.command, ...serverConfig.args || []].join(" ");
|
|
153
|
+
this.source = fullCommand;
|
|
148
154
|
}
|
|
149
155
|
this.env = serverConfig.env || {};
|
|
150
156
|
}
|
|
@@ -504,85 +510,113 @@ var MCPServerManagerService = class {
|
|
|
504
510
|
}
|
|
505
511
|
};
|
|
506
512
|
|
|
513
|
+
// src/utils/os-paths.ts
|
|
514
|
+
var import_node_path2 = __toESM(require("path"), 1);
|
|
515
|
+
var appData = process.env.APPDATA || "";
|
|
516
|
+
var localAppData = process.env.LOCALAPPDATA || "";
|
|
517
|
+
var homeDir = process.env.HOME || "";
|
|
518
|
+
function getWindowsPaths() {
|
|
519
|
+
return {
|
|
520
|
+
claude: [
|
|
521
|
+
{ filePath: import_node_path2.default.join(appData, "Claude", "claude_desktop_config.json"), type: "global" }
|
|
522
|
+
],
|
|
523
|
+
claude_code: [
|
|
524
|
+
{ filePath: ".mcp.json", type: "local" }
|
|
525
|
+
],
|
|
526
|
+
cursor: [
|
|
527
|
+
{ filePath: import_node_path2.default.join(homeDir, ".cursor", "mcp.json"), type: "global" },
|
|
528
|
+
{ filePath: import_node_path2.default.join(".cursor", "mcp.json"), type: "local" }
|
|
529
|
+
],
|
|
530
|
+
vscode: [
|
|
531
|
+
{ filePath: import_node_path2.default.join(".vscode", "mcp.json"), type: "local" },
|
|
532
|
+
{ filePath: import_node_path2.default.join(appData, "Code", "User", "settings.json"), type: "global" },
|
|
533
|
+
{ filePath: import_node_path2.default.join(appData, "Code - Insiders", "User", "settings.json"), type: "global" },
|
|
534
|
+
{ filePath: import_node_path2.default.join(appData, "Code", "User", "mcp.json"), type: "global" },
|
|
535
|
+
{ filePath: import_node_path2.default.join(appData, "Code - Insiders", "User", "mcp.json"), type: "global" }
|
|
536
|
+
],
|
|
537
|
+
cline: [
|
|
538
|
+
{ filePath: import_node_path2.default.join(appData, "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"), type: "global" },
|
|
539
|
+
{ filePath: import_node_path2.default.join(appData, "Code - Insiders", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"), type: "global" }
|
|
540
|
+
],
|
|
541
|
+
windsurf: [
|
|
542
|
+
{ filePath: import_node_path2.default.join(".codeium", "windsurf", "mcp_config.json"), type: "local" }
|
|
543
|
+
],
|
|
544
|
+
roo: [
|
|
545
|
+
{ filePath: import_node_path2.default.join(appData, "Code", "User", "globalStorage", "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"), type: "global" },
|
|
546
|
+
{ filePath: import_node_path2.default.join(appData, "Code - Insiders", "User", "globalStorage", "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"), type: "global" }
|
|
547
|
+
],
|
|
548
|
+
"intellij-github-copilot": [
|
|
549
|
+
{ filePath: import_node_path2.default.join(localAppData, "github-copilot", "intellij", "mcp.json"), type: "global" }
|
|
550
|
+
],
|
|
551
|
+
junie: [
|
|
552
|
+
{ filePath: import_node_path2.default.join(homeDir, ".junie", "mcp", "mcp.json"), type: "global" }
|
|
553
|
+
],
|
|
554
|
+
zed: [
|
|
555
|
+
{ filePath: import_node_path2.default.join(localAppData, "zed", "settings.json"), type: "global" },
|
|
556
|
+
{ filePath: import_node_path2.default.join(".zed", "settings.json"), type: "local" }
|
|
557
|
+
],
|
|
558
|
+
gemini: [
|
|
559
|
+
{ filePath: import_node_path2.default.join(homeDir, ".gemini", "settings.json"), type: "global" },
|
|
560
|
+
{ filePath: import_node_path2.default.join(".gemini", "settings.json"), type: "local" }
|
|
561
|
+
]
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
__name(getWindowsPaths, "getWindowsPaths");
|
|
565
|
+
function getDarwinPaths() {
|
|
566
|
+
return {
|
|
567
|
+
claude: [
|
|
568
|
+
{ filePath: import_node_path2.default.join(homeDir, "Library", "Application Support", "Claude", "claude_desktop_config.json"), type: "global" }
|
|
569
|
+
],
|
|
570
|
+
claude_code: [
|
|
571
|
+
{ filePath: ".mcp.json", type: "local" }
|
|
572
|
+
],
|
|
573
|
+
cursor: [
|
|
574
|
+
{ filePath: import_node_path2.default.join(homeDir, ".cursor", "mcp.json"), type: "global" },
|
|
575
|
+
{ filePath: import_node_path2.default.join(".cursor", "mcp.json"), type: "local" }
|
|
576
|
+
],
|
|
577
|
+
vscode: [
|
|
578
|
+
{ filePath: import_node_path2.default.join(".vscode", "mcp.json"), type: "local" },
|
|
579
|
+
{ filePath: import_node_path2.default.join(homeDir, "Library", "Application Support", "Code", "User", "settings.json"), type: "global" },
|
|
580
|
+
{ filePath: import_node_path2.default.join(homeDir, "Library", "Application Support", "Code", "User", "mcp.json"), type: "global" },
|
|
581
|
+
{ filePath: import_node_path2.default.join(homeDir, "Library", "Application Support", "Code - Insiders", "User", "settings.json"), type: "global" },
|
|
582
|
+
{ filePath: import_node_path2.default.join(homeDir, "Library", "Application Support", "Code - Insiders", "User", "mcp.json"), type: "global" }
|
|
583
|
+
],
|
|
584
|
+
cline: [
|
|
585
|
+
{ filePath: import_node_path2.default.join(homeDir, "Library", "Application Support", "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"), type: "global" },
|
|
586
|
+
{ filePath: import_node_path2.default.join(homeDir, "Library", "Application Support", "Code - Insiders", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"), type: "global" }
|
|
587
|
+
],
|
|
588
|
+
windsurf: [
|
|
589
|
+
{ filePath: import_node_path2.default.join(".codeium", "windsurf", "mcp_config.json"), type: "local" }
|
|
590
|
+
],
|
|
591
|
+
roo: [
|
|
592
|
+
{ filePath: import_node_path2.default.join(homeDir, "Library", "Application Support", "Code", "User", "globalStorage", "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"), type: "global" },
|
|
593
|
+
{ filePath: import_node_path2.default.join(homeDir, "Library", "Application Support", "Code - Insiders", "User", "globalStorage", "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"), type: "global" }
|
|
594
|
+
],
|
|
595
|
+
"intellij-github-copilot": [
|
|
596
|
+
{ filePath: import_node_path2.default.join(homeDir, ".config", "github-copilot", "intellij", "mcp.json"), type: "global" }
|
|
597
|
+
],
|
|
598
|
+
junie: [
|
|
599
|
+
{ filePath: import_node_path2.default.join(homeDir, ".junie", "mcp", "mcp.json"), type: "global" },
|
|
600
|
+
{ filePath: import_node_path2.default.join(".junie", "mcp", "mcp.json"), type: "local" }
|
|
601
|
+
],
|
|
602
|
+
zed: [
|
|
603
|
+
{ filePath: import_node_path2.default.join(homeDir, ".config", "zed", "settings.json"), type: "global" },
|
|
604
|
+
{ filePath: import_node_path2.default.join(".zed", "settings.json"), type: "local" }
|
|
605
|
+
],
|
|
606
|
+
gemini: [
|
|
607
|
+
{ filePath: import_node_path2.default.join(homeDir, ".gemini", "settings.json"), type: "global" },
|
|
608
|
+
{ filePath: import_node_path2.default.join(".gemini", "settings.json"), type: "local" }
|
|
609
|
+
]
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
__name(getDarwinPaths, "getDarwinPaths");
|
|
613
|
+
|
|
507
614
|
// src/main.ts
|
|
508
|
-
var osSpecificPaths = {
|
|
509
|
-
claude: [],
|
|
510
|
-
claude_code: [],
|
|
511
|
-
cursor: [],
|
|
512
|
-
vscode: [],
|
|
513
|
-
cline: [],
|
|
514
|
-
windsurf: [],
|
|
515
|
-
roo: [],
|
|
516
|
-
"intellij-github-copilot": []
|
|
517
|
-
};
|
|
615
|
+
var osSpecificPaths = {};
|
|
518
616
|
if ((0, import_node_os2.platform)() === "win32") {
|
|
519
|
-
osSpecificPaths
|
|
520
|
-
{ filePath: `${process.env.APPDATA}\\Claude\\claude_desktop_config.json`, type: "global" }
|
|
521
|
-
];
|
|
522
|
-
osSpecificPaths["claude_code"] = [
|
|
523
|
-
{ filePath: ".mcp.json", type: "local" }
|
|
524
|
-
];
|
|
525
|
-
osSpecificPaths["cursor"] = [
|
|
526
|
-
{ filePath: `${process.env.HOME}\\.cursor\\mcp.json`, type: "global" },
|
|
527
|
-
{ filePath: ".cursor\\mcp.json", type: "local" }
|
|
528
|
-
];
|
|
529
|
-
osSpecificPaths["vscode"] = [
|
|
530
|
-
{ filePath: ".vscode\\mcp.json", type: "local" },
|
|
531
|
-
{ filePath: `${process.env.APPDATA}\\Code\\User\\settings.json`, type: "global" },
|
|
532
|
-
{ filePath: `${process.env.APPDATA}\\Code - Insiders\\User\\settings.json`, type: "global" }
|
|
533
|
-
];
|
|
534
|
-
osSpecificPaths["cline"] = [
|
|
535
|
-
{ filePath: `${process.env.APPDATA}\\Code\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json`, type: "global" },
|
|
536
|
-
{ filePath: `${process.env.APPDATA}\\Code - Insiders\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json`, type: "global" }
|
|
537
|
-
];
|
|
538
|
-
osSpecificPaths["windsurf"] = [
|
|
539
|
-
{ filePath: ".codeium\\windsurf\\mcp_config.json", type: "local" }
|
|
540
|
-
];
|
|
541
|
-
osSpecificPaths["roo"] = [
|
|
542
|
-
{ filePath: `${process.env.APPDATA}\\Code\\User\\globalStorage\\rooveterinaryinc.roo-cline\\settings\\cline_mcp_settings.json`, type: "global" },
|
|
543
|
-
{ filePath: `${process.env.APPDATA}\\Code - Insiders\\User\\globalStorage\\rooveterinaryinc.roo-cline\\settings\\cline_mcp_settings.json`, type: "global" }
|
|
544
|
-
];
|
|
545
|
-
osSpecificPaths["intellij-github-copilot"] = [
|
|
546
|
-
{ filePath: `${process.env.LOCALAPPDATA}\\github-copilot\\intellij\\mcp.json`, type: "global" }
|
|
547
|
-
];
|
|
548
|
-
osSpecificPaths["zed"] = [
|
|
549
|
-
{ filePath: `${process.env.LOCALAPPDATA}\\zed\\settings.json`, type: "global" },
|
|
550
|
-
{ filePath: ".zed\\settings.json", type: "local" }
|
|
551
|
-
];
|
|
617
|
+
osSpecificPaths = getWindowsPaths();
|
|
552
618
|
} else {
|
|
553
|
-
osSpecificPaths
|
|
554
|
-
{ filePath: "~/Library/Application Support/Claude/claude_desktop_config.json", type: "global" }
|
|
555
|
-
];
|
|
556
|
-
osSpecificPaths["claude_code"] = [
|
|
557
|
-
{ filePath: ".mcp.json", type: "local" }
|
|
558
|
-
];
|
|
559
|
-
osSpecificPaths["cursor"] = [
|
|
560
|
-
{ filePath: "~/.cursor/mcp.json", type: "global" },
|
|
561
|
-
{ filePath: ".cursor/mcp.json", type: "local" }
|
|
562
|
-
];
|
|
563
|
-
osSpecificPaths["vscode"] = [
|
|
564
|
-
{ filePath: ".vscode/mcp.json", type: "local" },
|
|
565
|
-
{ filePath: "~/Library/Application Support/Code/User/settings.json", type: "global" },
|
|
566
|
-
{ filePath: "~/Library/Application Support/Code - Insiders/User/settings.json", type: "global" }
|
|
567
|
-
];
|
|
568
|
-
osSpecificPaths["cline"] = [
|
|
569
|
-
{ filePath: "~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json", type: "global" },
|
|
570
|
-
{ filePath: "~/Library/Application Support/Code - Insiders/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json", type: "global" }
|
|
571
|
-
];
|
|
572
|
-
osSpecificPaths["windsurf"] = [
|
|
573
|
-
{ filePath: ".codeium/windsurf/mcp_config.json", type: "local" }
|
|
574
|
-
];
|
|
575
|
-
osSpecificPaths["roo"] = [
|
|
576
|
-
{ filePath: "~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json", type: "global" },
|
|
577
|
-
{ filePath: "~/Library/Application Support/Code - Insiders/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json", type: "global" }
|
|
578
|
-
];
|
|
579
|
-
osSpecificPaths["intellij-github-copilot"] = [
|
|
580
|
-
{ filePath: "~/.config/github-copilot/intellij/mcp.json", type: "global" }
|
|
581
|
-
];
|
|
582
|
-
osSpecificPaths["zed"] = [
|
|
583
|
-
{ filePath: "~/.config/zed/settings.json", type: "global" },
|
|
584
|
-
{ filePath: ".zed/settings.json", type: "local" }
|
|
585
|
-
];
|
|
619
|
+
osSpecificPaths = getDarwinPaths();
|
|
586
620
|
}
|
|
587
621
|
var MCPFiles = class {
|
|
588
622
|
static {
|
|
@@ -629,10 +663,20 @@ var MCPFiles = class {
|
|
|
629
663
|
friendlyName: "IntelliJ GitHub Copilot",
|
|
630
664
|
paths: osSpecificPaths["intellij-github-copilot"]
|
|
631
665
|
},
|
|
666
|
+
junie: {
|
|
667
|
+
name: "junie",
|
|
668
|
+
friendlyName: "IntelliJ Junie",
|
|
669
|
+
paths: osSpecificPaths["junie"]
|
|
670
|
+
},
|
|
632
671
|
zed: {
|
|
633
672
|
name: "zed",
|
|
634
673
|
friendlyName: "Zed",
|
|
635
674
|
paths: osSpecificPaths["zed"]
|
|
675
|
+
},
|
|
676
|
+
gemini: {
|
|
677
|
+
name: "gemini-cli",
|
|
678
|
+
friendlyName: "Gemini CLI",
|
|
679
|
+
paths: osSpecificPaths.gemini
|
|
636
680
|
}
|
|
637
681
|
};
|
|
638
682
|
constructor(mcpFilePathGroups) {
|
|
@@ -651,7 +695,7 @@ var MCPFiles = class {
|
|
|
651
695
|
const uniqueFilePaths = /* @__PURE__ */ new Set();
|
|
652
696
|
for (const filePathData of clientsGroup.paths) {
|
|
653
697
|
const resolvedPath = filePathData.filePath.replace("~", process.env.HOME || "");
|
|
654
|
-
const absolutePath =
|
|
698
|
+
const absolutePath = import_node_path3.default.resolve(resolvedPath);
|
|
655
699
|
if (uniqueFilePaths.has(absolutePath)) {
|
|
656
700
|
continue;
|
|
657
701
|
}
|
package/dist/main.d.cts
CHANGED
|
@@ -32,6 +32,7 @@ interface MCPFileGroupsResult {
|
|
|
32
32
|
}
|
|
33
33
|
type MCPFilePathGroupsRecord = Record<string, MCPFileGroups>;
|
|
34
34
|
type MCPFileGroupsResultRecord = Record<string, MCPFileGroupsResult>;
|
|
35
|
+
|
|
35
36
|
declare class MCPFiles {
|
|
36
37
|
private mcpFilePathGroups;
|
|
37
38
|
constructor(mcpFilePathGroups?: MCPFilePathGroupsRecord);
|
package/dist/main.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ interface MCPFileGroupsResult {
|
|
|
32
32
|
}
|
|
33
33
|
type MCPFilePathGroupsRecord = Record<string, MCPFileGroups>;
|
|
34
34
|
type MCPFileGroupsResultRecord = Record<string, MCPFileGroupsResult>;
|
|
35
|
+
|
|
35
36
|
declare class MCPFiles {
|
|
36
37
|
private mcpFilePathGroups;
|
|
37
38
|
constructor(mcpFilePathGroups?: MCPFilePathGroupsRecord);
|
package/dist/main.mjs
CHANGED
|
@@ -4,7 +4,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4
4
|
// src/main.ts
|
|
5
5
|
import fs2 from "fs/promises";
|
|
6
6
|
import { platform as platform2 } from "os";
|
|
7
|
-
import
|
|
7
|
+
import path3 from "path";
|
|
8
8
|
|
|
9
9
|
// src/services/mcp-config-linter-service.ts
|
|
10
10
|
import fs from "fs/promises";
|
|
@@ -52,8 +52,12 @@ var MCPConfigLinterService = class {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
async countMCPServers() {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
try {
|
|
56
|
+
const mcpServers = await this.getMCPServers();
|
|
57
|
+
return Object.keys(mcpServers).length;
|
|
58
|
+
} catch (error) {
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
57
61
|
}
|
|
58
62
|
async getMCPServers() {
|
|
59
63
|
await this.parseFile();
|
|
@@ -111,8 +115,10 @@ var MCPServerManagerService = class {
|
|
|
111
115
|
}
|
|
112
116
|
if (serverConfig.url) {
|
|
113
117
|
this.source = serverConfig.url;
|
|
118
|
+
this.transport = "http";
|
|
114
119
|
} else {
|
|
115
|
-
|
|
120
|
+
const fullCommand = [serverConfig.command, ...serverConfig.args || []].join(" ");
|
|
121
|
+
this.source = fullCommand;
|
|
116
122
|
}
|
|
117
123
|
this.env = serverConfig.env || {};
|
|
118
124
|
}
|
|
@@ -472,85 +478,113 @@ var MCPServerManagerService = class {
|
|
|
472
478
|
}
|
|
473
479
|
};
|
|
474
480
|
|
|
481
|
+
// src/utils/os-paths.ts
|
|
482
|
+
import path2 from "path";
|
|
483
|
+
var appData = process.env.APPDATA || "";
|
|
484
|
+
var localAppData = process.env.LOCALAPPDATA || "";
|
|
485
|
+
var homeDir = process.env.HOME || "";
|
|
486
|
+
function getWindowsPaths() {
|
|
487
|
+
return {
|
|
488
|
+
claude: [
|
|
489
|
+
{ filePath: path2.join(appData, "Claude", "claude_desktop_config.json"), type: "global" }
|
|
490
|
+
],
|
|
491
|
+
claude_code: [
|
|
492
|
+
{ filePath: ".mcp.json", type: "local" }
|
|
493
|
+
],
|
|
494
|
+
cursor: [
|
|
495
|
+
{ filePath: path2.join(homeDir, ".cursor", "mcp.json"), type: "global" },
|
|
496
|
+
{ filePath: path2.join(".cursor", "mcp.json"), type: "local" }
|
|
497
|
+
],
|
|
498
|
+
vscode: [
|
|
499
|
+
{ filePath: path2.join(".vscode", "mcp.json"), type: "local" },
|
|
500
|
+
{ filePath: path2.join(appData, "Code", "User", "settings.json"), type: "global" },
|
|
501
|
+
{ filePath: path2.join(appData, "Code - Insiders", "User", "settings.json"), type: "global" },
|
|
502
|
+
{ filePath: path2.join(appData, "Code", "User", "mcp.json"), type: "global" },
|
|
503
|
+
{ filePath: path2.join(appData, "Code - Insiders", "User", "mcp.json"), type: "global" }
|
|
504
|
+
],
|
|
505
|
+
cline: [
|
|
506
|
+
{ filePath: path2.join(appData, "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"), type: "global" },
|
|
507
|
+
{ filePath: path2.join(appData, "Code - Insiders", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"), type: "global" }
|
|
508
|
+
],
|
|
509
|
+
windsurf: [
|
|
510
|
+
{ filePath: path2.join(".codeium", "windsurf", "mcp_config.json"), type: "local" }
|
|
511
|
+
],
|
|
512
|
+
roo: [
|
|
513
|
+
{ filePath: path2.join(appData, "Code", "User", "globalStorage", "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"), type: "global" },
|
|
514
|
+
{ filePath: path2.join(appData, "Code - Insiders", "User", "globalStorage", "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"), type: "global" }
|
|
515
|
+
],
|
|
516
|
+
"intellij-github-copilot": [
|
|
517
|
+
{ filePath: path2.join(localAppData, "github-copilot", "intellij", "mcp.json"), type: "global" }
|
|
518
|
+
],
|
|
519
|
+
junie: [
|
|
520
|
+
{ filePath: path2.join(homeDir, ".junie", "mcp", "mcp.json"), type: "global" }
|
|
521
|
+
],
|
|
522
|
+
zed: [
|
|
523
|
+
{ filePath: path2.join(localAppData, "zed", "settings.json"), type: "global" },
|
|
524
|
+
{ filePath: path2.join(".zed", "settings.json"), type: "local" }
|
|
525
|
+
],
|
|
526
|
+
gemini: [
|
|
527
|
+
{ filePath: path2.join(homeDir, ".gemini", "settings.json"), type: "global" },
|
|
528
|
+
{ filePath: path2.join(".gemini", "settings.json"), type: "local" }
|
|
529
|
+
]
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
__name(getWindowsPaths, "getWindowsPaths");
|
|
533
|
+
function getDarwinPaths() {
|
|
534
|
+
return {
|
|
535
|
+
claude: [
|
|
536
|
+
{ filePath: path2.join(homeDir, "Library", "Application Support", "Claude", "claude_desktop_config.json"), type: "global" }
|
|
537
|
+
],
|
|
538
|
+
claude_code: [
|
|
539
|
+
{ filePath: ".mcp.json", type: "local" }
|
|
540
|
+
],
|
|
541
|
+
cursor: [
|
|
542
|
+
{ filePath: path2.join(homeDir, ".cursor", "mcp.json"), type: "global" },
|
|
543
|
+
{ filePath: path2.join(".cursor", "mcp.json"), type: "local" }
|
|
544
|
+
],
|
|
545
|
+
vscode: [
|
|
546
|
+
{ filePath: path2.join(".vscode", "mcp.json"), type: "local" },
|
|
547
|
+
{ filePath: path2.join(homeDir, "Library", "Application Support", "Code", "User", "settings.json"), type: "global" },
|
|
548
|
+
{ filePath: path2.join(homeDir, "Library", "Application Support", "Code", "User", "mcp.json"), type: "global" },
|
|
549
|
+
{ filePath: path2.join(homeDir, "Library", "Application Support", "Code - Insiders", "User", "settings.json"), type: "global" },
|
|
550
|
+
{ filePath: path2.join(homeDir, "Library", "Application Support", "Code - Insiders", "User", "mcp.json"), type: "global" }
|
|
551
|
+
],
|
|
552
|
+
cline: [
|
|
553
|
+
{ filePath: path2.join(homeDir, "Library", "Application Support", "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"), type: "global" },
|
|
554
|
+
{ filePath: path2.join(homeDir, "Library", "Application Support", "Code - Insiders", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"), type: "global" }
|
|
555
|
+
],
|
|
556
|
+
windsurf: [
|
|
557
|
+
{ filePath: path2.join(".codeium", "windsurf", "mcp_config.json"), type: "local" }
|
|
558
|
+
],
|
|
559
|
+
roo: [
|
|
560
|
+
{ filePath: path2.join(homeDir, "Library", "Application Support", "Code", "User", "globalStorage", "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"), type: "global" },
|
|
561
|
+
{ filePath: path2.join(homeDir, "Library", "Application Support", "Code - Insiders", "User", "globalStorage", "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"), type: "global" }
|
|
562
|
+
],
|
|
563
|
+
"intellij-github-copilot": [
|
|
564
|
+
{ filePath: path2.join(homeDir, ".config", "github-copilot", "intellij", "mcp.json"), type: "global" }
|
|
565
|
+
],
|
|
566
|
+
junie: [
|
|
567
|
+
{ filePath: path2.join(homeDir, ".junie", "mcp", "mcp.json"), type: "global" },
|
|
568
|
+
{ filePath: path2.join(".junie", "mcp", "mcp.json"), type: "local" }
|
|
569
|
+
],
|
|
570
|
+
zed: [
|
|
571
|
+
{ filePath: path2.join(homeDir, ".config", "zed", "settings.json"), type: "global" },
|
|
572
|
+
{ filePath: path2.join(".zed", "settings.json"), type: "local" }
|
|
573
|
+
],
|
|
574
|
+
gemini: [
|
|
575
|
+
{ filePath: path2.join(homeDir, ".gemini", "settings.json"), type: "global" },
|
|
576
|
+
{ filePath: path2.join(".gemini", "settings.json"), type: "local" }
|
|
577
|
+
]
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
__name(getDarwinPaths, "getDarwinPaths");
|
|
581
|
+
|
|
475
582
|
// src/main.ts
|
|
476
|
-
var osSpecificPaths = {
|
|
477
|
-
claude: [],
|
|
478
|
-
claude_code: [],
|
|
479
|
-
cursor: [],
|
|
480
|
-
vscode: [],
|
|
481
|
-
cline: [],
|
|
482
|
-
windsurf: [],
|
|
483
|
-
roo: [],
|
|
484
|
-
"intellij-github-copilot": []
|
|
485
|
-
};
|
|
583
|
+
var osSpecificPaths = {};
|
|
486
584
|
if (platform2() === "win32") {
|
|
487
|
-
osSpecificPaths
|
|
488
|
-
{ filePath: `${process.env.APPDATA}\\Claude\\claude_desktop_config.json`, type: "global" }
|
|
489
|
-
];
|
|
490
|
-
osSpecificPaths["claude_code"] = [
|
|
491
|
-
{ filePath: ".mcp.json", type: "local" }
|
|
492
|
-
];
|
|
493
|
-
osSpecificPaths["cursor"] = [
|
|
494
|
-
{ filePath: `${process.env.HOME}\\.cursor\\mcp.json`, type: "global" },
|
|
495
|
-
{ filePath: ".cursor\\mcp.json", type: "local" }
|
|
496
|
-
];
|
|
497
|
-
osSpecificPaths["vscode"] = [
|
|
498
|
-
{ filePath: ".vscode\\mcp.json", type: "local" },
|
|
499
|
-
{ filePath: `${process.env.APPDATA}\\Code\\User\\settings.json`, type: "global" },
|
|
500
|
-
{ filePath: `${process.env.APPDATA}\\Code - Insiders\\User\\settings.json`, type: "global" }
|
|
501
|
-
];
|
|
502
|
-
osSpecificPaths["cline"] = [
|
|
503
|
-
{ filePath: `${process.env.APPDATA}\\Code\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json`, type: "global" },
|
|
504
|
-
{ filePath: `${process.env.APPDATA}\\Code - Insiders\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json`, type: "global" }
|
|
505
|
-
];
|
|
506
|
-
osSpecificPaths["windsurf"] = [
|
|
507
|
-
{ filePath: ".codeium\\windsurf\\mcp_config.json", type: "local" }
|
|
508
|
-
];
|
|
509
|
-
osSpecificPaths["roo"] = [
|
|
510
|
-
{ filePath: `${process.env.APPDATA}\\Code\\User\\globalStorage\\rooveterinaryinc.roo-cline\\settings\\cline_mcp_settings.json`, type: "global" },
|
|
511
|
-
{ filePath: `${process.env.APPDATA}\\Code - Insiders\\User\\globalStorage\\rooveterinaryinc.roo-cline\\settings\\cline_mcp_settings.json`, type: "global" }
|
|
512
|
-
];
|
|
513
|
-
osSpecificPaths["intellij-github-copilot"] = [
|
|
514
|
-
{ filePath: `${process.env.LOCALAPPDATA}\\github-copilot\\intellij\\mcp.json`, type: "global" }
|
|
515
|
-
];
|
|
516
|
-
osSpecificPaths["zed"] = [
|
|
517
|
-
{ filePath: `${process.env.LOCALAPPDATA}\\zed\\settings.json`, type: "global" },
|
|
518
|
-
{ filePath: ".zed\\settings.json", type: "local" }
|
|
519
|
-
];
|
|
585
|
+
osSpecificPaths = getWindowsPaths();
|
|
520
586
|
} else {
|
|
521
|
-
osSpecificPaths
|
|
522
|
-
{ filePath: "~/Library/Application Support/Claude/claude_desktop_config.json", type: "global" }
|
|
523
|
-
];
|
|
524
|
-
osSpecificPaths["claude_code"] = [
|
|
525
|
-
{ filePath: ".mcp.json", type: "local" }
|
|
526
|
-
];
|
|
527
|
-
osSpecificPaths["cursor"] = [
|
|
528
|
-
{ filePath: "~/.cursor/mcp.json", type: "global" },
|
|
529
|
-
{ filePath: ".cursor/mcp.json", type: "local" }
|
|
530
|
-
];
|
|
531
|
-
osSpecificPaths["vscode"] = [
|
|
532
|
-
{ filePath: ".vscode/mcp.json", type: "local" },
|
|
533
|
-
{ filePath: "~/Library/Application Support/Code/User/settings.json", type: "global" },
|
|
534
|
-
{ filePath: "~/Library/Application Support/Code - Insiders/User/settings.json", type: "global" }
|
|
535
|
-
];
|
|
536
|
-
osSpecificPaths["cline"] = [
|
|
537
|
-
{ filePath: "~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json", type: "global" },
|
|
538
|
-
{ filePath: "~/Library/Application Support/Code - Insiders/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json", type: "global" }
|
|
539
|
-
];
|
|
540
|
-
osSpecificPaths["windsurf"] = [
|
|
541
|
-
{ filePath: ".codeium/windsurf/mcp_config.json", type: "local" }
|
|
542
|
-
];
|
|
543
|
-
osSpecificPaths["roo"] = [
|
|
544
|
-
{ filePath: "~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json", type: "global" },
|
|
545
|
-
{ filePath: "~/Library/Application Support/Code - Insiders/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json", type: "global" }
|
|
546
|
-
];
|
|
547
|
-
osSpecificPaths["intellij-github-copilot"] = [
|
|
548
|
-
{ filePath: "~/.config/github-copilot/intellij/mcp.json", type: "global" }
|
|
549
|
-
];
|
|
550
|
-
osSpecificPaths["zed"] = [
|
|
551
|
-
{ filePath: "~/.config/zed/settings.json", type: "global" },
|
|
552
|
-
{ filePath: ".zed/settings.json", type: "local" }
|
|
553
|
-
];
|
|
587
|
+
osSpecificPaths = getDarwinPaths();
|
|
554
588
|
}
|
|
555
589
|
var MCPFiles = class {
|
|
556
590
|
static {
|
|
@@ -597,10 +631,20 @@ var MCPFiles = class {
|
|
|
597
631
|
friendlyName: "IntelliJ GitHub Copilot",
|
|
598
632
|
paths: osSpecificPaths["intellij-github-copilot"]
|
|
599
633
|
},
|
|
634
|
+
junie: {
|
|
635
|
+
name: "junie",
|
|
636
|
+
friendlyName: "IntelliJ Junie",
|
|
637
|
+
paths: osSpecificPaths["junie"]
|
|
638
|
+
},
|
|
600
639
|
zed: {
|
|
601
640
|
name: "zed",
|
|
602
641
|
friendlyName: "Zed",
|
|
603
642
|
paths: osSpecificPaths["zed"]
|
|
643
|
+
},
|
|
644
|
+
gemini: {
|
|
645
|
+
name: "gemini-cli",
|
|
646
|
+
friendlyName: "Gemini CLI",
|
|
647
|
+
paths: osSpecificPaths.gemini
|
|
604
648
|
}
|
|
605
649
|
};
|
|
606
650
|
constructor(mcpFilePathGroups) {
|
|
@@ -619,7 +663,7 @@ var MCPFiles = class {
|
|
|
619
663
|
const uniqueFilePaths = /* @__PURE__ */ new Set();
|
|
620
664
|
for (const filePathData of clientsGroup.paths) {
|
|
621
665
|
const resolvedPath = filePathData.filePath.replace("~", process.env.HOME || "");
|
|
622
|
-
const absolutePath =
|
|
666
|
+
const absolutePath = path3.resolve(resolvedPath);
|
|
623
667
|
if (uniqueFilePaths.has(absolutePath)) {
|
|
624
668
|
continue;
|
|
625
669
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "list and detect MCP servers and configurations",
|
|
5
5
|
"types": "dist/main.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=
|
|
29
|
+
"node": ">=20.13.0"
|
|
30
30
|
},
|
|
31
31
|
"packageManager": "npm@8.4.0",
|
|
32
32
|
"files": [
|
|
@@ -96,5 +96,22 @@
|
|
|
96
96
|
"**/*.{js,json}": [
|
|
97
97
|
"npm run lint:fix"
|
|
98
98
|
]
|
|
99
|
+
},
|
|
100
|
+
"c8": {
|
|
101
|
+
"exclude": [
|
|
102
|
+
"dist/**",
|
|
103
|
+
"coverage/**",
|
|
104
|
+
"__tests__/**",
|
|
105
|
+
"**/*.test.ts",
|
|
106
|
+
"**/*.test.js"
|
|
107
|
+
],
|
|
108
|
+
"include": [
|
|
109
|
+
"src/**"
|
|
110
|
+
],
|
|
111
|
+
"reporter": [
|
|
112
|
+
"text",
|
|
113
|
+
"lcov",
|
|
114
|
+
"html"
|
|
115
|
+
]
|
|
99
116
|
}
|
|
100
117
|
}
|