@cloudstreamsoftware/claude-tools 1.2.5 → 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.
- package/bin/cloudstream-setup.js +33 -12
- package/mcp/knowledge-connector.json +1 -1
- package/package.json +1 -1
package/bin/cloudstream-setup.js
CHANGED
|
@@ -305,33 +305,40 @@ async function storeCredentials(licenseKey, installType) {
|
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
307
|
* Configure MCP server connection
|
|
308
|
-
*
|
|
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
|
-
|
|
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
|
|
314
|
-
let
|
|
320
|
+
// Read existing config or create empty object
|
|
321
|
+
let config = {};
|
|
315
322
|
try {
|
|
316
|
-
const content = await fs.readFile(
|
|
317
|
-
|
|
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
|
-
//
|
|
323
|
-
|
|
324
|
-
|
|
329
|
+
// Add MCP server to the config
|
|
330
|
+
config.mcpServers = config.mcpServers || {};
|
|
331
|
+
config.mcpServers['cloudstream-knowledge'] = {
|
|
325
332
|
command: 'npx',
|
|
326
|
-
args: ['@
|
|
333
|
+
args: ['@cloudstreamsoftware/knowledge-mcp-client'],
|
|
327
334
|
env: {
|
|
328
335
|
CLOUDSTREAM_LICENSE: licenseKey,
|
|
329
336
|
CLOUDSTREAM_API: CONFIG.knowledgeApiUrl
|
|
330
337
|
}
|
|
331
338
|
};
|
|
332
339
|
|
|
333
|
-
await fs.writeFile(
|
|
334
|
-
logSuccess('MCP server configured in
|
|
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
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"version": "1.0.0",
|
|
6
6
|
"server": {
|
|
7
7
|
"command": "npx",
|
|
8
|
-
"args": ["@
|
|
8
|
+
"args": ["@cloudstreamsoftware/knowledge-mcp-client"],
|
|
9
9
|
"env": {
|
|
10
10
|
"CLOUDSTREAM_LICENSE": "${LICENSE_KEY}",
|
|
11
11
|
"CLOUDSTREAM_API": "https://knowledge.cloudstreamsoftware.com"
|
package/package.json
CHANGED