@cloudstreamsoftware/claude-tools 1.2.6 → 1.2.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.
@@ -305,23 +305,30 @@ async function storeCredentials(licenseKey, installType) {
305
305
 
306
306
  /**
307
307
  * Configure MCP server connection
308
- * Merges into settings.json (same pattern as mergeHooksIntoSettings)
308
+ *
309
+ * IMPORTANT: VSCode Claude Code extension reads MCP servers from ~/.claude.json (NOT ~/.claude/settings.json)
310
+ * This is documented in GitHub Issue #4976 - settings.json is for hooks and permissions only.
311
+ *
312
+ * MCP server config locations:
313
+ * - ~/.claude.json (user scope) - for all projects, what VSCode reads
314
+ * - .mcp.json (project scope) - for specific project only
309
315
  */
310
316
  async function configureMcpServer(licenseKey) {
311
- const settingsPath = path.join(CONFIG.claudeDir, 'settings.json');
317
+ // VSCode reads MCP servers from ~/.claude.json (NOT ~/.claude/settings.json)
318
+ const claudeJsonPath = path.join(os.homedir(), '.claude.json');
312
319
 
313
- // Read existing settings or create empty object
314
- let settings = {};
320
+ // Read existing config or create empty object
321
+ let config = {};
315
322
  try {
316
- const content = await fs.readFile(settingsPath, 'utf8');
317
- settings = JSON.parse(content);
323
+ const content = await fs.readFile(claudeJsonPath, 'utf8');
324
+ config = JSON.parse(content);
318
325
  } catch {
319
326
  // File doesn't exist, start fresh
320
327
  }
321
328
 
322
- // Merge MCP server into settings
323
- settings.mcpServers = settings.mcpServers || {};
324
- settings.mcpServers['cloudstream-knowledge'] = {
329
+ // Add MCP server to the config
330
+ config.mcpServers = config.mcpServers || {};
331
+ config.mcpServers['cloudstream-knowledge'] = {
325
332
  command: 'npx',
326
333
  args: ['@cloudstreamsoftware/knowledge-mcp-client'],
327
334
  env: {
@@ -330,8 +337,8 @@ async function configureMcpServer(licenseKey) {
330
337
  }
331
338
  };
332
339
 
333
- await fs.writeFile(settingsPath, JSON.stringify(settings, null, 2));
334
- logSuccess('MCP server configured in settings.json');
340
+ await fs.writeFile(claudeJsonPath, JSON.stringify(config, null, 2));
341
+ logSuccess('MCP server configured in ~/.claude.json');
335
342
 
336
343
  // Clean up orphaned mcp.json if it exists (from previous installs)
337
344
  const orphanedMcpPath = path.join(CONFIG.claudeDir, 'mcp.json');
@@ -341,6 +348,20 @@ async function configureMcpServer(licenseKey) {
341
348
  } catch {
342
349
  // File doesn't exist, nothing to clean up
343
350
  }
351
+
352
+ // Also clean up MCP config from settings.json if present (from older installs)
353
+ const settingsPath = path.join(CONFIG.claudeDir, 'settings.json');
354
+ try {
355
+ const settingsContent = await fs.readFile(settingsPath, 'utf8');
356
+ const settings = JSON.parse(settingsContent);
357
+ if (settings.mcpServers) {
358
+ delete settings.mcpServers;
359
+ await fs.writeFile(settingsPath, JSON.stringify(settings, null, 2));
360
+ logSuccess('Cleaned up MCP config from settings.json (moved to ~/.claude.json)');
361
+ }
362
+ } catch {
363
+ // settings.json doesn't exist or is invalid, nothing to clean up
364
+ }
344
365
  }
345
366
 
346
367
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudstreamsoftware/claude-tools",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "CloudStream Claude Code productivity tools - hooks, skills, agents, and knowledge server integration",
5
5
  "main": "dist/index.js",
6
6
  "bin": {