sync-project-mcps 1.0.1 → 1.0.2
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/README.md +7 -7
- package/dist/clients/cline.js +3 -16
- package/dist/clients/windsurf.js +3 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
One command. All your project MCP servers. Every editor.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx -y sync-project-mcps
|
|
8
|
+
npx -y sync-project-mcps@latest
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
---
|
|
@@ -37,19 +37,19 @@ You use multiple AI coding assistants - Cursor, Claude Code, Windsurf, Cline. Ea
|
|
|
37
37
|
### Run Once (npx)
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
npx -y sync-project-mcps
|
|
40
|
+
npx -y sync-project-mcps@latest
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### Preview Changes
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
npx -y sync-project-mcps --dry-run
|
|
46
|
+
npx -y sync-project-mcps@latest --dry-run
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
### Verbose Output
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
npx -y sync-project-mcps -v
|
|
52
|
+
npx -y sync-project-mcps@latest -v
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
---
|
|
@@ -73,7 +73,7 @@ npx -y sync-project-mcps -v
|
|
|
73
73
|
No installation needed:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
npx -y sync-project-mcps
|
|
76
|
+
npx -y sync-project-mcps@latest
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
### Option 2: Install Globally
|
|
@@ -130,7 +130,7 @@ Or add to project-level `.mcp.json`:
|
|
|
130
130
|
### Then Sync
|
|
131
131
|
|
|
132
132
|
```bash
|
|
133
|
-
npx -y sync-project-mcps
|
|
133
|
+
npx -y sync-project-mcps@latest
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
Your MCP server is now available in **all** your AI coding assistants.
|
|
@@ -144,7 +144,7 @@ Your MCP server is now available in **all** your AI coding assistants.
|
|
|
144
144
|
3. **Writes** the unified config to every client location
|
|
145
145
|
|
|
146
146
|
```
|
|
147
|
-
$ npx -y sync-project-mcps
|
|
147
|
+
$ npx -y sync-project-mcps@latest
|
|
148
148
|
|
|
149
149
|
Sync MCP Configurations
|
|
150
150
|
|
package/dist/clients/cline.js
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
|
|
4
|
-
function getGlobalConfigPath() {
|
|
5
|
-
const platform = process.platform;
|
|
6
|
-
if (platform === "darwin") {
|
|
7
|
-
return join(homedir(), "Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json");
|
|
8
|
-
}
|
|
9
|
-
else if (platform === "win32") {
|
|
10
|
-
return join(process.env.APPDATA || "", "Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json");
|
|
11
|
-
}
|
|
12
|
-
return join(homedir(), ".config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json");
|
|
13
|
-
}
|
|
3
|
+
const CONFIG_PATH = ".cline/mcp.json";
|
|
14
4
|
export function getClineConfig(projectRoot) {
|
|
15
|
-
const
|
|
16
|
-
const globalPath = getGlobalConfigPath();
|
|
17
|
-
// Prefer project-level config, fall back to global
|
|
18
|
-
const configPath = existsSync(projectPath) ? projectPath : globalPath;
|
|
5
|
+
const configPath = join(projectRoot, CONFIG_PATH);
|
|
19
6
|
const exists = existsSync(configPath);
|
|
20
7
|
if (!exists) {
|
|
21
8
|
return {
|
|
22
9
|
name: "Cline",
|
|
23
|
-
path:
|
|
10
|
+
path: configPath,
|
|
24
11
|
config: null,
|
|
25
12
|
exists: false,
|
|
26
13
|
};
|
package/dist/clients/windsurf.js
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
|
|
4
|
-
function getGlobalConfigPath() {
|
|
5
|
-
return join(homedir(), ".codeium/windsurf/mcp_config.json");
|
|
6
|
-
}
|
|
3
|
+
const CONFIG_PATH = ".windsurf/mcp.json";
|
|
7
4
|
export function getWindsurfConfig(projectRoot) {
|
|
8
|
-
const
|
|
9
|
-
const globalPath = getGlobalConfigPath();
|
|
10
|
-
// Prefer project-level config, fall back to global
|
|
11
|
-
const configPath = existsSync(projectPath) ? projectPath : globalPath;
|
|
5
|
+
const configPath = join(projectRoot, CONFIG_PATH);
|
|
12
6
|
const exists = existsSync(configPath);
|
|
13
7
|
if (!exists) {
|
|
14
8
|
return {
|
|
15
9
|
name: "Windsurf",
|
|
16
|
-
path:
|
|
10
|
+
path: configPath,
|
|
17
11
|
config: null,
|
|
18
12
|
exists: false,
|
|
19
13
|
};
|