@vibescope/mcp-server 0.3.5 → 0.3.6
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/cli-init.js +17 -12
- package/package.json +1 -1
- package/src/cli-init.ts +18 -12
package/dist/cli-init.js
CHANGED
|
@@ -185,11 +185,7 @@ async function configureClaudeCode(apiKey) {
|
|
|
185
185
|
if (addGlobal) {
|
|
186
186
|
const existing = readJsonFile(globalConfig);
|
|
187
187
|
const mcpServers = existing.mcpServers || {};
|
|
188
|
-
mcpServers['vibescope'] =
|
|
189
|
-
command: 'npx',
|
|
190
|
-
args: ['-y', '-p', '@vibescope/mcp-server@latest', 'vibescope-mcp'],
|
|
191
|
-
env: { VIBESCOPE_API_KEY: apiKey },
|
|
192
|
-
};
|
|
188
|
+
mcpServers['vibescope'] = buildMcpServerConfig(apiKey);
|
|
193
189
|
existing.mcpServers = mcpServers;
|
|
194
190
|
writeJsonFile(globalConfig, existing);
|
|
195
191
|
console.log(` ${icon.check} Wrote ${c.cyan}~/.claude/settings.json${c.reset} (global config)`);
|
|
@@ -210,9 +206,7 @@ async function configureGemini(apiKey) {
|
|
|
210
206
|
const existing = readJsonFile(configPath);
|
|
211
207
|
const mcpServers = existing.mcpServers || {};
|
|
212
208
|
mcpServers['vibescope'] = {
|
|
213
|
-
|
|
214
|
-
args: ['-y', '-p', '@vibescope/mcp-server@latest', 'vibescope-mcp'],
|
|
215
|
-
env: { VIBESCOPE_API_KEY: apiKey },
|
|
209
|
+
...buildMcpServerConfig(apiKey),
|
|
216
210
|
timeout: 30000,
|
|
217
211
|
trust: true,
|
|
218
212
|
};
|
|
@@ -239,14 +233,25 @@ function writeJsonFile(path, data) {
|
|
|
239
233
|
}
|
|
240
234
|
writeFileSync(path, JSON.stringify(data, null, 2) + '\n');
|
|
241
235
|
}
|
|
242
|
-
function
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
|
|
236
|
+
function buildMcpServerConfig(apiKey) {
|
|
237
|
+
const isWindows = platform() === 'win32';
|
|
238
|
+
if (isWindows) {
|
|
239
|
+
return {
|
|
240
|
+
command: 'cmd',
|
|
241
|
+
args: ['/c', 'npx', '-y', '-p', '@vibescope/mcp-server@latest', 'vibescope-mcp'],
|
|
242
|
+
env: { VIBESCOPE_API_KEY: apiKey },
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
return {
|
|
246
246
|
command: 'npx',
|
|
247
247
|
args: ['-y', '-p', '@vibescope/mcp-server@latest', 'vibescope-mcp'],
|
|
248
248
|
env: { VIBESCOPE_API_KEY: apiKey },
|
|
249
249
|
};
|
|
250
|
+
}
|
|
251
|
+
function writeMcpJson(configPath, apiKey) {
|
|
252
|
+
const existing = readJsonFile(configPath);
|
|
253
|
+
const mcpServers = existing.mcpServers || {};
|
|
254
|
+
mcpServers['vibescope'] = buildMcpServerConfig(apiKey);
|
|
250
255
|
existing.mcpServers = mcpServers;
|
|
251
256
|
writeJsonFile(configPath, existing);
|
|
252
257
|
}
|
package/package.json
CHANGED
package/src/cli-init.ts
CHANGED
|
@@ -218,11 +218,7 @@ async function configureClaudeCode(apiKey: string): Promise<void> {
|
|
|
218
218
|
if (addGlobal) {
|
|
219
219
|
const existing = readJsonFile(globalConfig);
|
|
220
220
|
const mcpServers = (existing.mcpServers as Record<string, unknown>) || {};
|
|
221
|
-
mcpServers['vibescope'] =
|
|
222
|
-
command: 'npx',
|
|
223
|
-
args: ['-y', '-p', '@vibescope/mcp-server@latest', 'vibescope-mcp'],
|
|
224
|
-
env: { VIBESCOPE_API_KEY: apiKey },
|
|
225
|
-
};
|
|
221
|
+
mcpServers['vibescope'] = buildMcpServerConfig(apiKey);
|
|
226
222
|
existing.mcpServers = mcpServers;
|
|
227
223
|
writeJsonFile(globalConfig, existing);
|
|
228
224
|
console.log(` ${icon.check} Wrote ${c.cyan}~/.claude/settings.json${c.reset} (global config)`);
|
|
@@ -246,9 +242,7 @@ async function configureGemini(apiKey: string): Promise<void> {
|
|
|
246
242
|
const existing = readJsonFile(configPath);
|
|
247
243
|
const mcpServers = (existing.mcpServers as Record<string, unknown>) || {};
|
|
248
244
|
mcpServers['vibescope'] = {
|
|
249
|
-
|
|
250
|
-
args: ['-y', '-p', '@vibescope/mcp-server@latest', 'vibescope-mcp'],
|
|
251
|
-
env: { VIBESCOPE_API_KEY: apiKey },
|
|
245
|
+
...buildMcpServerConfig(apiKey),
|
|
252
246
|
timeout: 30000,
|
|
253
247
|
trust: true,
|
|
254
248
|
};
|
|
@@ -278,14 +272,26 @@ function writeJsonFile(path: string, data: Record<string, unknown>): void {
|
|
|
278
272
|
writeFileSync(path, JSON.stringify(data, null, 2) + '\n');
|
|
279
273
|
}
|
|
280
274
|
|
|
281
|
-
function
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
|
|
275
|
+
function buildMcpServerConfig(apiKey: string): Record<string, unknown> {
|
|
276
|
+
const isWindows = platform() === 'win32';
|
|
277
|
+
if (isWindows) {
|
|
278
|
+
return {
|
|
279
|
+
command: 'cmd',
|
|
280
|
+
args: ['/c', 'npx', '-y', '-p', '@vibescope/mcp-server@latest', 'vibescope-mcp'],
|
|
281
|
+
env: { VIBESCOPE_API_KEY: apiKey },
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
return {
|
|
285
285
|
command: 'npx',
|
|
286
286
|
args: ['-y', '-p', '@vibescope/mcp-server@latest', 'vibescope-mcp'],
|
|
287
287
|
env: { VIBESCOPE_API_KEY: apiKey },
|
|
288
288
|
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function writeMcpJson(configPath: string, apiKey: string): void {
|
|
292
|
+
const existing = readJsonFile(configPath);
|
|
293
|
+
const mcpServers = (existing.mcpServers as Record<string, unknown>) || {};
|
|
294
|
+
mcpServers['vibescope'] = buildMcpServerConfig(apiKey);
|
|
289
295
|
existing.mcpServers = mcpServers;
|
|
290
296
|
writeJsonFile(configPath, existing);
|
|
291
297
|
}
|