mrmainspring 0.1.6 → 0.1.7
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/client-setup.js +21 -2
- package/package.json +1 -1
package/dist/client-setup.js
CHANGED
|
@@ -17,14 +17,21 @@ const CLIENTS = [
|
|
|
17
17
|
{ name: "Cursor", path: "%USERPROFILE%/.cursor/mcp.json", platforms: ["win32"], format: "standard" },
|
|
18
18
|
// Windsurf
|
|
19
19
|
{ name: "Windsurf", path: "~/.codeium/windsurf/mcp_config.json", platforms: ["darwin", "linux", "win32"], format: "standard" },
|
|
20
|
+
// Windsurf (also on Windows via AppData)
|
|
21
|
+
{ name: "Windsurf", path: "%APPDATA%/Windsurf/User/globalStorage/codeium.windsurf/mcp_config.json", platforms: ["win32"], format: "standard" },
|
|
20
22
|
// Zed
|
|
21
23
|
{ name: "Zed", path: "~/.config/zed/settings.json", platforms: ["darwin", "linux"], format: "zed" },
|
|
24
|
+
// Continue.dev
|
|
25
|
+
{ name: "Continue", path: "~/.continue/config.json", platforms: ["darwin", "linux", "win32"], format: "continue" },
|
|
26
|
+
// VS Code (workspace-agnostic user MCP config — requires MCP extension)
|
|
27
|
+
{ name: "VS Code", path: "~/.vscode/mcp.json", platforms: ["darwin", "linux", "win32"], format: "standard" },
|
|
22
28
|
];
|
|
23
29
|
function expandPath(p, env) {
|
|
30
|
+
const home = env.HOME ?? env.USERPROFILE ?? homedir();
|
|
24
31
|
return p
|
|
25
|
-
.replace(/^~/,
|
|
32
|
+
.replace(/^~/, home)
|
|
26
33
|
.replace(/%APPDATA%/gi, env.APPDATA ?? "")
|
|
27
|
-
.replace(/%USERPROFILE%/gi, env.USERPROFILE ??
|
|
34
|
+
.replace(/%USERPROFILE%/gi, env.USERPROFILE ?? home);
|
|
28
35
|
}
|
|
29
36
|
function isInstalled(configPath) {
|
|
30
37
|
return existsSync(dirname(configPath)) || existsSync(configPath);
|
|
@@ -43,6 +50,10 @@ function alreadySet(json, format) {
|
|
|
43
50
|
if (format === "zed") {
|
|
44
51
|
return !!json.context_servers?.mainspring;
|
|
45
52
|
}
|
|
53
|
+
if (format === "continue") {
|
|
54
|
+
const servers = json.mcpServers;
|
|
55
|
+
return !!servers?.some(s => s.name === "mainspring");
|
|
56
|
+
}
|
|
46
57
|
return !!json.mcpServers?.mainspring;
|
|
47
58
|
}
|
|
48
59
|
function mergeConfig(json, format) {
|
|
@@ -55,6 +66,14 @@ function mergeConfig(json, format) {
|
|
|
55
66
|
}
|
|
56
67
|
};
|
|
57
68
|
}
|
|
69
|
+
if (format === "continue") {
|
|
70
|
+
const existing = (json.mcpServers ?? [])
|
|
71
|
+
.filter((s) => s.name !== "mainspring");
|
|
72
|
+
return {
|
|
73
|
+
...json,
|
|
74
|
+
mcpServers: [...existing, { name: "mainspring", command: "npx", args: ["-y", "mrmainspring"] }]
|
|
75
|
+
};
|
|
76
|
+
}
|
|
58
77
|
return {
|
|
59
78
|
...json,
|
|
60
79
|
mcpServers: {
|
package/package.json
CHANGED